/* ═══════════════════════════════════════════════════════════
   Reading Check — Design System
   ═══════════════════════════════════════════════════════════ */

:root {
    /* Colors */
    --primary: #4A6CF7;
    --primary-dark: #3B5DE7;
    --primary-light: #6B8AFF;
    --secondary: #34C759;
    --secondary-dark: #28A745;
    --accent: #FF6B6B;
    --accent-dark: #E05555;
    --warning: #FFB84D;

    /* Neutrals */
    --bg: #F0F4FF;
    --bg-alt: #E8EEFF;
    --card-bg: #FFFFFF;
    --text: #1E293B;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border: #E2E8F0;

    /* Fonts */
    --font-heading: 'Nunito', 'Segoe UI', sans-serif;
    --font-body: 'Open Sans', 'Segoe UI', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(74, 108, 247, 0.08);
    --shadow-md: 0 4px 16px rgba(74, 108, 247, 0.1);
    --shadow-lg: 0 8px 32px rgba(74, 108, 247, 0.12);
    --shadow-xl: 0 16px 48px rgba(74, 108, 247, 0.15);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 50px;

    /* Transitions */
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Reset & Base ────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ─── Header ──────────────────────────────────────────────── */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform var(--transition);
}

.logo:hover {
    transform: scale(1.03);
}

.logo-emoji {
    font-size: 1.8rem;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-alt);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding: 6px 14px;
    background: var(--bg-alt);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    background: none;
    border: none;
    z-index: 1100;
}

.burger:hover {
    background: var(--bg-alt);
}

.burger-line {
    width: 24px;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 80px 24px 24px;
        gap: 4px;
        box-shadow: var(--shadow-xl);
        transition: right 0.35s ease;
        z-index: 1050;
    }

    .nav.open {
        right: 0;
    }

    .nav-link {
        padding: 14px 16px;
        font-size: 1.05rem;
        border-radius: var(--radius-md);
    }

    .nav-user {
        margin-left: 0;
        margin-top: 8px;
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-overlay.visible {
        opacity: 1;
        visibility: visible;
    }
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.35);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.35);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
}

.btn-accent:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.15rem;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.1rem;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 8px 16px;
}

.btn-ghost:hover {
    background: var(--bg-alt);
    color: var(--text);
    box-shadow: none;
    transform: none;
}

/* ─── Hero Section ────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 4rem 2rem 3rem;
    background: linear-gradient(160deg, #fff 0%, var(--bg-alt) 50%, #e0e7ff 100%);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1.25rem 2rem;
    }
}

.hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(74, 108, 247, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(52, 199, 89, 0.06) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-image {
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    display: block;
}

/* ─── Container & Layout ──────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

/* ─── Cards ───────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-thumb {
    height: 140px;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
}

.card-thumb-beginner {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
}

.card-thumb-intermediate {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
}

.card-thumb-advanced {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
}

.card-thumb-custom {
    background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
}

.card h3 {
    font-family: var(--font-heading);
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-level {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.level-beginner {
    background: #E8F5E9;
    color: #2E7D32;
}

.level-intermediate {
    background: #FFF3E0;
    color: #E65100;
}

.level-advanced {
    background: #E3F2FD;
    color: #1565C0;
}

.level-custom {
    background: #F3E5F5;
    color: #7B1FA2;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
}

.card-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.1);
    color: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all var(--transition);
    opacity: 0;
}

.card:hover .card-delete-btn {
    opacity: 1;
}

.card-delete-btn:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

/* Upload Card */
.card-upload {
    border: 2px dashed var(--border);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    cursor: pointer;
    transition: all var(--transition);
}

.card-upload:hover {
    border-color: var(--primary);
    background: rgba(74, 108, 247, 0.03);
}

.card-upload-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition);
}

.card-upload:hover .card-upload-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.card-upload h3 {
    color: var(--text-muted);
}

.card-upload p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ─── Features Section ────────────────────────────────────── */
.features {
    padding: 3rem 0;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.feature-icon-blue {
    background: #EEF2FF;
}

.feature-icon-green {
    background: #ECFDF5;
}

.feature-icon-coral {
    background: #FEF2F2;
}

/* ─── Modal ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 460px;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.visible .modal {
    transform: translateY(0) scale(1);
}

@media (max-width: 480px) {
    .modal {
        padding: 1.5rem 1.25rem;
        width: 95%;
    }
    
    .modal-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* ─── Forms ───────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color var(--transition);
    outline: none;
    background: white;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.form-input-file {
    padding: 10px;
    cursor: pointer;
}

/* ─── Toast Notifications ─────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.4s ease, toastOut 0.4s ease 3s forwards;
    max-width: 360px;
}

.toast-success {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
}

.toast-error {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ─── Reader Interface ────────────────────────────────────── */
.reader-layout {
    display: flex;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 1.5rem auto;
    align-items: flex-start;
    padding: 0 1.5rem;
}

.reader-main {
    flex: 2;
}

.reader-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.reader-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.reader-back:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timer {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary);
    background: var(--bg-alt);
    padding: 4px 14px;
    border-radius: var(--radius-full);
}

/* Progress Bar */
.progress-wrapper {
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: var(--bg-alt);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    width: 0%;
}

/* Text Display */
.text-display {
    font-size: 1.4rem;
    line-height: 2.2;
    margin: 1.5rem 0;
    min-height: 150px;
    font-family: var(--font-body);
}

.word {
    padding: 3px 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.word:hover {
    background: var(--bg-alt);
}

.word.pending {
    color: var(--text);
}

.word.correct {
    color: var(--secondary);
    font-weight: 700;
}

.word.incorrect {
    color: var(--accent);
    text-decoration: underline wavy;
    text-underline-offset: 3px;
}

.word.current {
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    border-radius: 6px;
    font-weight: 600;
}

.word.skipped {
    color: var(--warning);
    font-style: italic;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.status-msg {
    text-align: center;
    color: var(--text-light);
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* Hint Sidebar */
.hint-sidebar {
    flex: 1;
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: sticky;
    top: 80px;
    display: none;
    animation: slideInRight 0.4s ease;
}

.hint-sidebar.visible {
    display: block;
}

.hint-sidebar h3 {
    margin-top: 0;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.hint-word {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0.75rem 0;
    color: var(--text);
    font-family: var(--font-heading);
}

.hint-translation {
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.hint-tip {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 12px;
    background: var(--bg-alt);
    border-radius: var(--radius-md);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .reader-layout {
        flex-direction: column;
    }

    .hint-sidebar {
        position: static;
        width: 100%;
    }
}

/* ─── Stats Page ──────────────────────────────────────────── */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-value-primary {
    color: var(--primary);
}

.stat-value-secondary {
    color: var(--secondary);
}

.stat-value-accent {
    color: var(--accent);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.history-table th {
    background: var(--bg-alt);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-table td {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
}

.history-table tr:hover td {
    background: var(--bg);
}

.accuracy-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
}

.accuracy-high {
    background: #ECFDF5;
    color: #059669;
}

.accuracy-mid {
    background: #FFF7ED;
    color: #EA580C;
}

.accuracy-low {
    background: #FEF2F2;
    color: #DC2626;
}

/* Problem Words */
.problem-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}

.problem-word {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #FEF2F2;
    color: var(--accent);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
}

.problem-word:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

.problem-word-count {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 1px 6px;
    border-radius: 10px;
}

/* ─── Training / Vocab Cards ─────────────────────────────── */
.vocab-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.vocab-word {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.vocab-translation {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.vocab-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.vocab-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ─── Practice Page ───────────────────────────────────────── */
.practice-word-card {
    text-align: center;
    padding: 1.5rem;
}

.practice-word-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--accent);
}

.practice-congrats {
    text-align: center;
    padding: 3rem;
    color: var(--secondary);
    font-size: 1.2rem;
    font-weight: 700;
}

/* ─── Footer ──────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    margin-top: 4rem;
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* ─── Animations ──────────────────────────────────────────── */
@keyframes popIn {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-pop {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-fade-up {
    animation: fadeInUp 0.5s ease forwards;
}

.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

/* ─── Page Title ──────────────────────────────────────────── */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ─── Results Modal ───────────────────────────────────────── */
.results-emoji {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.results-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

@media (max-width: 400px) {
    .results-stats {
        grid-template-columns: 1fr;
    }
}

.results-stat {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.results-stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary);
}

.results-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.results-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Utility ─────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}