@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #9ca3af;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.5);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    width: 120px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    object-fit: contain;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.version {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.disclaimer {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #92400e;
}

.disclaimer strong {
    color: #78350f;
    font-weight: 600;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message i {
    color: #dc2626;
    font-size: 1.1rem;
}

.upload-section {
    margin-bottom: 2rem;
}

.upload-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.file-upload-container {
    position: relative;
    margin-bottom: 2rem;
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #1e293b;
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: #334155;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background: #334155;
    box-shadow: var(--shadow-lg);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.supported-formats {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #334155;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
}

.submit-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loader {
    display: none;
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .card {
        padding: 2rem 1.5rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem 1rem;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .file-upload-area {
        padding: 1.5rem 1rem;
    }
}

/* Animation for file upload success */
.file-upload-success {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.file-upload-success .upload-icon {
    color: var(--success-color);
}

.file-upload-success .upload-text {
    color: var(--success-color);
}

/* Focus states for accessibility */
.file-input:focus + .file-upload-area {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.submit-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}