/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --error: #ef4444;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Language Banner */
.lang-banner {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.lang-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.lang-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-right: 5px;
}

.lang-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

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

/* Header */
.header {
    text-align: center;
    padding: 40px 0;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.logo h1 span {
    color: var(--secondary);
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.mode-btn {
    padding: 12px 30px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card h2 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.card h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.help-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Upload Zones */
.upload-zone {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.upload-zone.small {
    padding: 30px 20px;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.upload-icon.small {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

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

.upload-formats {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* SRT Uploads */
.srt-uploads {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.srt-upload-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.srt-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.srt-label.primary {
    color: var(--success);
}

.srt-label.secondary {
    color: #3b82f6;
}

.label-icon {
    font-size: 1.2rem;
}

/* File Info */
.file-info {
    padding: 15px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.file-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-remove {
    background: var(--error);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.btn-remove.small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* Options */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.option-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-select,
.input-number {
    padding: 10px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.input-select:focus,
.input-number:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn-download {
    background: var(--success);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    width: 100%;
    transition: all 0.3s;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-icon {
    font-size: 1.3rem;
}

/* Action Section */
.action-section {
    margin: 30px 0;
}

/* Progress */
.progress-section {
    text-align: center;
    padding: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s;
    animation: progressAnimation 2s infinite;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 0%; }
}

.progress-text {
    color: var(--text-secondary);
}

/* Result Section */
.result-section {
    margin: 30px 0;
}

.result-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
}

.result-card.success {
    border: 2px solid var(--success);
}

.result-card.error {
    border: 2px solid var(--error);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-card h3 {
    margin-bottom: 15px;
}

.result-message,
.error-message {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Utilities */
.hidden {
    display: none !important;
}

.upload-mode {
    display: none;
}

.upload-mode.active {
    display: block;
}

/* Subtitle Selection */
.subtitle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.subtitle-option {
    position: relative;
}

.subtitle-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.subtitle-option label {
    display: block;
    padding: 15px;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.subtitle-option input[type="checkbox"]:checked + label {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.subtitle-option label:hover {
    border-color: var(--primary);
}

.sub-lang {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
}

.sub-codec {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.sub-index {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 3px;
}

/* Coming Soon Card */
.coming-soon-card {
    position: relative;
    border: 2px dashed var(--border);
    background: rgba(30, 41, 59, 0.5);
}

.coming-soon-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.coming-soon-card h3 {
    margin-top: 10px;
    color: var(--text-secondary);
}

/* Notify Form */
.notify-form {
    margin-top: 20px;
}

.notify-input-group {
    display: flex;
    gap: 10px;
    max-width: 450px;
    margin: 0 auto;
}

.notify-input-group input[type="email"] {
    flex: 1;
    padding: 12px 18px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.notify-input-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
}

.notify-input-group input[type="email"]::placeholder {
    color: var(--text-secondary);
}

.btn-notify {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-notify:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
}

.notify-success {
    margin-top: 20px;
    padding: 15px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .mode-selector {
        flex-direction: column;
    }

    .srt-uploads {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .subtitle-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .notify-input-group {
        flex-direction: column;
    }

    .btn-notify {
        width: 100%;
    }
}
