/* Telugu Learn - Apple Design Language */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Telugu:wght@400;500;600;700&display=swap');

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

:root {
    /* Indian-inspired colors */
    --saffron: #E8702A;
    --saffron-light: #F4A460;
    --green: #2D8B4E;
    --green-light: #4CAF50;
    --gold: #D4A017;
    --red: #C62828;
    --maroon: #7B2D26;
    --purple: #6A1B9A;
    --teal: #00897B;
    
    /* Aliases for compatibility */
    --blue: var(--saffron);
    --blue-light: var(--saffron-light);
    --orange: #FF9933;
    --pink: #E91E63;
    
    /* Grays */
    --gray-50: #F9FAFB;
    --gray-100: #F2F2F7;
    --gray-200: #E5E5EA;
    --gray-300: #D1D1D6;
    --gray-400: #C7C7CC;
    --gray-500: #8E8E93;
    --gray-600: #636366;
    --gray-700: #48484A;
    --gray-800: #3A3A3C;
    --gray-900: #1C1C1E;
    
    /* Semantic colors */
    --bg: #FFFFFF;
    --bg-secondary: var(--gray-100);
    --bg-tertiary: var(--gray-200);
    --text-primary: #000000;
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    --separator: rgba(60, 60, 67, 0.12);
    --separator-opaque: var(--gray-200);
    
    /* System values */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Shadows (Apple-style soft) */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --bg-secondary: var(--gray-900);
        --bg-tertiary: var(--gray-800);
        --text-primary: #FFFFFF;
        --text-secondary: var(--gray-400);
        --text-tertiary: var(--gray-500);
        --separator: rgba(84, 84, 88, 0.65);
        --separator-opaque: var(--gray-700);
        
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.47059;
    letter-spacing: -0.022em;
}

/* Telugu typography */
.telugu-text, .telugu, .option-telugu {
    font-family: 'Noto Sans Telugu', 'Telugu MN', 'Telugu Sangam MN', 'Gautami', 'Lohit Telugu', sans-serif;
    font-weight: 500;
}

/* Preload Telugu font */
@font-face {
    font-family: 'Noto Sans Telugu';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/notosanstelugu/v26/0FlxVOGZlE2Rrtr-HmgkMWJNjJ5_RyT8.woff2) format('woff2');
    unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+200C-200D, U+25CC;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* ===== Header (Apple Navigation Bar style) ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--separator);
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(0, 0, 0, 0.72);
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 26px;
}

.logo-text {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.stats {
    display: flex;
    gap: 12px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.stat-icon {
    font-size: 14px;
    line-height: 1;
}

/* ===== User Menu ===== */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.user-avatar:hover {
    opacity: 0.8;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 8px 0;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border: 0.5px solid var(--separator);
    z-index: 200;
}

.user-dropdown.show {
    display: block;
    animation: fadeIn 0.15s ease;
}

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

.user-info {
    padding: 12px 16px;
}

.user-info strong {
    font-size: 15px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.user-info span {
    font-size: 13px;
    color: var(--text-tertiary);
}

.user-dropdown hr {
    border: none;
    border-top: 0.5px solid var(--separator);
    margin: 4px 0;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    transition: background 0.15s ease;
}

.user-dropdown a:hover {
    background: var(--bg-secondary);
}

.sign-in-btn {
    padding: 8px 16px;
    background: var(--saffron);
    color: white;
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.2s ease;
}

.sign-in-btn:hover {
    opacity: 0.85;
}

/* ===== Google Button ===== */
.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    margin-top: 16px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.google-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.google-btn:active {
    transform: translateY(0);
}

.google-btn img {
    width: 18px;
    height: 18px;
}

@media (prefers-color-scheme: dark) {
    .google-btn {
        box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 4px 12px rgba(0,0,0,0.5);
    }
    .google-btn:hover {
        box-shadow: 0 0 0 1px rgba(255,255,255,0.15), 0 8px 24px rgba(0,0,0,0.6);
    }
}

/* ===== Login Page ===== */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.login-card {
    text-align: center;
    max-width: 340px;
    width: 100%;
}

.login-card h1 {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 17px;
}

/* ===== Screens ===== */
.screen {
    display: none;
    flex: 1;
    padding: 16px;
    padding-bottom: 100px;
    overflow-y: auto;
}

.screen.active {
    display: block;
}

/* ===== Home Greeting ===== */
.home-greeting {
    padding: 20px 4px 16px;
}

.home-greeting h1 {
    font-size: 26px;
    font-weight: 700;
    font-family: 'Noto Sans Telugu', -apple-system, sans-serif;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
    background: linear-gradient(135deg, var(--saffron) 0%, var(--maroon) 50%, var(--green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-greeting p {
    font-size: 15px;
    color: var(--text-tertiary);
}

@media (prefers-color-scheme: dark) {
    .home-greeting h1 {
        background: linear-gradient(135deg, var(--saffron-light) 0%, var(--saffron) 50%, var(--green-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* ===== Screen Title ===== */
.screen-title {
    padding: 16px 4px 12px;
}

.screen-title h2 {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Noto Sans Telugu', -apple-system, sans-serif;
    color: var(--text-primary);
}

.screen-title-sub {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-tertiary);
    font-family: -apple-system, sans-serif;
    margin-left: 8px;
}

/* ===== Section Headers ===== */
.path-container h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
    padding: 0 4px;
}

/* ===== Lesson Cards (Apple List style) ===== */
.lesson-path {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.lesson-node {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg);
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 0.5px solid var(--separator);
}

.lesson-node:last-child {
    border-bottom: none;
}

.lesson-node:hover {
    background: var(--bg-secondary);
}

.lesson-node:active {
    background: var(--bg-tertiary);
}

.lesson-node.completed {
    /* Subtle completion indicator via icon */
}

.lesson-node.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.lesson-node.locked:hover {
    background: var(--bg);
}

.lesson-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.lesson-node.completed .lesson-icon {
    background: var(--green);
}

.lesson-info {
    flex: 1;
    min-width: 0;
}

.lesson-title {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.lesson-desc {
    font-size: 14px;
    color: var(--text-tertiary);
}

.lesson-badge {
    font-size: 17px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.lesson-node.completed .lesson-badge {
    color: var(--green);
}

/* ===== Lesson Header ===== */
.lesson-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
    padding: 0 4px;
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.back-btn:hover {
    background: var(--bg-tertiary);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    width: 0%;
}

.lesson-hearts {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 15px;
    color: var(--red);
}

/* ===== Exercise ===== */
.exercise {
    animation: slideUp 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.exercise-instruction {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.exercise-prompt {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 20px 16px;
    margin-bottom: 14px;
    text-align: center;
}

.telugu-text {
    font-size: 42px;
    margin-bottom: 4px;
    font-family: 'Noto Sans Telugu', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
}

.romanization {
    font-size: 17px;
    color: var(--text-tertiary);
    font-style: italic;
}

.audio-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--saffron);
    color: white;
    font-size: 22px;
    cursor: pointer;
    margin: 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.audio-btn:hover {
    opacity: 0.85;
}

.audio-btn:active {
    transform: scale(0.95);
}

/* ===== Options (Apple Buttons) ===== */
.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.option-btn {
    padding: 12px 10px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--separator-opaque);
    background: var(--bg);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.option-btn:hover {
    background: var(--bg-secondary);
}

.option-btn:active {
    background: var(--bg-tertiary);
}

.option-btn.selected {
    border-color: var(--saffron);
    background: rgba(232, 112, 42, 0.08);
}

.option-btn.correct {
    border-color: var(--green);
    background: rgba(52, 199, 89, 0.12);
}

.option-btn.incorrect {
    border-color: var(--red);
    background: rgba(255, 59, 48, 0.12);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.option-btn.disabled {
    pointer-events: none;
}

/* ===== Primary Button (Apple style) ===== */
.check-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-lg);
    border: none;
    background: var(--green);
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.check-btn:hover {
    opacity: 0.9;
}

.check-btn:active {
    transform: scale(0.98);
}

.check-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
}

.continue-btn {
    background: var(--saffron);
}

/* ===== Feedback Banner (inline) ===== */
.feedback {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    animation: feedbackPop 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes feedbackPop {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.feedback.correct {
    background: var(--green);
    color: white;
}

.feedback.incorrect {
    background: var(--red);
    color: white;
}

.feedback-icon {
    font-size: 32px;
}

.feedback-text {
    flex: 1;
}

.feedback h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

/* ===== Complete Screen ===== */
.complete-content {
    text-align: center;
    padding-top: 80px;
}

.complete-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: scaleIn 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.complete-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.complete-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
}

.complete-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 34px;
    font-weight: 700;
    color: var(--green);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.primary-btn {
    padding: 16px 48px;
    border-radius: var(--radius-lg);
    border: none;
    background: var(--saffron);
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.primary-btn:hover {
    opacity: 0.9;
}

.primary-btn:active {
    transform: scale(0.98);
}

/* ===== Alphabet Screen ===== */
.screen-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.screen-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.alphabet-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
    padding: 2px;
    border-radius: var(--radius-md);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border-radius: calc(var(--radius-md) - 2px);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--bg);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.alphabet-grid {
    display: flex;
    flex-direction: column;
}

.letter-card {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.letter-card:hover {
    background: var(--bg-secondary);
}

.letter-card:active {
    transform: scale(0.96);
}

.letter-card .telugu {
    font-size: 28px;
    margin-bottom: 4px;
    font-family: 'Noto Sans Telugu', sans-serif;
    font-weight: 600;
}

.letter-card .roman {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ===== Practice Screen ===== */
#practice-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.practice-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 0.5px solid var(--separator);
}

.practice-card:last-child {
    border-bottom: none;
}

.practice-card:hover {
    background: var(--bg-secondary);
}

.practice-card:active {
    background: var(--bg-tertiary);
}

.practice-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.practice-icon.listen {
    background: rgba(232, 112, 42, 0.12);
}

.practice-icon.speak {
    background: rgba(255, 149, 0, 0.12);
}

.practice-icon.write {
    background: rgba(175, 82, 222, 0.12);
}

.practice-info h3 {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 2px;
}

.practice-info p {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* ===== Bottom Tab Bar (Apple style) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--separator);
    max-width: 480px;
    margin: 0 auto;
}

@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(0, 0, 0, 0.72);
    }
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 20px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease;
}

.nav-btn.active {
    color: var(--saffron);
}

.nav-icon {
    font-size: 24px;
}

/* ===== Intro Card ===== */
.intro-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 24px;
}

.intro-card .telugu-large {
    font-size: 64px;
    font-family: 'Noto Sans Telugu', sans-serif;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--blue);
}

.intro-card .romanization {
    font-size: 20px;
    margin-bottom: 8px;
}

.intro-card .english {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
}

.intro-card .explanation {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-md);
}

/* ===== Option with Transliteration ===== */
.option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.option-telugu {
    font-family: 'Noto Sans Telugu', sans-serif;
    font-size: 20px;
    font-weight: 500;
}

.option-roman {
    font-size: 13px;
    color: var(--text-tertiary);
    font-style: italic;
}

/* ===== Intro Card Styles ===== */
.intro-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-card .telugu-text {
    font-size: 48px;
    margin-bottom: 4px;
    color: var(--saffron);
}

.intro-card .audio-btn {
    margin: 16px 0;
}

.intro-english {
    font-size: 20px;
    font-weight: 600;
    margin: 10px 0 8px;
    color: var(--text-primary);
}

.intro-explanation {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    text-align: center;
    padding: 10px;
    background: var(--bg);
    border-radius: var(--radius-md);
    margin-top: 4px;
}

.prompt-english {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 16px 0;
}

/* ===== Icon Styles ===== */
.lesson-icon svg,
.practice-icon svg,
.lesson-badge svg {
    width: 24px;
    height: 24px;
}

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

.lesson-node.completed .lesson-icon {
    color: white;
}

.lesson-badge {
    color: var(--text-tertiary);
}

.lesson-node.completed .lesson-badge {
    color: var(--green);
}

.audio-btn svg {
    width: 28px;
    height: 28px;
}

/* ===== Profile Screen ===== */
.profile-header {
    text-align: center;
    padding: 32px 0 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-email {
    font-size: 15px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.profile-level-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--saffron) 0%, var(--maroon) 100%);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(232, 112, 42, 0.3);
}

.profile-xp-bar {
    position: relative;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.profile-xp-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--saffron) 0%, var(--gold) 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
    min-width: 8px;
}

.profile-xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
    white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
    .profile-xp-text {
        text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }
}

.profile-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.profile-stat-card {
    flex: 1;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
}

.profile-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--saffron);
    margin-bottom: 4px;
}

.profile-stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.profile-section {
    margin-bottom: 24px;
}

.profile-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
    padding: 0 4px;
}

.profile-progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.profile-progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.profile-progress-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-menu {
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.profile-menu-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 15px;
    border-bottom: 0.5px solid var(--separator);
}

.profile-menu-item:last-child {
    border-bottom: none;
}

.profile-menu-item span:last-child {
    color: var(--text-tertiary);
}

.profile-logout {
    display: block;
    text-align: center;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    color: var(--red);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.profile-logout:hover {
    opacity: 0.8;
}

/* Delete Account Button */
.profile-delete-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    margin-top: 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-delete-btn:hover {
    color: #EF4444;
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.05);
}

/* Delete Account Modal */
.delete-modal-content {
    text-align: center;
    padding: 24px;
}

.delete-modal-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.delete-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.delete-modal-warning {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.delete-modal-label {
    display: block;
    font-size: 14px;
    margin-top: 16px;
    margin-bottom: 8px;
    text-align: left;
}

.delete-confirm-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md, 8px);
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.delete-confirm-input:focus {
    outline: none;
    border-color: #EF4444;
}

.delete-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.delete-modal-cancel {
    flex: 1;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 8px);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
}

.delete-modal-cancel:hover {
    background: var(--bg-secondary, #f5f5f5);
}

.delete-modal-confirm {
    flex: 1;
    padding: 12px;
    background: #EF4444;
    color: white;
    border: none;
    border-radius: var(--radius-md, 8px);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-modal-confirm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.delete-modal-confirm:not(:disabled):hover {
    background: #DC2626;
}

.profile-login {
    text-align: center;
    padding: 60px 24px;
}

.profile-login h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 20px 0 8px;
}

.profile-login p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 24px;
}

/* ===== Landing Page ===== */
.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px;
    background: var(--bg);
}

.landing-page > * {
    width: 100%;
    max-width: 480px;
}

.landing-hero {
    text-align: center;
    padding: 60px 0 32px;
}

.landing-logo {
    font-size: 64px;
    margin-bottom: 8px;
}

.landing-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--saffron) 0%, var(--maroon) 50%, var(--green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-subtitle {
    font-size: 22px;
    font-family: 'Noto Sans Telugu', sans-serif;
    color: var(--saffron);
    font-weight: 500;
    margin-bottom: 8px;
}

.landing-tagline {
    font-size: 17px;
    color: var(--text-secondary);
}

.landing-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.landing-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(232, 112, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--saffron);
}

.feature-telugu-icon {
    font-family: 'Noto Sans Telugu', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--saffron);
}

.feature-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.feature-text p {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.landing-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.landing-google-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.landing-preview-link {
    font-size: 15px;
    color: var(--saffron);
    text-decoration: none;
    font-weight: 500;
}

.landing-preview-link:hover {
    text-decoration: underline;
}

.landing-footer {
    text-align: center;
    padding: 16px 0 32px;
}

.landing-footer p {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Landing Page - Tablet */
@media (min-width: 768px) {
    .landing-page > * {
        max-width: 560px;
    }
    
    .landing-hero {
        padding: 80px 0 48px;
    }
    
    .landing-logo {
        font-size: 80px;
    }
    
    .landing-title {
        font-size: 48px;
    }
    
    .landing-subtitle {
        font-size: 28px;
    }
    
    .landing-tagline {
        font-size: 20px;
    }
    
    .landing-features {
        gap: 24px;
        margin-bottom: 48px;
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
    }
    
    .feature-text h3 {
        font-size: 18px;
    }
    
    .feature-text p {
        font-size: 15px;
    }
    
    .landing-google-btn {
        max-width: 320px;
    }
}

/* Landing Page - Desktop */
@media (min-width: 1024px) {
    .landing-page {
        justify-content: center;
        padding: 40px 24px;
    }
    
    .landing-page > * {
        max-width: 640px;
    }
    
    .landing-hero {
        padding: 0 0 48px;
    }
    
    .landing-logo {
        font-size: 96px;
    }
    
    .landing-title {
        font-size: 56px;
    }
    
    .landing-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 40px;
    }
    
    .landing-feature:last-child {
        grid-column: span 2;
        justify-self: center;
        max-width: 280px;
    }
}

/* ===== Modal Overlay ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: var(--bg);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-tertiary);
    cursor: pointer;
}

/* ===== Streak Modal ===== */
.streak-modal-fire {
    font-size: 56px;
    margin-bottom: 8px;
}

.streak-modal-count {
    font-size: 48px;
    font-weight: 800;
    color: var(--saffron);
}

.streak-modal-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.streak-modal-msg {
    font-size: 15px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.streak-week {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.streak-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.streak-day-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
}

.streak-day-dot {
    font-size: 18px;
    color: var(--text-tertiary);
}

.streak-day.practiced .streak-day-dot {
    color: var(--saffron);
}

.streak-day.today {
    opacity: 1;
}

.streak-day.today .streak-day-name {
    color: var(--saffron);
    font-weight: 700;
}

/* ===== XP Animation ===== */
.xp-float {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    font-weight: 800;
    color: var(--gold);
    z-index: 400;
    animation: xpFly 2s ease-out forwards;
    pointer-events: none;
}

@keyframes xpFly {
    0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-80px) scale(1.3); }
}

/* ===== Confetti ===== */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    pointer-events: none;
    z-index: 500;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ===== Daily Goal ===== */
.daily-goal {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.daily-goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.daily-goal-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.daily-goal-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--green);
}

.daily-goal-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.daily-goal-fill {
    height: 100%;
    background: var(--green);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* ===== Level Badge ===== */
.level-badge {
    font-size: 13px;
    font-weight: 700;
    color: var(--saffron);
    background: rgba(232, 112, 42, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ===== Flashcard ===== */
.flashcard {
    perspective: 600px;
    cursor: pointer;
    margin-bottom: 20px;
}

.flashcard-front,
.flashcard-back {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    backface-visibility: hidden;
    transition: transform 0.5s ease;
}

.flashcard-back {
    display: none;
}

.flashcard.flipped .flashcard-front {
    display: none;
}

.flashcard.flipped .flashcard-back {
    display: block;
    animation: flipIn 0.4s ease;
}

@keyframes flipIn {
    0% { opacity: 0; transform: rotateY(90deg); }
    100% { opacity: 1; transform: rotateY(0); }
}

.flashcard-english {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 12px;
}

.flashcard-actions {
    display: flex;
    gap: 10px;
}

.flashcard-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.flashcard-btn.still-learning {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.flashcard-btn.know-it {
    background: var(--green);
    color: white;
}

/* ===== Practice Session ===== */
.practice-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.practice-score {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.listen-hint {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.large-audio {
    width: 80px !important;
    height: 80px !important;
}

/* ===== Hearts Modal ===== */
.hearts-modal-icon {
    margin-bottom: 8px;
}

.hearts-modal-count {
    font-size: 48px;
    font-weight: 800;
    color: var(--red);
}

.hearts-modal-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hearts-modal-timer {
    font-size: 15px;
    color: var(--saffron);
    font-weight: 500;
    margin-bottom: 8px;
}

.hearts-modal-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* ===== Letter Detail Modal ===== */
.letter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.letter-modal-content {
    background: var(--bg);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    max-width: 320px;
    width: 100%;
}

.letter-modal-telugu {
    font-size: 80px;
    font-family: 'Noto Sans Telugu', sans-serif;
    font-weight: 600;
    color: var(--saffron);
}

.letter-modal-roman {
    font-size: 24px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 8px;
}

.letter-modal-tip {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 16px;
}

/* ===== Alphabet Group Cards ===== */
.alpha-groups {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.alpha-group-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 0.5px solid var(--separator);
}

.alpha-group-card:last-child {
    border-bottom: none;
}

.alpha-group-card:hover {
    background: var(--bg-secondary);
}

.alpha-group-card.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.alpha-group-card.locked:hover {
    background: var(--bg);
}

.alpha-group-card.completed {
    /* completed styling via status icon */
}

.alpha-group-letters {
    display: flex;
    gap: 2px;
    width: 100px;
    flex-shrink: 0;
}

.alpha-group-letter {
    font-family: 'Noto Sans Telugu', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--saffron);
}

.alpha-group-card.completed .alpha-group-letter {
    color: var(--green);
}

.alpha-group-info {
    flex: 1;
}

.alpha-group-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1px;
}

.alpha-group-count {
    font-size: 13px;
    color: var(--text-tertiary);
}

.alpha-group-status {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.alpha-group-card.completed .alpha-group-status {
    color: var(--green);
}

.alpha-reference-header {
    padding: 0 4px;
    margin-bottom: 10px;
}

.alpha-reference-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.alphabet-grid-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

/* ===== Responsive ===== */
@media (max-width: 400px) {
    .options {
        grid-template-columns: 1fr;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .telugu-text {
        font-size: 44px;
    }
    
    .exercise-instruction {
        font-size: 24px;
    }
}

/* ===== Scrollbar (minimal) ===== */
::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* ============================================
   RESPONSIVE — TABLET & DESKTOP
   Premium web app experience
   ============================================ */

/* === Layout Variables for Responsive === */
:root {
    --sidebar-width: 260px;
    --max-content-width: 1200px;
    --nav-height: 64px;
}

/* === Bottom Navigation (Mobile Only) === */
.bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 0.5px solid var(--separator);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 100;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 16px;
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.nav-item.active {
    color: var(--saffron);
}

.nav-item.active svg {
    stroke: var(--saffron);
    fill: var(--saffron);
    fill-opacity: 0.15;
}

/* === Desktop Sidebar Navigation === */
.sidebar-nav {
    display: none;
}

/* ============================================
   TABLET — 768px to 1023px
   ============================================ */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }

    #app {
        max-width: 100%;
        display: grid;
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto 1fr;
        min-height: 100vh;
    }

    /* Header spans full width on tablet */
    .header {
        grid-column: 1 / -1;
        padding: 12px 24px;
        height: var(--nav-height);
    }

    /* Sidebar Navigation - Icon-only on tablet */
    .bottom-nav {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        bottom: 0;
        width: 80px;
        background: var(--bg);
        border-right: 0.5px solid var(--separator);
        padding: 16px 0;
        gap: 4px;
        z-index: 50;
    }

    .sidebar-nav .nav-item {
        flex-direction: column;
        padding: 12px 8px;
        border-radius: var(--radius-md);
        margin: 0 8px;
    }

    .sidebar-nav .nav-item svg {
        width: 28px;
        height: 28px;
    }

    .sidebar-nav .nav-item span {
        font-size: 9px;
        margin-top: 4px;
    }

    .sidebar-nav .nav-item:hover {
        background: var(--bg-secondary);
    }

    .sidebar-nav .nav-item.active {
        background: rgba(232, 112, 42, 0.1);
    }

    /* Main content area */
    #main-content {
        margin-left: 80px;
        padding-bottom: 32px;
    }

    .screen {
        padding: 24px 32px;
        max-width: 900px;
        margin: 0 auto;
    }

    /* Lesson cards in a grid on tablet */
    .lesson-path {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        background: none;
        box-shadow: none;
    }

    .lesson-node {
        background: var(--bg);
        border-radius: var(--radius-lg);
        border: 1px solid var(--separator);
        box-shadow: var(--shadow-sm);
        padding: 18px 20px;
    }

    .lesson-node:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .lesson-node:last-child {
        border-bottom: 1px solid var(--separator);
    }

    /* Alphabet grid - more columns on tablet */
    .alphabet-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }

    .alphabet-grid-inner {
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
    }

    /* Alpha group cards in grid */
    .alpha-groups {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        background: none;
        box-shadow: none;
    }

    .alpha-group-card {
        background: var(--bg);
        border-radius: var(--radius-lg);
        border: 1px solid var(--separator);
        box-shadow: var(--shadow-sm);
    }

    .alpha-group-card:last-child {
        border-bottom: 1px solid var(--separator);
    }

    /* Profile stats - larger on tablet */
    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .profile-stat-card {
        padding: 24px;
    }

    .profile-stat-value {
        font-size: 32px;
    }

    /* Practice cards grid */
    .practice-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Modals larger on tablet */
    .modal-content {
        max-width: 480px;
        padding: 32px;
    }

    .letter-modal-content {
        max-width: 400px;
        padding: 40px 32px;
    }

    /* Lesson screen - centered with max-width */
    #lesson-screen,
    #practice-session-screen {
        max-width: 700px;
    }

    .lesson-content {
        padding: 32px;
    }

    .exercise-card {
        padding: 40px 32px;
        border-radius: var(--radius-xl);
    }

    .telugu-text {
        font-size: 72px;
    }

    .options {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* ============================================
   DESKTOP — 1024px and above
   ============================================ */
@media (min-width: 1024px) {
    #app {
        grid-template-columns: var(--sidebar-width) 1fr;
    }

    .header {
        padding: 12px 40px;
    }

    .header-right {
        gap: 20px;
    }

    .stats {
        gap: 20px;
    }

    .stat {
        font-size: 15px;
        gap: 5px;
    }

    /* Full sidebar with labels on desktop */
    .sidebar-nav {
        width: var(--sidebar-width);
        padding: 24px 16px;
        gap: 8px;
    }

    .sidebar-nav .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 14px 16px;
        font-size: 15px;
        font-weight: 500;
    }

    .sidebar-nav .nav-item svg {
        width: 24px;
        height: 24px;
    }

    .sidebar-nav .nav-item span {
        font-size: 15px;
        margin-top: 0;
    }

    #main-content {
        margin-left: var(--sidebar-width);
    }

    .screen {
        padding: 32px 48px;
        max-width: var(--max-content-width);
    }

    /* Home greeting - larger on desktop */
    .home-greeting h1 {
        font-size: 36px;
    }

    .home-greeting p {
        font-size: 17px;
    }

    /* Lesson path - 3 column grid on desktop */
    .lesson-path {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .lesson-node {
        padding: 22px 24px;
    }

    .lesson-icon {
        width: 52px;
        height: 52px;
        font-size: 26px;
    }

    .lesson-title {
        font-size: 18px;
    }

    .lesson-desc {
        font-size: 15px;
    }

    /* Alphabet - more columns on desktop */
    .alphabet-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 14px;
    }

    .alphabet-grid-inner {
        grid-template-columns: repeat(8, 1fr);
        gap: 12px;
    }

    .alpha-card {
        padding: 20px 16px;
    }

    .alpha-telugu {
        font-size: 36px;
    }

    /* Alpha groups - 3 columns on desktop */
    .alpha-groups {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .alpha-group-card {
        padding: 18px 22px;
    }

    .alpha-group-letter {
        font-size: 24px;
    }

    /* Profile section - wider layout */
    .profile-header {
        padding: 40px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 28px;
    }

    .profile-stats {
        gap: 24px;
    }

    .profile-stat-card {
        padding: 28px;
    }

    .profile-stat-value {
        font-size: 36px;
    }

    .profile-section {
        padding: 24px;
    }

    /* Lesson/Exercise screen - premium centered layout */
    #lesson-screen,
    #practice-session-screen {
        max-width: 800px;
        padding: 40px;
    }

    .lesson-header {
        padding: 16px 24px;
    }

    .lesson-content {
        padding: 48px;
    }

    .exercise-card {
        padding: 60px 48px;
        max-width: 700px;
        margin: 0 auto;
    }

    .telugu-text {
        font-size: 96px;
    }

    .exercise-instruction {
        font-size: 32px;
    }

    .romanization {
        font-size: 22px;
    }

    .options {
        max-width: 600px;
        gap: 14px;
    }

    .option {
        padding: 18px 24px;
        font-size: 16px;
    }

    .option-telugu {
        font-size: 26px;
    }

    /* Daily goal card */
    .daily-goal {
        max-width: 400px;
    }

    /* Modals - larger and more spacious */
    .modal-content {
        max-width: 520px;
        padding: 40px;
    }

    .letter-modal-content {
        max-width: 440px;
        padding: 48px 40px;
    }

    .letter-modal-telugu {
        font-size: 100px;
    }

    .letter-modal-roman {
        font-size: 28px;
    }

    /* Complete screen - larger on desktop */
    .complete-content {
        padding: 60px 48px;
        max-width: 500px;
        margin: 0 auto;
    }

    .complete-icon svg {
        width: 100px;
        height: 100px;
    }

    .complete-content h2 {
        font-size: 32px;
    }

    .complete-stat .stat-value {
        font-size: 36px;
    }
}

/* ============================================
   LARGE DESKTOP — 1440px and above
   ============================================ */
@media (min-width: 1440px) {
    .screen {
        padding: 40px 64px;
    }

    /* 4 column lesson grid on large screens */
    .lesson-path {
        grid-template-columns: repeat(4, 1fr);
    }

    .alphabet-grid {
        grid-template-columns: repeat(10, 1fr);
    }

    .alphabet-grid-inner {
        grid-template-columns: repeat(10, 1fr);
    }
}

/* ============================================
   TOUCH TARGETS — iPad optimization
   ============================================ */
@media (min-width: 768px) and (pointer: coarse) {
    /* Larger touch targets on tablets */
    .lesson-node {
        min-height: 80px;
    }

    .alpha-card {
        min-height: 80px;
    }

    .alpha-group-card {
        min-height: 72px;
    }

    .nav-item {
        min-height: 56px;
        min-width: 56px;
    }

    .option {
        min-height: 60px;
    }

    .btn, .primary-btn, .secondary-btn {
        min-height: 52px;
        padding: 14px 28px;
    }
}

/* ============================================
   PRINT STYLES — Hide navigation
   ============================================ */
@media print {
    .header,
    .bottom-nav,
    .sidebar-nav {
        display: none !important;
    }

    #app {
        display: block;
    }

    #main-content {
        margin-left: 0;
    }
}

/* ============================================
   LANGUAGE SELECTION STYLES
   ============================================ */

.language-select-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.language-select-header {
    text-align: center;
    margin-bottom: 40px;
}

.language-select-header h1 {
    font-size: 28px;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.language-select-header p {
    color: #86868b;
    font-size: 16px;
}

.language-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.language-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 2px solid #e8e8ed;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-card:hover {
    border-color: #E8702A;
    background: #fef7f3;
}

.language-card.selected {
    border-color: #E8702A;
    background: #fef7f3;
}

.language-card.selected::after {
    content: '✓';
    margin-left: auto;
    width: 24px;
    height: 24px;
    background: #E8702A;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.language-flag {
    font-size: 40px;
    line-height: 1;
}

.language-info {
    flex: 1;
}

.language-name {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.language-native {
    font-size: 14px;
    color: #86868b;
}

.language-meta {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 12px;
}

.language-meta span {
    color: #86868b;
    background: #f5f5f7;
    padding: 2px 8px;
    border-radius: 4px;
}

.language-start-btn {
    width: 100%;
    margin-top: 20px;
    padding: 16px;
    background: #E8702A;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.language-start-btn:hover {
    background: #d4621f;
}

/* Language badge in header */
.current-language-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f7;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 12px;
}

.current-language-badge:hover {
    background: #e8e8ed;
}

.current-language-badge .flag {
    font-size: 16px;
}

.current-language-badge .name {
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
}

/* =============================================
   DESKTOP RESPONSIVE STYLES
   ============================================= */

/* Login/Landing page - desktop */
@media (min-width: 768px) {
    .landing-page {
        max-width: 600px;
        margin: 0 auto;
        padding: 60px 40px;
    }
    
    .landing-hero {
        text-align: center;
        margin-bottom: 40px;
    }
    
    .landing-title {
        font-size: 56px !important;
    }
    
    .landing-subtitle, .landing-tagline {
        font-size: 18px;
    }
    
    .language-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin: 40px 0;
    }
    
    .language-preview-card {
        text-align: center;
        padding: 30px 20px;
    }
    
    .language-preview-card .flag {
        font-size: 64px;
    }
    
    .features-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .login-actions {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Main app - desktop */
@media (min-width: 768px) {
    .app-container {
        max-width: 480px;
        margin: 0 auto;
        min-height: 100vh;
        box-shadow: 0 0 40px rgba(0,0,0,0.1);
        position: relative;
    }
    
    body {
        background: #f5f5f7;
    }
    
    .header {
        border-radius: 0;
    }
    
    .nav {
        border-radius: 0 0 0 0;
        max-width: 480px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .home-greeting h1 {
        font-size: 32px;
    }
    
    .lesson-node {
        padding: 16px 20px;
    }
}

/* Large desktop - show even more centered */
@media (min-width: 1024px) {
    .login-container {
        max-width: 700px;
        padding: 80px 60px;
    }
    
    .language-preview-card .flag {
        font-size: 72px;
    }
    
    .features-grid {
        max-width: 700px;
    }
}

/* Language current indicator */
.language-current {
    font-size: 12px;
    color: #34C759;
    font-weight: 600;
    margin-top: 4px;
}

.language-card.selected {
    border-color: #34C759;
    background: #f0fff4;
}

.language-card.selected::after {
    background: #34C759;
}

/* Switch language button */
.switch-lang-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: #E8702A;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.switch-lang-btn:active {
    background: #d4621f;
    transform: scale(0.98);
}
