/* ============================================================
   PPT 번역기 - 프로페셔널 서비스급 디자인 (2026)
   Modern, Clean, AI-focused Aesthetic
   ============================================================ */

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

:root {
    /* 2026 Modern Color System - AI/Tech Aesthetic */
    --bg-primary: #fafbfc;
    --bg-secondary: #f5f6f8;
    --bg-elevated: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --bg-overlay: rgba(0, 0, 0, 0.5);

    /* Borders */
    --border-lightest: #f3f4f6;
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* Brand Colors - Indigo/Violet for AI feel */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --primary-lighter: #f0f4ff;

    --accent: #8b5cf6;
    --accent-light: #ede9fe;

    /* Semantic Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --success-bg: #ecfdf5;

    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-bg: #fffbeb;

    --error: #ef4444;
    --error-light: #fee2e2;
    --error-bg: #fef2f2;

    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(180deg, #fafbfc 0%, #f0f4ff 100%);

    /* Shadows - Layered and soft */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.08);
    --shadow-2xl: 0 24px 60px rgba(0, 0, 0, 0.10);
    --shadow-brand: 0 12px 32px rgba(99, 102, 241, 0.2);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);

    /* Border Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-sans: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Inter', 'Noto Sans KR', sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============ Navigation ============ */
.navbar {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-light);
    padding: 0 var(--space-8);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.navbar-logo {
    width: 44px;
    height: 44px;
    background: var(--gradient-brand);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    box-shadow: var(--shadow-brand);
}

.navbar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.navbar-subtitle {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.navbar-badge {
    background: var(--primary-lighter);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ============ Container ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-12) var(--space-6) var(--space-20);
}

/* ============ Hero Section ============ */
.hero {
    text-align: center;
    padding: var(--space-20) var(--space-6) var(--space-16);
    background: var(--gradient-hero);
    border-radius: var(--radius-2xl);
    margin-bottom: var(--space-10);
}

.hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============ Upload Zone ============ */
.upload-zone {
    background: var(--bg-elevated);
    border: 2.5px dashed var(--border-medium);
    border-radius: var(--radius-2xl);
    padding: var(--space-20) var(--space-8);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.upload-zone:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--shadow-brand);
}

.upload-zone:hover::before {
    opacity: 0.03;
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-lighter);
    transform: scale(1.01);
    box-shadow: 0 0 0 6px var(--primary-light);
}

.upload-zone.uploading {
    pointer-events: none;
    opacity: 0.7;
}

.upload-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto var(--space-6);
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--shadow-brand);
}

.upload-zone h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.upload-zone p {
    color: var(--text-tertiary);
    font-size: 1rem;
    font-weight: 500;
}

.upload-zone input[type="file"] {
    display: none;
}

/* ============ Error Message ============ */
.error-message {
    display: none;
    background: var(--error-bg);
    border: 1.5px solid var(--error);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-6);
    margin-top: var(--space-6);
    color: var(--error);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.error-message.active {
    display: block;
    animation: slideDown 300ms ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ Progress Section ============ */
.progress-section {
    display: none;
    margin-top: var(--space-8);
}

.progress-section.active {
    display: block;
    animation: slideDown 400ms ease;
}

.progress-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-10);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3.5px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.progress-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-percent-display {
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: var(--space-6) 0 var(--space-4);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.progress-bar-track {
    width: 100%;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--space-6) 0;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 400ms ease;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.progress-step-text {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-weight: 500;
}

.timer-value {
    font-weight: 700;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ============ Result Section ============ */
.result-section {
    display: none;
    margin-top: var(--space-10);
}

.result-section.active {
    display: block;
    animation: slideDown 500ms ease;
}

/* Alert Banner */
.alert-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-8);
    font-size: 0.95rem;
    font-weight: 600;
    border: 1.5px solid;
}

.alert-banner.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning);
    color: #92400e;
}

.alert-banner.alert-success {
    background: var(--success-bg);
    border-color: var(--success);
    color: #065f46;
}

.alert-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-5);
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-2);
}

.stat-number.stat-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-number.stat-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: var(--space-2);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Completion Bar */
.completion-bar {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-sm);
}

.completion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.completion-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.completion-percent {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.completion-track {
    height: 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.completion-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
    border-radius: var(--radius-full);
    transition: width 600ms ease;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.completion-fill.partial {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Timing Card */
.timing-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-sm);
}

.timing-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1.5px solid var(--border-light);
}

.timing-total-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex: 1;
    font-weight: 600;
}

.timing-total-value {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timing-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.timing-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.timing-item-bar {
    height: 8px;
    border-radius: var(--radius-full);
    min-width: 20px;
    transition: width 500ms ease;
}

.timing-item-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
    font-weight: 600;
}

.timing-item-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    min-width: 50px;
    text-align: right;
}

/* ============ Action Buttons ============ */
.actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-10);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-8);
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.35), var(--shadow-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1.5px solid var(--border-medium);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============ Preview Tabs ============ */
.preview-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
    border-bottom: none;
    box-shadow: var(--shadow-xs);
}

.preview-tab {
    flex: 1;
    padding: var(--space-4) var(--space-5);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    transition: all var(--transition-base);
    text-align: center;
}

.preview-tab:hover {
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.preview-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--bg-elevated);
}

/* Slide Tabs */
.slide-tabs {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-top: none;
    overflow-x: auto;
}

.slide-tab {
    padding: var(--space-2) var(--space-5);
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all var(--transition-base);
    font-family: inherit;
}

.slide-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-lighter);
}

.slide-tab.active {
    background: var(--gradient-accent);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-brand);
}

.slide-tab.has-untranslated {
    border-color: var(--error);
    color: var(--error);
}

.slide-tab.has-untranslated.active {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
    border-color: transparent;
}

/* Preview Content */
.preview-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    border-bottom: 1.5px solid var(--border-light);
}

.comparison-table td {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-lightest);
    font-size: 0.95rem;
    vertical-align: top;
    line-height: 1.6;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background: var(--bg-secondary);
}

.comparison-table tr.row-untranslated td {
    background: var(--error-bg);
}

.comparison-table tr.row-untranslated:hover td {
    background: var(--error-light);
}

.col-original {
    color: var(--text-primary);
    width: 36%;
    font-weight: 600;
}

.col-translated {
    color: var(--text-primary);
    width: 36%;
}

.col-translated.is-untranslated {
    color: var(--error);
    font-style: italic;
}

.col-status {
    width: 28%;
    text-align: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-literal {
    background: var(--success-light);
    color: var(--success);
}

.badge-liberal {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-mixed {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-keep {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.badge-untranslated {
    background: var(--error-light);
    color: var(--error);
}

.badge-translated {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-rationale {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    background: var(--accent-light);
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-full);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
}

.btn-rationale:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ============ Modal ============ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-2xl);
    animation: modalSlide 300ms ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) var(--space-8);
    border-bottom: 1.5px solid var(--border-light);
    background: var(--bg-secondary);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border-light);
}

.modal-close:hover {
    background: var(--error-light);
    color: var(--error);
    border-color: var(--error);
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--space-8);
    overflow-y: auto;
}

.rationale-section {
    margin-bottom: var(--space-6);
}

.rationale-section h4 {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
    font-weight: 700;
}

.rationale-original {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning);
    padding: var(--space-4) var(--space-5);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.6;
}

.rationale-translated {
    background: var(--success-bg);
    border-left: 4px solid var(--success);
    padding: var(--space-4) var(--space-5);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.05rem;
    color: var(--success);
    font-weight: 600;
    line-height: 1.6;
}

.word-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1.5px solid var(--border-light);
}

.word-breakdown-table th {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.word-breakdown-table td {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-lightest);
    font-size: 0.9rem;
}

.word-ko {
    color: var(--text-primary);
    font-weight: 700;
}

.word-en {
    color: var(--primary);
    font-weight: 600;
}

.word-role {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============ Navigation Controls ============ */
.slide-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-top: none;
}

.slide-nav-btn {
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--border-medium);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 700;
}

.slide-nav-btn:hover:not(:disabled) {
    background: var(--gradient-accent);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: var(--shadow-brand);
}

.slide-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slide-nav-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 140px;
    text-align: center;
}

/* ============ Dual View - Vertical Stack ============ */
.dual-view-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    padding: var(--space-10);
    background: var(--bg-primary);
}

.slide-view-panel,
.dual-view-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.slide-view-panel:hover,
.dual-view-panel:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.slide-view-panel h3,
.dual-view-panel h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 2.5px solid var(--border-light);
}

@media (max-width: 1200px) {
    .dual-view-container {
        padding: var(--space-6);
        gap: var(--space-6);
    }
}

/* ============ Detail View ============ */
.translation-detail-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    padding: var(--space-10);
    background: var(--bg-primary);
}

.detail-slide-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
}

.detail-slide-panel h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 2.5px solid var(--border-light);
}

.detail-text-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    max-height: 900px;
    overflow-y: auto;
}

.detail-text-panel h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 2.5px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--bg-elevated);
    z-index: 2;
}

.text-item {
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
    transition: all var(--transition-base);
}

.text-item:hover {
    background: var(--primary-lighter);
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

.text-item.untranslated {
    border-left-color: var(--error);
    background: var(--error-bg);
}

.text-item-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: var(--space-1);
    letter-spacing: 0.05em;
}

.text-item-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    font-weight: 500;
}

.text-item-meta {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-3);
}

.text-item-badge {
    font-size: 0.75rem;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-weight: 700;
}

@media (max-width: 1200px) {
    .translation-detail-container {
        padding: var(--space-6);
        gap: var(--space-6);
    }

    .detail-text-panel {
        max-height: 600px;
    }
}

/* ============ Slide Preview ============ */
.slide-preview-wrapper {
    padding: var(--space-8);
}

.slide-canvas {
    position: relative;
    width: 100%;
    max-width: 960px;
    min-height: 540px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.slide-number-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
    z-index: 5;
    backdrop-filter: blur(8px);
}

.slide-shape {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: var(--space-2);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.slide-text {
    line-height: 1.4;
    color: var(--text-primary);
    word-break: break-word;
    overflow-wrap: break-word;
    cursor: default;
    padding: 1px 2px;
    border-radius: var(--radius-xs);
    transition: background var(--transition-fast);
}

.slide-text:hover {
    background: var(--primary-light);
}

.slide-text.untranslated-text {
    color: var(--error);
    background: var(--error-bg);
    border-bottom: 2px dashed var(--error);
}

.slide-text.untranslated-text:hover {
    background: var(--error-light);
}

.slide-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    table-layout: fixed;
}

.slide-table td {
    border: 1px solid var(--border-medium);
    padding: var(--space-1) var(--space-2);
    vertical-align: middle;
    line-height: 1.3;
    color: var(--text-primary);
    word-break: break-word;
    overflow: hidden;
}

.slide-table .untranslated-text {
    color: var(--error);
    background: var(--error-bg);
}

.slide-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
}

.slide-preview-hint {
    margin-top: var(--space-4);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    padding: 0 var(--space-5);
    font-weight: 500;
}

.slide-preview-hint .untranslated-text {
    color: var(--error);
    font-weight: 700;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .navbar {
        padding: 0 var(--space-4);
        height: 64px;
    }

    .container {
        padding: var(--space-6) var(--space-4) var(--space-12);
    }

    .hero {
        padding: var(--space-12) var(--space-4) var(--space-10);
    }

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

    .upload-zone {
        padding: var(--space-12) var(--space-5);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .comparison-table th,
    .comparison-table td {
        padding: var(--space-3) var(--space-4);
        font-size: 0.85rem;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .preview-tabs {
        flex-wrap: wrap;
    }

    .slide-preview-wrapper {
        padding: var(--space-5);
    }
}

/* ============ Landing Page Styles ============ */
/* Hero section - dark gradient background */
.hero {
    position: relative;
    overflow: hidden;
    padding: 140px 24px 100px;
    text-align: center;
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    color: #fff;
    border-radius: 0;
    margin-bottom: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: heroFloat 6s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: #6366f1;
    top: -150px;
    left: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    bottom: -100px;
    right: -50px;
    animation-delay: 2s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #a78bfa;
    top: 50%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-size: 0.82rem;
    font-weight: 600;
    color: #a5b4fc;
    letter-spacing: 0.02em;
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    color: #fff;
    background: none;
    -webkit-text-fill-color: unset;
}

.text-gradient {
    background: linear-gradient(135deg, #818cf8, #c084fc, #f0abfc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 32px;
    background: var(--gradient-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-base);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.hero p {
    color: #cbd5e1;
    background: none;
    -webkit-text-fill-color: unset;
}

.hero h1 {
    color: #fff;
    background: none;
    -webkit-text-fill-color: unset;
}

/* ── Sections ── */
.section {
    padding: 100px 24px;
}

.section-alt {
    background: var(--bg-secondary);
}

.upload-section {
    background: var(--bg-primary);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    background: var(--primary-lighter);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-tertiary);
    font-size: 1.05rem;
    margin-bottom: 48px;
}

.section-inner>.section-badge,
.section-inner>.section-title,
.section-inner>.section-subtitle {
    text-align: center;
    display: block;
}

/* ── Steps (How it Works) ── */
.steps-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.step-card {
    flex: 0 1 280px;
    text-align: center;
    padding: 36px 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.step-num {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.step-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-card p {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
    padding: 0 16px;
    font-weight: 300;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .steps-row {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .step-arrow {
        transform: rotate(90deg);
        padding: 8px 0;
    }
}

/* ── Features Grid ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 32px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.fc-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--primary-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Upload Card ── */
.upload-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: 32px;
    box-shadow: var(--shadow-xl);
}

.lang-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 4px;
}

.lang-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-tertiary);
    transition: all var(--transition-base);
}

.lang-btn.selected {
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.lang-flag {
    font-size: 1.1em;
}

.lang-arrow {
    color: var(--primary);
    font-weight: 700;
}

.upload-btn-fake {
    display: inline-block;
    padding: 10px 28px;
    border-radius: var(--radius-full);
    background: var(--gradient-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-base);
}

.upload-zone:hover .upload-btn-fake {
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}

.uz-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

/* ── Footer ── */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 48px 24px 24px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gradient-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.footer-brand-text strong {
    color: #e2e8f0;
    display: block;
    font-weight: 700;
}

.footer-brand-text span {
    font-size: 0.82rem;
    color: #64748b;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: #e2e8f0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.82rem;
    color: #475569;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Navbar links ── */
.navbar-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-cta {
    background: var(--gradient-accent);
    color: #fff !important;
    border-radius: var(--radius-full);
    padding: 8px 20px;
    font-weight: 600;
}

.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}