/* ==========================================
   MEXICAN SPANISH COURSE — STYLES
   ========================================== */

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

:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --accent: #dc2626;
    --gold: #d97706;
    --purple: #7c3aed;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #fafafa;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --success: #10b981;
    --sidebar-w: 320px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   TOP PROGRESS BAR
   ========================================== */

.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: white;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-light);
    z-index: 1;
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    z-index: 1001;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-btn span {
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ==========================================
   LAYOUT
   ========================================== */

.layout {
    display: flex;
    min-height: 100vh;
    padding-top: 32px;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.sidebar {
    width: var(--sidebar-w);
    background: white;
    border-right: 1px solid var(--border);
    position: fixed;
    left: 0;
    top: 32px;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-header {
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon { font-size: 1.5rem; }
.logo-text { font-size: 1.0625rem; font-weight: 700; color: var(--text); }
.logo-accent { color: var(--primary); }

.language-switcher {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
}

.lang-btn {
    flex: 1;
    padding: 0.4rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover { background: #e5e7eb; }
.lang-btn.active { background: var(--primary); color: white; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }

/* Sidebar stats */
.sidebar-stats {
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.stats-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.stats-link:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(22,163,74,0.3); }

/* Course nav */
.course-nav { padding: 0.5rem 0 2rem; }

.module { margin-bottom: 0.25rem; }

.module-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem 0.5rem;
}

.module-header h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.module-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.175rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}

.module-badge.free { background: #dcfce7; color: #15803d; }
.module-badge.locked { background: #f3f4f6; color: #6b7280; }

.lesson-list { list-style: none; padding: 0 0.75rem; }

.lesson-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 0.125rem;
}

.lesson-item:hover { background: #f9fafb; }
.lesson-item.active { background: #f0fdf4; }
.lesson-item.completed .lesson-status { color: var(--primary); }
.lesson-item.locked { opacity: 0.6; cursor: not-allowed; }

.lesson-status {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-light);
    flex-shrink: 0;
}

.lesson-title {
    font-size: 0.8125rem;
    color: var(--text);
    line-height: 1.35;
}

.lesson-item.active .lesson-title { font-weight: 600; color: var(--primary); }

/* ==========================================
   MAIN CONTENT
   ========================================== */

.content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 2rem 3rem;
    max-width: 960px;
}

.lesson-content {
    background: white;
    border-radius: 0.75rem;
    padding: 2.5rem 3rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    min-height: 500px;
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   LESSON TYPOGRAPHY
   ========================================== */

.lesson-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.lesson-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin: 1.75rem 0 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid #f3f4f6;
}

.lesson-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}

.lesson-content p {
    margin-bottom: 1rem;
    color: #374151;
    font-size: 0.9375rem;
}

.lesson-content ul, .lesson-content ol {
    margin: 0.5rem 0 1rem 1.25rem;
}

.lesson-content li {
    margin-bottom: 0.375rem;
    color: #374151;
    font-size: 0.9375rem;
}

.lesson-number {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ==========================================
   VISUAL COMPONENTS
   ========================================== */

/* Info / Tip boxes */
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    font-size: 0.9375rem;
}

.tip-box {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-left: 4px solid var(--gold);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    font-size: 0.9375rem;
}

.tip-box strong, .info-box strong { display: block; margin-bottom: 0.25rem; }

.success-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid var(--primary);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    font-size: 0.9375rem;
}

.warning-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #ea580c;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    font-size: 0.9375rem;
}

/* Vocab cards */
.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.875rem;
    margin: 1.25rem 0;
}

.vocab-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.vocab-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.vocab-card .spanish {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.vocab-card .phonetic {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0.375rem;
}

.vocab-card .translation {
    font-size: 0.875rem;
    color: var(--text);
    font-weight: 500;
}

/* Pronunciation boxes */
.pronunciation-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
}

.pronunciation-box .letter {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    min-width: 60px;
    text-align: center;
}

.pronunciation-box .details { flex: 1; }

.pronunciation-box .sound {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.pronunciation-box .example {
    font-size: 0.875rem;
    color: var(--text-light);
}

.pronunciation-box .example span {
    font-weight: 600;
    color: var(--accent);
}

/* Pronunciation comparison rows (pron-row style) */
.pronunciation-box .pron-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 0.5rem 1rem;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #bbf7d0;
}
.pronunciation-box .pron-row:last-child { border-bottom: none; }
.pronunciation-box .pron-word {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text);
    font-style: italic;
}
.pronunciation-box .pron-es {
    font-size: 0.875rem;
    color: #dc2626;
}
.pronunciation-box .pron-mx {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
}

/* Phrase cards */
.phrase-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.phrase-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s;
}

.phrase-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(22,163,74,0.12); }

.phrase-card .es,
.phrase-card .phrase-es {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--primary);
}

.phrase-card .phrase-ru {
    font-size: 0.9375rem;
    color: var(--text);
}

.phrase-card .phonetic {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-style: italic;
    grid-column: 1;
}

.phrase-card .tr {
    font-size: 0.9375rem;
    color: var(--text);
    grid-row: 1 / 3;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.phrase-card .tr .ru { font-weight: 600; }
.phrase-card .tr .en { color: var(--text-light); font-size: 0.875rem; }

.phrase-card .note {
    grid-column: 1 / 3;
    font-size: 0.8125rem;
    color: var(--gold);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.comparison-table th {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
}

.comparison-table th:first-child { border-radius: 0; }

.comparison-table td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #f3f4f6;
    background: white;
    vertical-align: top;
}

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: #fafafa; }

.comparison-table .es-col { font-weight: 700; color: var(--primary); }
.comparison-table .mx-col { color: #15803d; font-weight: 500; }
.comparison-table .note-col { color: var(--text-light); font-style: italic; font-size: 0.8125rem; }

/* Level badges */
.level-path {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.level-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.level-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.level-badge.current { background: var(--primary); color: white; }
.level-badge.next { background: #fef3c7; color: var(--gold); border: 2px solid var(--gold); }
.level-badge.target { background: #ede9fe; color: var(--purple); border: 2px solid var(--purple); }

.level-label { font-size: 0.6875rem; font-weight: 600; color: var(--text-light); }

.level-arrow {
    font-size: 1.25rem;
    color: var(--border);
    align-self: center;
    padding: 0 0.25rem;
}

/* How-it-works steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.25rem 0;
}

.step-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 800;
    margin: 0 auto 0.75rem;
}

.step-card h4 { font-size: 0.9375rem; margin-bottom: 0.375rem; }
.step-card p { font-size: 0.8125rem; color: var(--text-light); margin: 0; }

/* Phonetic alphabet chart */
.phonetic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.625rem;
    margin: 1.25rem 0;
}

.phonetic-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.phonetic-item .letter {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.phonetic-item .sound {
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 0.125rem;
}

.phonetic-item .example {
    font-size: 0.75rem;
    color: var(--text);
    font-weight: 500;
}

/* Highlight word */
.highlight-es {
    color: var(--primary);
    font-weight: 700;
    background: #f0fdf4;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.highlight-accent {
    color: var(--accent);
    font-weight: 700;
    background: #fef2f2;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

/* Mexico vs Spain callout */
.vs-box {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    margin: 1.25rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

.vs-side {
    padding: 1.25rem;
    background: white;
}

.vs-side.mexico { background: #f0fdf4; }
.vs-side.spain { background: #fef2f2; }

.vs-side h4 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
}

.vs-side.mexico h4 { color: var(--primary); }
.vs-side.spain h4 { color: var(--accent); }

.vs-side p { font-size: 0.875rem; margin: 0; }

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border);
    width: 32px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-light);
    writing-mode: vertical-rl;
    letter-spacing: 0.1em;
}

/* ==========================================
   QUIZ
   ========================================== */

.quiz-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.quiz-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-question {
    margin-bottom: 1.25rem;
}

.quiz-question p {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.625rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 2px solid #f3f4f6;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9375rem;
    color: var(--text);
    text-align: left;
    width: 100%;
}

.quiz-option:hover:not(:disabled) {
    background: #f0fdf4;
    border-color: #86efac;
}

.quiz-option.selected { background: #eff6ff; border-color: #60a5fa; }
.quiz-option.correct { background: #f0fdf4; border-color: var(--primary); color: var(--primary-dark); }
.quiz-option.incorrect { background: #fef2f2; border-color: #fca5a5; color: var(--accent); }
.quiz-option:disabled { cursor: not-allowed; }

.quiz-option .option-letter {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.15s;
}

.quiz-option.correct .option-letter { background: var(--primary); border-color: var(--primary); color: white; }
.quiz-option.incorrect .option-letter { background: var(--accent); border-color: var(--accent); color: white; }

.quiz-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.quiz-input:focus { border-color: var(--primary); }

/* Complete button */
.complete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.25rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.complete-btn:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,0.3); }
.complete-btn:disabled { background: #9ca3af; cursor: not-allowed; transform: none; box-shadow: none; }
.complete-btn.completed { background: #10b981; }

/* ==========================================
   MODULE 1 — NEW VISUAL COMPONENTS
   ========================================== */

/* Dialogue / conversation */
.dialogue-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    padding: 1.5rem;
    margin: 1.25rem 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dialogue-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.dialogue-line {
    display: flex;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
    align-items: flex-start;
}

.dialogue-line:last-child { margin-bottom: 0; }

.dialogue-line.right { flex-direction: row-reverse; }

.dialogue-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: #f3f4f6;
}

.dialogue-bubble {
    flex: 1;
    max-width: 85%;
}

.dialogue-bubble .es {
    display: inline-block;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.625rem;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.dialogue-line.right .dialogue-bubble .es {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.dialogue-bubble .tr {
    font-size: 0.8125rem;
    color: var(--text-light);
    padding: 0 0.25rem;
}

/* Number grid */
.number-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin: 1.25rem 0;
}

.number-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    padding: 0.75rem 0.375rem;
    text-align: center;
    transition: all 0.15s;
}

.number-item:hover { border-color: var(--primary); transform: translateY(-1px); }

.number-item .num {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.number-item .word {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.number-item .pron {
    font-size: 0.6875rem;
    color: var(--text-light);
    font-style: italic;
}

.number-tens {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}

.tens-item {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: 0.625rem;
    padding: 0.875rem 0.5rem;
    text-align: center;
}

.tens-item .num { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.tens-item .word { font-size: 0.875rem; font-weight: 700; color: var(--text); }
.tens-item .pron { font-size: 0.75rem; color: var(--text-light); font-style: italic; }

/* Conjugation box */
.conjugation-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
    margin: 1.25rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.conjugation-header {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.conjugation-header .verb-inf {
    opacity: 0.85;
    font-size: 0.875rem;
    font-weight: 400;
}

.conjugation-row {
    display: grid;
    grid-template-columns: 110px 1fr 1fr;
    border-bottom: 1px solid #f3f4f6;
    padding: 0.5rem 1.25rem;
    align-items: center;
    gap: 1rem;
}

.conjugation-row:last-child { border-bottom: none; }
.conjugation-row:nth-child(even) { background: #fafafa; }

.conjugation-row .pronoun { font-size: 0.875rem; color: var(--text-light); font-style: italic; }
.conjugation-row .form { font-size: 1rem; font-weight: 700; color: var(--primary); }
.conjugation-row .meaning { font-size: 0.875rem; color: var(--text); }

/* Family grid */
.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.family-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 0.75rem;
    text-align: center;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.family-card:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 4px 10px rgba(22,163,74,0.12); }

.family-card .emoji { font-size: 2rem; margin-bottom: 0.375rem; display: block; }
.family-card .es { font-size: 0.9375rem; font-weight: 700; color: var(--primary); }
.family-card .pron { font-size: 0.6875rem; color: var(--text-light); font-style: italic; margin: 0.125rem 0; }
.family-card .tr { font-size: 0.8125rem; color: var(--text); font-weight: 500; }

/* Possessive mini-table */
.poss-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}

.poss-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.poss-item .form { font-size: 1.0625rem; font-weight: 700; color: var(--primary); min-width: 55px; }
.poss-item .meaning { font-size: 0.875rem; color: var(--text); }

/* Food grid */
.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.875rem;
    margin: 1.25rem 0;
}

.food-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: default;
}

.food-card:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(0,0,0,0.1); border-color: var(--gold); }

.food-card .emoji { font-size: 2.5rem; margin-bottom: 0.5rem; display: block; }
.food-card .name { font-size: 0.9375rem; font-weight: 700; color: var(--primary); margin-bottom: 0.2rem; }
.food-card .pron { font-size: 0.7rem; color: var(--text-light); font-style: italic; margin-bottom: 0.25rem; }
.food-card .meaning { font-size: 0.8125rem; color: var(--text); }
.food-card .spice { font-size: 0.75rem; margin-top: 0.375rem; }

/* Spice scale */
.spice-scale {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    align-items: stretch;
}

.spice-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.625rem;
    border: 2px solid;
    background: white;
    min-width: 90px;
    text-align: center;
}

.spice-item .chili { font-size: 1.25rem; line-height: 1; }
.spice-item .level { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.spice-item .word { font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.spice-item .tr { font-size: 0.75rem; color: var(--text-light); }

.spice-item.s0 { border-color: #86efac; }
.spice-item.s1 { border-color: #fde68a; }
.spice-item.s2 { border-color: #fb923c; }
.spice-item.s3 { border-color: #ef4444; }
.spice-item.s4 { border-color: #7c3aed; }

/* Pattern formula box */
.formula-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid var(--gold);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0;
    text-align: center;
}

.formula-box .formula {
    font-size: 1.1875rem;
    font-weight: 800;
    color: #92400e;
    font-family: monospace;
    letter-spacing: 0.02em;
}

.formula-box .example {
    font-size: 0.9375rem;
    color: #78350f;
    margin-top: 0.5rem;
}

/* Score feedback */
.score-feedback {
    text-align: center;
    padding: 1rem;
    border-radius: 0.625rem;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.score-feedback.perfect { background: #f0fdf4; color: var(--primary); }
.score-feedback.good { background: #fefce8; color: var(--gold); }
.score-feedback.ok { background: #fff7ed; color: #ea580c; }

.next-prompt {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
}

/* ==========================================
   NAVIGATION BUTTONS
   ========================================== */

.lesson-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-top: 1.5rem;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.nav-button:hover:not(.disabled) { border-color: var(--primary); color: var(--primary); }
.nav-button.next { background: var(--primary); color: white; border-color: var(--primary); }
.nav-button.next:hover:not(.disabled) { background: var(--primary-dark); }
.nav-button.disabled { opacity: 0.4; cursor: not-allowed; }

/* ==========================================
   PAYWALL
   ========================================== */

.paywall {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    text-align: center;
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.paywall-icon { font-size: 3rem; margin-bottom: 1rem; }
.paywall h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.paywall p { color: var(--text-light); margin-bottom: 1.5rem; }

.paywall-features {
    list-style: none;
    padding: 0;
    margin: 0 auto 1.5rem;
    max-width: 340px;
    text-align: left;
}

.paywall-features li {
    padding: 0.375rem 0;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
}

.paywall-features li::before {
    content: '✓';
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.paywall-price {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.paywall-price span { font-size: 0.9375rem; font-weight: 400; color: var(--text-light); }
.paywall-period { font-size: 0.875rem; color: var(--text-light); margin-bottom: 1.5rem; }

.paywall-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.paywall-button:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(22,163,74,0.35); }

.promo-section { margin-top: 1.25rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.promo-toggle { font-size: 0.8125rem; color: var(--text-light); cursor: pointer; text-align: center; text-decoration: underline; text-underline-offset: 3px; transition: opacity 0.2s; }
.promo-toggle:hover { color: var(--primary); }
.promo-box { margin-top: 0.75rem; }
.promo-row { display: flex; gap: 0.5rem; }
.promo-input { flex: 1; padding: 0.625rem 0.875rem; border: 1px solid var(--border); border-radius: 0.5rem; font-size: 0.9375rem; font-family: inherit; outline: none; transition: border-color 0.2s; }
.promo-input:focus { border-color: var(--primary); }
.promo-btn { padding: 0.625rem 1rem; background: var(--primary); color: white; border: none; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.promo-btn:hover { background: var(--primary-dark); }
.promo-message { margin-top: 0.5rem; font-size: 0.875rem; font-weight: 500; min-height: 1.25rem; }

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .hamburger-btn { display: flex; }
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .content { margin-left: 0; padding: 1rem; }
    .lesson-content { padding: 1.5rem 1.25rem; }
    .steps-grid { grid-template-columns: 1fr; }
    .vocab-grid { grid-template-columns: repeat(2, 1fr); }
    .phrase-card { grid-template-columns: 1fr; }
    .phrase-card .tr { grid-row: auto; grid-column: auto; }
    .vs-box { grid-template-columns: 1fr; }
    .vs-divider { width: 100%; height: 32px; writing-mode: horizontal-tb; }
    .phonetic-grid { grid-template-columns: repeat(3, 1fr); }
    .lesson-navigation { padding: 1rem 0; }
    .nav-button { padding: 0.625rem 1rem; font-size: 0.875rem; }
    .lesson-content h2 { font-size: 1.375rem; }
}

@media (max-width: 480px) {
    .vocab-grid { grid-template-columns: 1fr 1fr; }
    .phonetic-grid { grid-template-columns: repeat(2, 1fr); }
    .number-grid { grid-template-columns: repeat(4, 1fr); }
    .number-tens { grid-template-columns: repeat(2, 1fr); }
    .food-grid { grid-template-columns: repeat(2, 1fr); }
    .family-grid { grid-template-columns: repeat(3, 1fr); }
    .conjugation-row { grid-template-columns: 80px 1fr; }
    .conjugation-row .meaning { display: none; }
}
