* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
}

.function-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
}

.function-section h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.function-section h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.function-section > p {
    color: #666;
    margin-bottom: 24px;
    padding-left: 14px;
}

.upload-area {
    border: 2px dashed #d0d5dd;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.upload-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.file-info {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

.progress-bar {
    margin-top: 16px;
    background-color: #e8eaed;
    border-radius: 6px;
    overflow: hidden;
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 30%;
    transition: width 0.3s;
    animation: progress-animation 2s ease-in-out infinite;
}

.progress-fill.complete {
    animation: none;
    width: 100%;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

@keyframes progress-animation {
    0% { width: 10%; }
    50% { width: 80%; }
    100% { width: 10%; }
}

.status {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.status:empty {
    display: none;
}

.status.success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.status.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.status.processing {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.download-buttons {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-btn {
    background-color: #e0e0e0;
    color: #999;
    border: none;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.download-btn.ready {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(17, 153, 142, 0.3);
}

.download-btn.ready:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(17, 153, 142, 0.4);
}

/* Login page styles */
.login-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .status {
    margin-top: 0;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #d0d5dd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

/* Logout button in header */
.header-actions {
    margin-top: 15px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}
