@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

/* CSS Variables & Design System — DPS Sharjah */
:root {
    --primary: #8B1A1A;
    --primary-dark: #6B1212;
    --primary-light: #F9E8E8;
    --secondary: #C5A572;
    --secondary-dark: #A68B5B;
    --school-navy: #1B365D;
    --school-navy-light: #E8EEF5;
    --success: #58CC02;
    --success-dark: #46A302;
    --success-light: #EBF8E0;
    --error: #FF4B4B;
    --error-dark: #EA2B2B;
    --error-light: #FFEAEA;
    --info: #1CB0F6;
    --info-dark: #1899D6;
    --info-light: #E8F7FE;
    --purple: #8B5CF6;
    --purple-dark: #7C3AED;
    --purple-light: #F3E8FF;
    
    /* Light Mode Default Variables */
    --bg-main: #F4F7FB;
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --text-title: #2C3E50;
    --text-body: #4A5568;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --font-hindi: 'Baloo 2', cursive, sans-serif;
    --font-ui: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-main: #0F172A;
    --bg-card: #1E293B;
    --bg-sidebar: #1E293B;
    --text-title: #F8FAFC;
    --text-body: #CBD5E1;
    --text-light: #94A3B8;
    --border-color: #334155;
    --primary-light: rgba(255, 125, 102, 0.15);
    --success-light: rgba(88, 204, 2, 0.15);
    --error-light: rgba(255, 75, 75, 0.15);
    --info-light: rgba(28, 176, 246, 0.15);
    --purple-light: rgba(139, 92, 246, 0.15);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, border-color 0.3s;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-main);
    color: var(--text-body);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui);
    color: var(--text-title);
    font-weight: 700;
}

.hindi-text {
    font-family: var(--font-hindi);
    font-weight: 600;
    line-height: 1.4;
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 3px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 24px 12px;
    border-bottom: 2px dashed var(--border-color);
    margin-bottom: 24px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--school-navy), var(--primary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(27, 54, 93, 0.25);
    font-family: var(--font-hindi);
}

.logo-text h1 {
    font-size: 20px;
    color: var(--school-navy);
    -webkit-text-fill-color: var(--school-navy);
}

.logo-text span {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-body);
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item:hover {
    background-color: var(--bg-main);
    transform: translateX(4px);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* Sidebar Footer (Theme Toggle & User Settings) */
.sidebar-footer {
    padding-top: 16px;
    border-top: 2px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    background-color: transparent;
    color: var(--text-body);
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-ui);
}

.theme-toggle-btn:hover {
    background-color: var(--bg-main);
}

.reset-sidebar-btn:hover {
    border-color: var(--error);
    color: var(--error);
    background-color: var(--error-light);
}

.profile-sidebar-btn:hover {
    border-color: var(--school-navy);
    color: var(--school-navy);
    background-color: var(--school-navy-light);
}

.install-sidebar-btn:hover {
    border-color: var(--success);
    color: var(--success);
    background-color: var(--success-light);
}

.user-settings-card {
    margin-top: 16px;
}

.user-settings-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.45;
    margin-bottom: 14px;
}

.user-settings-btn {
    width: 100%;
    margin-bottom: 8px;
    border: 2px solid var(--error) !important;
    color: var(--error) !important;
    background: transparent !important;
    font-size: 13px;
    padding: 10px 14px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.user-settings-btn.profile {
    border-color: var(--border-color) !important;
    color: var(--text-body) !important;
    margin-bottom: 0;
}

.user-settings-btn:hover {
    background: var(--error-light) !important;
}

.user-settings-btn.profile:hover {
    background: var(--bg-main) !important;
    border-color: var(--school-navy) !important;
    color: var(--school-navy) !important;
}

.user-settings-btn.install-btn {
    border-color: var(--success) !important;
    color: var(--success) !important;
}

.user-settings-btn.install-btn:hover {
    background: var(--success-light) !important;
    border-color: var(--success-dark) !important;
    color: var(--success-dark) !important;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar Stats */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.top-bar-stats {
    display: flex;
    gap: 20px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-card);
    padding: 10px 18px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
    color: var(--text-title);
    font-size: 15px;
}

.stat-pill.xp i { color: var(--secondary); }
.stat-pill.streak i { color: var(--primary); }
.stat-pill.level i { color: var(--purple); }

/* Playful Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-bottom: 4px solid rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.1s ease;
    text-transform: uppercase;
}

.btn:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover { background-color: var(--primary-dark); }

.btn-success {
    background-color: var(--success);
    color: white;
}
.btn-success:hover { background-color: var(--success-dark); }

.btn-info {
    background-color: var(--info);
    color: white;
}
.btn-info:hover { background-color: var(--info-dark); }

.btn-purple {
    background-color: var(--purple);
    color: white;
}
.btn-purple:hover { background-color: var(--purple-dark); }

/* Viewports (Pages) */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.view-section.active {
    display: block;
}

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

/* Dashboard Home Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--primary-light), var(--purple-light));
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.welcome-text h2 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--text-title);
}

.welcome-text p {
    font-size: 16px;
    color: var(--text-body);
    max-width: 480px;
    line-height: 1.5;
}

.welcome-banner .mascot-img {
    font-size: 80px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Mode Cards Grid */
.module-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.module-card {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.module-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.module-card.card-vocab { border-color: #2d9a6e; }
.module-card.card-grammar { border-color: var(--info); }
.module-card.card-sentence { border-color: var(--primary); }
.module-card.card-story { border-color: var(--success); }
.module-card.card-muhavara { border-color: var(--secondary); }
.module-card.card-kavita { border-color: var(--purple); }
.module-card.card-match { border-color: #E2E8F0; }

.module-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.card-vocab .card-icon { background-color: #2d9a6e; }
.card-grammar .card-icon { background-color: var(--info); }
.card-sentence .card-icon { background-color: var(--primary); }
.card-story .card-icon { background-color: var(--success); }
.card-muhavara .card-icon { background-color: var(--secondary); }
.card-kavita .card-icon { background-color: var(--purple); }
.card-match .card-icon { background: linear-gradient(135deg, var(--primary), var(--secondary)); }

.module-card h3 {
    font-size: 20px;
    margin-top: 8px;
}

.module-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Badges Showcase Panel */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.panel-card {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.panel-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    cursor: help;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.badge-item.unlocked {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.badge-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    background-color: var(--bg-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    position: relative;
}

.badge-item.unlocked .badge-icon {
    border-color: var(--secondary);
    background: radial-gradient(circle, var(--success-light) 0%, var(--bg-card) 100%);
}

.badge-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-body);
}

/* Info Tabs / Subviews Layout */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title h2 {
    font-size: 26px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tab-nav {
    display: flex;
    gap: 12px;
    background-color: var(--border-color);
    padding: 6px;
    border-radius: var(--radius-sm);
    width: fit-content;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    border-radius: calc(var(--radius-sm) - 4px);
    font-family: var(--font-ui);
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text-body);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Grammar cheat sheets */
.grammar-shelf {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.grammar-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.grammar-topic-card {
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}

.grammar-topic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--school-navy);
}

.grammar-topic-card .topic-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 24px;
    color: white;
}

.grammar-topic-card h4 {
    font-size: 18px;
    font-family: var(--font-hindi);
    margin-bottom: 6px;
}

.grammar-topic-card .topic-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.grammar-topic-card .topic-progress-bar {
    height: 8px;
    background: var(--bg-main);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.grammar-topic-card .topic-progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 999px;
    transition: width 0.3s;
}

.grammar-topic-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--school-navy);
    margin-bottom: 12px;
    font-family: var(--font-hindi);
}

.info-card {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 12px;
}

.info-card-icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    background-color: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-card h4 {
    font-size: 20px;
    font-family: var(--font-ui);
}

.info-card-body h5 {
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--text-light);
}

.info-card-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.info-card-body li {
    background-color: var(--bg-main);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 15px;
}

.info-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.info-card-quiz-btn,
.grammar-topic-quiz-btn {
    width: 100%;
    margin-top: 16px;
    padding: 10px 16px;
    font-size: 14px;
    justify-content: center;
}

/* Duolingo Quiz Component styling */
.quiz-container {
    max-width: 680px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.quiz-progress-bar {
    width: 100%;
    height: 16px;
    background-color: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid rgba(0,0,0,0.05);
}

.quiz-progress-fill {
    width: 0%;
    height: 100%;
    background-color: var(--success);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.quiz-question-box {
    margin-bottom: 24px;
}

.quiz-tag {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 12px;
}

.quiz-question {
    font-size: 24px;
    font-family: var(--font-hindi);
    color: var(--text-title);
    margin-bottom: 20px;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.quiz-option {
    padding: 16px 20px;
    border: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-hindi);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--bg-card);
    color: var(--text-body);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
    border-bottom-width: 6px;
}

.quiz-option:hover {
    border-color: var(--text-light);
    background-color: var(--bg-main);
}

.quiz-option.selected {
    border-color: var(--info);
    background-color: var(--info-light);
}

.quiz-option:active {
    border-bottom-width: 3px;
    transform: translateY(3px);
}

.quiz-feedback {
    display: none;
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 16px;
    animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-feedback.success {
    display: block;
    background-color: var(--success-light);
    color: var(--success-dark);
    border: 2px solid var(--success);
}

.quiz-feedback.error {
    display: block;
    background-color: var(--error-light);
    color: var(--error-dark);
    border: 2px solid var(--error);
}

.shake {
    animation: shake 0.5s ease-in-out;
}

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

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

/* Sentence Builder Components */
.sentence-builder-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.sentence-instruction {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 500;
}

.sentence-board {
    min-height: 80px;
    background-color: var(--bg-main);
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.sentence-chips-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.word-chip {
    padding: 12px 20px;
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-hindi);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    box-shadow: var(--shadow-sm);
    border-bottom-width: 6px;
    transition: all 0.1s ease;
}

.word-chip:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.word-chip:active {
    border-bottom-width: 3px;
    transform: translateY(3px);
}

.word-chip.used {
    opacity: 0.3;
    pointer-events: none;
    border-bottom-width: 3px;
}

/* Kahani Ghar (Story Generator) */
.story-creator-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 32px;
}

.story-options {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-sm);
}

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

.story-option-group label {
    font-weight: 700;
    color: var(--text-title);
    font-size: 15px;
}

.option-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.option-select-card {
    background-color: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-select-card.selected {
    border-color: var(--success);
    background-color: var(--success-light);
    color: var(--success-dark);
}

.option-select-card .card-emoji {
    font-size: 24px;
    margin-bottom: 4px;
}

.option-select-card .card-label {
    font-family: var(--font-hindi);
    font-size: 13px;
    font-weight: 700;
}

/* Story Output Viewport */
.story-display-card {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: space-between;
}

.story-display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 12px;
}

.story-title {
    font-family: var(--font-hindi);
    font-size: 24px;
    color: var(--success-dark);
}

.story-text-container {
    background-color: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 24px;
    min-height: 200px;
    font-family: var(--font-hindi);
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-body);
}

.story-word {
    display: inline-block;
    margin-right: 6px;
    border-radius: 4px;
    padding: 0 2px;
}

.story-word.speaking {
    background-color: var(--secondary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 6px var(--secondary);
}

/* Story Comprehension Questions */
.story-comp-box {
    border-top: 2px dashed var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

/* Muhavara Explorer */
.muhavara-card-container {
    perspective: 1000px;
    width: 100%;
    max-width: 440px;
    height: 320px;
    margin: 0 auto 32px auto;
}

.muhavara-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.muhavara-card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    border: 4px solid var(--border-color);
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.card-face.front {
    background-color: var(--bg-card);
    border-color: var(--secondary);
}

.card-face.back {
    background-color: var(--bg-card);
    border-color: var(--primary);
    transform: rotateY(180deg);
    justify-content: space-between;
}

.muhavara-graphic {
    width: 130px;
    height: 130px;
    background-color: var(--bg-main);
    border-radius: 50%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--border-color);
}

.front h3 {
    font-size: 26px;
    font-family: var(--font-hindi);
    color: var(--text-title);
    text-align: center;
}

.back h4 {
    font-size: 20px;
    color: var(--primary);
    border-bottom: 2px dashed var(--border-color);
    width: 100%;
    text-align: center;
    padding-bottom: 8px;
}

.muhavara-meaning {
    font-family: var(--font-hindi);
    font-size: 18px;
    color: var(--text-body);
    text-align: center;
    font-weight: 700;
}

.muhavara-sentence {
    font-family: var(--font-hindi);
    font-size: 15px;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
    background-color: var(--bg-main);
    padding: 10px;
    border-radius: var(--radius-sm);
    width: 100%;
}

.muhavara-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

/* Kavita Diary styles */
.kavita-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
}

.kavita-list {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.poem-item {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poem-item:hover {
    border-color: var(--purple);
    background-color: var(--purple-light);
}

.poem-item.active {
    border-color: var(--purple);
    background-color: var(--purple-light);
}

.poem-item h4 {
    font-family: var(--font-hindi);
    font-size: 18px;
}

.poem-reader-display {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.poem-line {
    font-family: var(--font-hindi);
    font-size: 18px;
    line-height: 2.0;
    text-align: center;
    border-radius: 4px;
}

.poem-line.speaking {
    background-color: var(--purple-light);
    color: var(--purple-dark);
    font-weight: 700;
    transform: scale(1.02);
}

/* Kavita Creator */
.kavita-creator-box {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kavita-creator-box textarea {
    width: 100%;
    height: 180px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: var(--font-hindi);
    font-size: 18px;
    outline: none;
    resize: none;
    background-color: var(--bg-main);
    color: var(--text-body);
}

.kavita-creator-box textarea:focus {
    border-color: var(--purple);
}

.rhyme-assistant-box {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    background-color: var(--bg-main);
}

.rhyme-words-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.rhyme-tag {
    padding: 6px 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-family: var(--font-hindi);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.rhyme-tag:hover {
    border-color: var(--purple);
    background-color: var(--purple-light);
}

/* Word Match Game */
.game-container {
    max-width: 720px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

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

.game-card {
    height: 110px;
    background-color: var(--bg-main);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    font-family: var(--font-hindi);
    font-size: 18px;
    font-weight: 700;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-bottom-width: 6px;
}

.game-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.game-card.selected {
    border-color: var(--info);
    background-color: var(--info-light);
}

.game-card.matched {
    border-color: var(--success);
    background-color: var(--success-light);
    color: var(--success-dark);
    opacity: 0.6;
    pointer-events: none;
    border-bottom-width: 3px;
    transform: none;
}

.game-card:active {
    border-bottom-width: 3px;
    transform: translateY(3px);
}

/* Hindi Ludo Game — responsive layout */
#ludo.view-section {
    padding-bottom: 24px;
}

.ludo-game-wrap {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.ludo-how-to-play {
    background: var(--bg-card);
    border: 2px solid var(--secondary);
    border-radius: var(--radius-md);
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
}

.ludo-how-to-play summary {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--school-navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ludo-how-to-play summary::-webkit-details-marker { display: none; }

.ludo-how-to-play ol {
    margin: 0;
    padding: 0 16px 14px 36px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-body);
}

.ludo-how-to-play li { margin-bottom: 4px; }

.ludo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 20px;
    align-items: start;
}

.ludo-board-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.ludo-side-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 16px;
}

.ludo-dice-result {
    text-align: center;
    background: linear-gradient(135deg, var(--school-navy), #2a4a7a);
    color: white;
    border-radius: var(--radius-md);
    padding: 18px 16px;
    border: 3px solid var(--secondary);
}

.ludo-dice-result.has-roll {
    animation: pop 0.35s ease-out;
}

.ludo-dice-result-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-bottom: 4px;
}

.ludo-dice-result-num {
    display: block;
    font-size: clamp(40px, 8vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    font-family: var(--font-hindi);
}

.ludo-dice-result-hint {
    display: block;
    font-size: 14px;
    margin-top: 8px;
    opacity: 0.95;
    line-height: 1.35;
}

.ludo-dice-result-sub {
    display: block;
    font-size: 12px;
    margin-top: 6px;
    opacity: 0.75;
}

.ludo-hud {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ludo-hud-item {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--school-navy);
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.ludo-turn-indicator { border-width: 2px; }

.ludo-board-wrap {
    background: var(--bg-card);
    border: 4px solid var(--school-navy);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.ludo-grid {
    display: grid;
    grid-template-columns: repeat(15, minmax(0, 1fr));
    grid-template-rows: repeat(15, minmax(0, 1fr));
    aspect-ratio: 1;
    width: 100%;
    gap: 1px;
    background: #64748b;
    border-radius: 6px;
    overflow: hidden;
}

.ludo-gcell {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(5px, 1.4vw, 9px);
    font-weight: 800;
    line-height: 1;
}

.ludo-empty { background: #f1f5f9; }
.ludo-path-bg { background: #fff; }

.ludo-yard { opacity: 0.95; }
.ludo-yard-red { background: #FFCDD2; }
.ludo-yard-green { background: #C8E6C9; }
.ludo-yard-yellow { background: #FFF9C4; }
.ludo-yard-blue { background: #BBDEFB; }

.ludo-track {
    background: #fff;
    box-shadow: inset 0 0 0 1px #e2e8f0;
    color: #64748b;
}

.ludo-red-start {
    background: #FFCDD2 !important;
    box-shadow: inset 0 0 0 2px #E53935 !important;
}

.ludo-safe {
    background: #FEF9C3 !important;
    color: #CA8A04;
    font-size: clamp(6px, 1.6vw, 10px) !important;
}

.ludo-home-col { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.ludo-home-red { background: #EF5350; }
.ludo-home-green { background: #66BB6A; }
.ludo-home-yellow { background: #FFEE58; }
.ludo-home-blue { background: #42A5F5; }

.ludo-center {
    background: conic-gradient(#FFEE58 0 90deg, #66BB6A 90deg 180deg, #EF5350 180deg 270deg, #42A5F5 270deg 360deg);
    z-index: 2;
}

.ludo-center-zone { background: #fff; }
.ludo-tri-red { background: linear-gradient(135deg, #EF5350 50%, transparent 50%); }
.ludo-tri-green { background: linear-gradient(225deg, #66BB6A 50%, transparent 50%); }
.ludo-tri-yellow { background: linear-gradient(45deg, #FFEE58 50%, transparent 50%); }
.ludo-tri-blue { background: linear-gradient(315deg, #42A5F5 50%, transparent 50%); }

.ludo-tokens {
    position: absolute;
    inset: 1px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: 1px;
    z-index: 5;
    pointer-events: none;
}

.ludo-piece {
    width: clamp(7px, 28%, 22px);
    height: clamp(7px, 28%, 22px);
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.ludo-piece.active-piece {
    outline: 2px solid var(--secondary);
    outline-offset: 1px;
    animation: ludoPiecePulse 1s infinite;
    z-index: 6;
}

@keyframes ludoPiecePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.ludo-players-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.ludo-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-body);
}

.ludo-legend-chip.active {
    border-color: var(--chip-color, var(--school-navy));
    box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}

.ludo-legend-chip.finished { opacity: 0.55; }

.ludo-piece-mini {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #fff;
    flex-shrink: 0;
}

.ludo-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
}

.ludo-dice {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #fff, #e8eef5);
    border-bottom: 4px solid var(--border-color);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.ludo-dice-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--school-navy);
    margin-top: 2px;
}

.ludo-dice:disabled { opacity: 0.45; cursor: not-allowed; }
.ludo-dice.rolling { animation: ludoDiceShake 0.15s infinite; }

@keyframes ludoDiceShake {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}

.ludo-dice:not(:disabled):active { transform: scale(0.95); }

.ludo-control-text {
    width: 100%;
    text-align: center;
}

.btn-ludo-roll {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
    margin-bottom: 10px;
}

.btn-ludo-roll:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ludo-new {
    width: 100%;
    min-height: 44px;
}

.ludo-status-msg {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.45;
    min-height: 2.8em;
}

.ludo-question-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 35, 64, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    overflow-y: auto;
}

.ludo-question-overlay.hidden { display: none; }

.ludo-question-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--secondary);
    animation: pop 0.3s ease-out;
    margin: auto;
}

.ludo-q-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ludo-q-dice-badge {
    background: var(--school-navy);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.ludo-q-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.35;
}

.ludo-q-prompt {
    font-family: var(--font-hindi);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 16px;
    line-height: 1.45;
}

.ludo-q-options { display: grid; gap: 10px; }

.ludo-q-opt {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    font-family: var(--font-hindi);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
}

.ludo-q-opt:hover:not(:disabled) {
    border-color: var(--school-navy);
    background: var(--school-navy-light);
}

.ludo-q-opt.correct { border-color: var(--success); background: #DCFCE7; }
.ludo-q-opt.wrong { border-color: var(--danger); background: #FEE2E2; }
.ludo-q-opt:disabled { cursor: default; }

.ludo-q-feedback {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    min-height: 20px;
}

.ludo-q-feedback.success { color: var(--success); }
.ludo-q-feedback.error { color: var(--danger); }

/* Desktop: wider board */
@media (min-width: 900px) {
    .ludo-board-wrap {
        max-width: 540px;
    }
}

/* Tablet */
@media (max-width: 860px) {
    .ludo-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ludo-side-column {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        align-items: stretch;
    }

    .ludo-dice-result {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100%;
    }

    .ludo-controls {
        min-height: 100%;
    }
}

.module-card.card-ludo { border-color: #FDE68A; }
.card-ludo .card-icon { background: linear-gradient(135deg, #EAB308, #F59E0B); }

/* Feedback & Reviews */
.feedback-layout {
    display: grid;
    gap: 20px;
    max-width: 720px;
    margin: 0 auto;
}

.feedback-intro-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feedback-intro-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 12px;
}

.feedback-intro-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feedback-intro-list li {
    font-size: 14px;
    padding: 6px 0;
    color: var(--text-body);
}

.feedback-intro-list i {
    color: var(--success);
    margin-right: 8px;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feedback-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.feedback-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 6px;
}

.feedback-label-en {
    font-weight: 600;
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.feedback-field input,
.feedback-field select,
.feedback-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 14px;
    background: var(--bg-main);
    color: var(--text-body);
}

.feedback-field textarea {
    resize: vertical;
    min-height: 80px;
    font-family: var(--font-hindi), var(--font-ui);
}

.feedback-field input:focus,
.feedback-field select:focus,
.feedback-field textarea:focus {
    outline: none;
    border-color: var(--school-navy);
}

.star-rating {
    display: flex;
    gap: 6px;
}

.star-btn {
    border: none;
    background: transparent;
    font-size: 32px;
    color: #D1D5DB;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s, transform 0.1s;
}

.star-btn.active {
    color: #EAB308;
}

.star-btn:hover {
    transform: scale(1.1);
}

.feedback-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.feedback-thanks {
    text-align: center;
    padding: 40px 24px;
}

.feedback-thanks.hidden {
    display: none;
}

.feedback-thanks-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.feedback-thanks h3 {
    font-family: var(--font-hindi);
    font-size: 24px;
    margin-bottom: 8px;
}

.feedback-thanks p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.feedback-link-btn {
    margin-top: 8px;
    border-color: var(--secondary) !important;
    color: var(--school-navy) !important;
}

.feedback-teacher-panel {
    margin-bottom: 20px;
    background: var(--bg-main);
    border: 2px dashed var(--border-color);
}

.feedback-teacher-stats {
    margin-bottom: 12px;
}

.feedback-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.feedback-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.feedback-stat .val {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--school-navy);
}

.feedback-stat .lbl {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
}

.feedback-teacher-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.feedback-review-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.feedback-review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.feedback-review-head span {
    color: #EAB308;
    font-size: 13px;
    flex-shrink: 0;
}

.feedback-review-meta {
    font-size: 11px;
    color: var(--text-light);
    margin: 4px 0 6px;
}

.feedback-review-improve {
    font-size: 13px;
    color: var(--text-body);
    margin: 0;
    line-height: 1.4;
    font-family: var(--font-hindi);
}

.feedback-teacher-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.feedback-empty {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

/* Dashboard Report Styles */
.teacher-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.report-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.report-stat-card {
    background-color: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
}

.report-stat-card .val {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.report-stat-card .lbl {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.progress-row h5 {
    font-size: 15px;
}

/* Printable Worksheets Viewport */
.worksheet-creator-box {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* Worksheet preview overlay */
.printable-worksheet-content {
    display: none;
}

/* Audio toggle floating bubble */
.floating-controls {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: var(--shadow-md);
    background-color: var(--bg-sidebar);
    border: 3px solid var(--border-color);
    color: var(--text-title);
}

.floating-btn:hover {
    transform: scale(1.1);
}

/* Canvas Confetti overlay */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Continue Learning card */
.continue-learning-card {
    background: linear-gradient(135deg, var(--school-navy) 0%, #2a4a7a 100%);
    color: white;
    border-radius: var(--radius-md);
    padding: 20px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--secondary);
}

.continue-learning-card .cl-text h3 {
    font-family: var(--font-hindi);
    font-size: 20px;
    color: white;
    margin-bottom: 6px;
}

.continue-learning-card .cl-text p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.45;
    margin: 0;
}

.continue-learning-card .cl-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(197, 165, 114, 0.25);
    border: 1px solid var(--secondary);
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 8px;
}

.continue-learning-card .btn-continue {
    background: var(--secondary);
    color: var(--school-navy);
    border: none;
    border-bottom: 3px solid var(--secondary-dark);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ui);
    transition: transform 0.1s, opacity 0.1s;
}

.continue-learning-card .btn-continue:active {
    transform: translateY(2px);
    opacity: 0.92;
}

.mbn-item:active {
    transform: scale(0.96);
}

.activities-heading {
    font-size: 20px;
    margin-bottom: 16px;
}

/* ── Mobile shell (hidden on desktop) ── */
.mobile-header,
.mobile-bottom-nav,
.sidebar-backdrop {
    display: none;
}

.sidebar-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 0;
}

.sidebar-close-btn {
    display: none;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .main-content {
        padding: 24px 20px 100px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .story-creator-grid {
        grid-template-columns: 1fr;
    }
    .kavita-layout {
        grid-template-columns: 1fr;
    }
    .teacher-grid {
        grid-template-columns: 1fr;
    }
    .progress-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .progress-row > div {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        padding: 0 12px;
        padding-top: env(safe-area-inset-top, 0);
        background: var(--bg-card);
        border-bottom: 2px solid var(--border-color);
        z-index: 200;
        box-shadow: var(--shadow-sm);
    }

    .mobile-menu-btn {
        width: 44px;
        height: 44px;
        border: none;
        background: var(--bg-main);
        border-radius: var(--radius-sm);
        color: var(--school-navy);
        font-size: 18px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-header-center {
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .mobile-page-title {
        font-family: var(--font-hindi);
        font-weight: 700;
        font-size: 16px;
        color: var(--school-navy);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-page-sub {
        font-size: 10px;
        color: var(--text-light);
        font-weight: 600;
    }

    .mobile-header-xp {
        display: flex;
        align-items: center;
        gap: 4px;
        background: var(--primary-light);
        color: var(--primary-dark);
        padding: 6px 10px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        flex-shrink: 0;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-top: 2px solid var(--border-color);
        padding: 6px 8px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom, 0));
        z-index: 200;
        justify-content: space-around;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    }

    .mbn-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-width: 56px;
        min-height: 48px;
        padding: 4px 8px;
        border: none;
        background: transparent;
        color: var(--text-light);
        text-decoration: none;
        font-size: 10px;
        font-weight: 600;
        font-family: var(--font-ui);
        cursor: pointer;
        border-radius: var(--radius-sm);
        -webkit-tap-highlight-color: transparent;
    }

    .mbn-item i {
        font-size: 20px;
    }

    .mbn-item.active {
        color: var(--school-navy);
        background: var(--school-navy-light);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 35, 64, 0.5);
        z-index: 250;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
    }

    body.drawer-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(300px, 88vw);
        height: 100vh;
        height: 100dvh;
        z-index: 300;
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        border-right: none;
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
        padding-bottom: env(safe-area-inset-bottom, 16px);
    }

    body.drawer-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-close-btn {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border: none;
        background: var(--bg-main);
        border-radius: var(--radius-sm);
        font-size: 18px;
        color: var(--text-body);
        cursor: pointer;
    }

    .sidebar-drawer-head {
        padding: 12px 12px 0;
    }

    .sidebar-drawer-head .logo-container {
        border: none;
        margin: 0;
        padding: 8px;
    }

    .logo-text, .nav-item span, .theme-toggle-btn span {
        display: inline !important;
    }

    .nav-menu {
        flex-direction: column;
        padding: 8px 12px;
    }

    .nav-item {
        justify-content: flex-start;
        min-height: 48px;
        padding: 12px 14px;
    }

    .main-content {
        margin-left: 0;
        padding: 72px 16px 88px;
        padding-top: calc(56px + env(safe-area-inset-top, 0) + 16px);
    }

    .desktop-top-bar {
        display: none;
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
    }

    .welcome-banner .school-mascot {
        font-size: 48px;
    }

    .module-cards {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .section-title h2 {
        font-size: 20px;
    }

    .tab-nav {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tab-nav::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .quiz-option {
        min-height: 52px;
        padding: 14px 16px;
    }

    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .game-card {
        min-height: 64px;
        font-size: 15px;
    }

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

    .vocab-category-grid,
    .grammar-topic-grid {
        grid-template-columns: 1fr;
    }

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

    .continue-learning-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .continue-learning-card .btn-continue {
        width: 100%;
        justify-content: center;
    }

    .floating-controls {
        bottom: calc(72px + env(safe-area-inset-bottom, 0));
        right: 16px;
    }

    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .onboarding-card {
        padding: 28px 20px;
        margin: 12px;
    }

    .btn {
        min-height: 48px;
    }

    .report-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    #ludo.view-section {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0));
    }

    .ludo-how-to-play:not([open]) {
        margin-bottom: 10px;
    }

    .ludo-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ludo-board-wrap {
        max-width: none;
        padding: 5px;
    }

    .ludo-side-column {
        position: sticky;
        bottom: calc(68px + env(safe-area-inset-bottom, 0));
        z-index: 40;
        display: flex;
        flex-direction: column;
        gap: 10px;
        grid-template-columns: unset;
        background: var(--bg-main);
        padding-top: 8px;
        margin: 0 -4px;
    }

    .ludo-dice-result {
        padding: 12px 14px;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 2px 12px;
        text-align: left;
        align-items: center;
    }

    .ludo-dice-result-label {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
    }

    .ludo-dice-result-num {
        grid-column: 2;
        grid-row: 1 / 3;
        font-size: 42px;
        align-self: center;
    }

    .ludo-dice-result-hint {
        grid-column: 1;
        grid-row: 2;
        margin: 0;
        font-size: 12px;
    }

    .ludo-dice-result-sub {
        display: none;
    }

    .ludo-controls {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 12px;
        gap: 10px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    }

    .ludo-dice {
        width: 56px;
        height: 56px;
        font-size: 28px;
        margin: 0;
        flex-shrink: 0;
    }

    .ludo-dice-num { font-size: 12px; }

    .ludo-control-text {
        flex: 1;
        min-width: 0;
    }

    .btn-ludo-roll {
        min-height: 48px;
        font-size: 15px;
        margin-bottom: 6px;
    }

    .btn-ludo-new {
        width: 100%;
        flex-basis: 100%;
        min-height: 40px;
    }

    .ludo-hud-item {
        font-size: 11px;
        padding: 6px 10px;
        min-width: 0;
    }

    .ludo-legend-chip {
        font-size: 10px;
        padding: 4px 8px;
    }

    .ludo-q-prompt { font-size: 16px; }

    .ludo-question-card {
        padding: 18px;
        max-height: min(90vh, 600px);
        overflow-y: auto;
    }

    .feedback-form-grid {
        grid-template-columns: 1fr;
    }

    .feedback-actions {
        flex-direction: column;
    }

    .feedback-actions .btn {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .mbn-item span {
        font-size: 9px;
    }
    .mobile-page-title {
        font-size: 14px;
    }
}

/* Printable Worksheet Print Styling overrides */
@media print {
    body * {
        visibility: hidden;
    }
    .printable-worksheet-content, .printable-worksheet-content * {
        visibility: visible;
    }
    .printable-worksheet-content {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: #000 !important;
        background-color: #fff !important;
        font-family: var(--font-hindi) !important;
    }
    .print-only-header {
        text-align: center;
        border-bottom: 3px double #000;
        padding-bottom: 16px;
        margin-bottom: 24px;
    }
    .print-question-section {
        margin-bottom: 24px;
        page-break-inside: avoid;
    }
    .print-question-title {
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 10px;
    }
    .print-blank-line {
        border-bottom: 1px dashed #000;
        display: inline-block;
        width: 200px;
        height: 18px;
    }
    .print-story-box {
        border: 2px solid #000;
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 16px;
    }
}

/* Vocabulary Explorer */
.vocab-grade-hint {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
    font-weight: 600;
}

.vocab-intro {
    text-align: center;
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 24px;
}

.vocab-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.vocab-category-card {
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.vocab-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.vocab-cat-emoji {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.vocab-category-card h4 {
    font-family: var(--font-hindi);
    font-size: 20px;
    color: var(--school-navy);
    margin-bottom: 4px;
}

.vocab-category-card .cat-en {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.vocab-category-card .cat-count {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.vocab-cat-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vocab-cat-actions .btn {
    width: 100%;
    font-size: 13px;
    padding: 10px;
}

.vocab-back-btn {
    margin-bottom: 16px;
    border: 2px solid var(--border-color) !important;
    background: transparent !important;
    color: var(--text-body) !important;
}

.vocab-word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.vocab-word-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}

.vocab-word-card:hover {
    border-color: var(--school-navy);
    transform: scale(1.03);
}

.vocab-word-card.speaking {
    border-color: var(--success);
    background: var(--success-light);
}

.vocab-word-card .vw-emoji {
    font-size: 40px;
    margin-bottom: 8px;
}

.vocab-word-card .vw-hindi {
    font-family: var(--font-hindi);
    font-size: 20px;
    font-weight: 700;
    color: var(--school-navy);
}

.vocab-word-card .vw-english {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.vocab-learn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px dashed var(--border-color);
}

.vocab-learn-header h3 {
    font-family: var(--font-hindi);
    font-size: 22px;
    color: var(--school-navy);
}

.vocab-quiz-emoji {
    font-size: 72px;
    text-align: center;
    margin: 16px 0 24px;
}

/* Onboarding — DPS Sharjah Welcome */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(27, 54, 93, 0.96), rgba(139, 26, 26, 0.94));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    padding: 20px;
}

.onboarding-overlay.hidden {
    display: none;
}

.onboarding-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border-top: 5px solid var(--secondary);
    text-align: center;
}

.onboarding-school-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--school-navy-light);
    color: var(--school-navy);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.onboarding-card h2 {
    font-size: 26px;
    color: var(--school-navy);
    margin-bottom: 8px;
    font-family: var(--font-hindi);
}

.onboarding-card .subtitle {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 28px;
    line-height: 1.5;
}

.onboarding-form {
    text-align: left;
}

.onboarding-form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 6px;
}

.onboarding-form input,
.onboarding-form select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font-hindi);
    background: var(--bg-main);
    color: var(--text-body);
    margin-bottom: 18px;
    outline: none;
}

.onboarding-form input:focus,
.onboarding-form select:focus {
    border-color: var(--school-navy);
}

.onboarding-form .btn-start {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    font-size: 16px;
}

.welcome-banner .school-mascot {
    font-size: 56px;
    opacity: 0.9;
}

.top-bar-school {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    margin-top: 2px;
}

#student-greeting {
    font-family: var(--font-hindi);
}
