/* CSS Variables & Theme Setup */
:root {
    /* Color Palette */
    --bg-app: #090d16;
    --bg-sidebar: #05070d;
    --bg-card: #121824;
    --bg-card-hover: #192235;
    
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Subject Colors */
    --color-maths: #3b82f6;
    --color-maths-end: #06b6d4;
    --color-english: #a855f7;
    --color-english-end: #ec4899;
    --color-science: #10b981;
    --color-science-end: #14b8a6;
    --color-pva: #f59e0b;
    --color-pva-end: #f97316;
    
    /* Accents */
    --color-primary: #6366f1;
    --color-primary-end: #4f46e5;
    --color-accent: #f43f5e;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 12px 20px -8px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.15);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-round: 50%;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Noto Sans Ethiopic', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* Main Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.app-sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}

.brand-logo {
    height: 42px;
    width: 42px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-end));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-logo i {
    font-size: 20px;
    color: #fff;
}

.brand-name h1 {
    font-family: 'Outfit', 'Noto Sans Ethiopic', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-name span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sidebar Menu */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.menu-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-left: 3px solid var(--color-primary);
    padding-left: 13px;
    box-shadow: var(--shadow-sm);
}

/* Sidebar Footer & Progress Bar */
.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.quick-status {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.status-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-percentage {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
}

.status-bar-bg {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-end));
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Main Panel Scroll Area */
.app-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.app-header {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background-color: rgba(9, 13, 22, 0.3);
    backdrop-filter: blur(10px);
    z-index: 5;
}

.header-welcome h2 {
    font-family: 'Outfit', 'Noto Sans Ethiopic', sans-serif;
    font-size: 22px;
    font-weight: 600;
}

.header-welcome p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 10px;
}

/* Tab Container Styles */
.tab-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid Helper Classes */
.grid-layout {
    display: grid;
    gap: 24px;
}

.grid-layout.cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-layout.cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid-layout.cols-4-1 {
    grid-template-columns: 280px 1fr;
}

.mt-6 {
    margin-top: 24px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mr-2 {
    margin-right: 8px;
}

/* Card Styling */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-family: 'Outfit', 'Noto Sans Ethiopic', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Gradient Cards */
.card-gradient-maths {
    border-top: 4px solid var(--color-maths);
}
.card-gradient-maths:hover {
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.2);
}

.card-gradient-english {
    border-top: 4px solid var(--color-english);
}
.card-gradient-english:hover {
    box-shadow: 0 10px 30px -10px rgba(168, 85, 247, 0.2);
}

.card-gradient-science {
    border-top: 4px solid var(--color-science);
}
.card-gradient-science:hover {
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.2);
}

.card-gradient-pva {
    border-top: 4px solid var(--color-pva);
}
.card-gradient-pva:hover {
    box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.2);
}

.card-icon {
    font-size: 28px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.03);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.card-gradient-maths .card-icon { color: var(--color-maths); }
.card-gradient-english .card-icon { color: var(--color-english); }
.card-gradient-science .card-icon { color: var(--color-science); }
.card-gradient-pva .card-icon { color: var(--color-pva); }

.card-progress {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    margin-bottom: 6px;
}

.progress-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.progress-val {
    font-size: 12px;
    font-weight: 700;
}

.card-progress-bar-bg {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.card-progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.card-gradient-maths .card-progress-bar-fill { background-color: var(--color-maths); }
.card-gradient-english .card-progress-bar-fill { background-color: var(--color-english); }
.card-gradient-science .card-progress-bar-fill { background-color: var(--color-science); }
.card-gradient-pva .card-progress-bar-fill { background-color: var(--color-pva); }

/* Interactive elements */
.card-interactive {
    cursor: pointer;
}
.card-interactive:hover {
    background-color: var(--bg-card-hover);
}

.card-header-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-header-icon i {
    font-size: 20px;
}

/* Study Strategy List */
.strategy-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.strategy-list li {
    display: flex;
    gap: 16px;
}

.strategy-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.strategy-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.strategy-desc strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

/* Alpha Colors for Strategy Icons */
.bg-pink-alpha { background-color: rgba(236, 72, 153, 0.15); color: #ec4899; }
.bg-indigo-alpha { background-color: rgba(99, 102, 241, 0.15); color: #6366f1; }
.bg-amber-alpha { background-color: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* Text colors */
.text-amber { color: #f59e0b; }
.text-emerald { color: #10b981; }
.text-indigo { color: #6366f1; }
.text-pink { color: #ec4899; }
.text-muted { color: var(--text-muted); }

/* 2-Week Planner View */
.planner-setup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.setup-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.multiselect-group {
    display: flex;
    gap: 12px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-container input:checked + .checkmark::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    color: #000;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkmark.bg-maths { background-color: rgba(59, 130, 246, 0.15); border-color: var(--color-maths); }
.checkbox-container input:checked + .checkmark.bg-maths { background-color: var(--color-maths); }

.checkmark.bg-english { background-color: rgba(168, 85, 247, 0.15); border-color: var(--color-english); }
.checkbox-container input:checked + .checkmark.bg-english { background-color: var(--color-english); }

.checkmark.bg-science { background-color: rgba(16, 185, 129, 0.15); border-color: var(--color-science); }
.checkbox-container input:checked + .checkmark.bg-science { background-color: var(--color-science); }

.checkmark.bg-pva { background-color: rgba(245, 158, 11, 0.15); border-color: var(--color-pva); }
.checkbox-container input:checked + .checkmark.bg-pva { background-color: var(--color-pva); }

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-gradient: linear-gradient(135deg, var(--color-primary), var(--color-primary-end));
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background-color: #4f46e5;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}

/* Timeline Cards */
.planner-timeline {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
}

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

.timeline-day-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    cursor: pointer;
}

.timeline-day-card.completed {
    border-color: var(--color-science);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.day-number {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.day-check-icon {
    font-size: 14px;
    color: var(--color-science);
}

.day-tasks {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.task-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-tag.maths { background-color: rgba(59, 130, 246, 0.1); color: var(--color-maths); border: 1px solid rgba(59, 130, 246, 0.2); }
.task-tag.english { background-color: rgba(168, 85, 247, 0.1); color: var(--color-english); border: 1px solid rgba(168, 85, 247, 0.2); }
.task-tag.science { background-color: rgba(16, 185, 129, 0.1); color: var(--color-science); border: 1px solid rgba(16, 185, 129, 0.2); }
.task-tag.pva { background-color: rgba(245, 158, 11, 0.1); color: var(--color-pva); border: 1px solid rgba(245, 158, 11, 0.2); }

.day-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Recommended Task Box Detail */
.recommendation-content h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.recommendation-details {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.recommendation-details span i {
    margin-right: 4px;
}

/* Subjects View Nav Tabs */
.subject-tabs-nav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.sub-tab-btn {
    background-color: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.sub-tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}

.sub-tab-btn.active {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
}

.sub-tab-btn[data-subject="maths"].active { border-bottom: 3px solid var(--color-maths); }
.sub-tab-btn[data-subject="english"].active { border-bottom: 3px solid var(--color-english); }
.sub-tab-btn[data-subject="science"].active { border-bottom: 3px solid var(--color-science); }
.sub-tab-btn[data-subject="pva"].active { border-bottom: 3px solid var(--color-pva); }

/* Chapters list inside Hub */
.chapter-list-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 520px;
}

.list-title {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.chapter-scroll-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

/* Custom Scrollbar for scroll divs */
.chapter-scroll-list::-webkit-scrollbar,
.summary-body::-webkit-scrollbar {
    width: 6px;
}

.chapter-scroll-list::-webkit-scrollbar-thumb,
.summary-body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chapter-list-item {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.01);
    transition: all 0.2s ease;
}

.chapter-list-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
}

.chapter-list-item.selected {
    background-color: rgba(99, 102, 241, 0.07);
    border-color: rgba(99, 102, 241, 0.3);
    font-weight: 600;
}

.chapter-list-item.completed {
    border-color: rgba(16, 185, 129, 0.2);
}

.chapter-item-status-icon {
    font-size: 12px;
    color: var(--color-science);
}

/* Study Panel Details Card */
.detail-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.header-badge {
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* Study mode sub tab bar */
.study-mode-tabs {
    display: flex;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.mode-tab-btn {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.mode-tab-btn:hover {
    color: var(--text-primary);
}

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

/* Study Content Modes */
.study-mode-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.study-mode-content.active {
    display: block;
}

/* Summary / Key Concepts Display */
.summary-body {
    max-height: 280px;
    overflow-y: auto;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-right: 10px;
}

.summary-body p {
    font-size: 14px;
    margin-bottom: 12px;
}

.summary-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 8px;
    margin-top: 8px;
    margin-bottom: 16px;
}

.summary-body ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.summary-body ul li::before {
    content: "•";
    color: var(--color-primary);
    font-weight: 700;
}

.challenge-body {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.challenge-body p {
    font-size: 13px;
    margin-bottom: 8px;
}

.challenge-body strong {
    color: var(--text-primary);
}

/* Flashcards Engine */
.flashcard-deck-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.flashcard-container {
    height: 260px;
    perspective: 1000px;
    cursor: pointer;
}

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

.flashcard-container.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.flashcard-front {
    background: linear-gradient(135deg, #161e2e 0%, #111827 100%);
    box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.05);
}

.flashcard-back {
    background: linear-gradient(135deg, #1e1b4b 0%, #111827 100%);
    transform: rotateY(180deg);
    border-color: rgba(99, 102, 241, 0.2);
}

.flashcard-front p, .flashcard-back p {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.card-instruction {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.flashcard-controls {
    display: flex;
    justify-content: space-between;
}

/* Quiz Interface */
.quiz-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.quiz-timer {
    font-variant-numeric: tabular-nums;
}

.quiz-question-container h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--border-hover);
}

.quiz-option.selected {
    background-color: rgba(99, 102, 241, 0.07);
    border-color: var(--color-primary);
}

.quiz-option.correct {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--color-science);
    color: #a7f3d0;
}

.quiz-option.incorrect {
    background-color: rgba(244, 63, 94, 0.1);
    border-color: var(--color-accent);
    color: #fecdd3;
}

.option-letter {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-round);
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.quiz-option.correct .option-letter {
    background-color: var(--color-science);
    color: #000;
}

.quiz-option.incorrect .option-letter {
    background-color: var(--color-accent);
    color: #fff;
}

#quiz-feedback-text {
    font-size: 13px;
    font-weight: 600;
    padding: 12px;
    border-radius: 6px;
}

#quiz-feedback-text.correct-feedback {
    background-color: rgba(16, 185, 129, 0.05);
    color: var(--color-science);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

#quiz-feedback-text.incorrect-feedback {
    background-color: rgba(244, 63, 94, 0.05);
    color: var(--color-accent);
    border: 1px solid rgba(244, 63, 94, 0.15);
}

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

/* Quiz Results Display */
.results-score-circle {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-round);
    border: 4px solid var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    background-color: rgba(99, 102, 241, 0.05);
}

.results-score-circle span {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.results-score-circle .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Progress Screen Graphics */
.readiness-gauge {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: var(--radius-round);
    background: conic-gradient(var(--color-primary) 0%, rgba(255,255,255,0.05) 0%);
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Simple fallback gauge design */
.readiness-gauge::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    background-color: var(--bg-card);
    border-radius: var(--radius-round);
    z-index: 1;
}

.gauge-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-center h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.gauge-center span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Stats Display Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 10px;
}

.stat-box {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-title {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Subject Breakdown Progress */
.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.breakdown-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-name {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-progress-val {
    font-size: 12px;
    font-weight: 700;
}

.breakdown-bar-bg {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
}

.breakdown-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Breakdown bar colors */
.breakdown-bar-fill.maths { background: linear-gradient(90deg, var(--color-maths), var(--color-maths-end)); }
.breakdown-bar-fill.english { background: linear-gradient(90deg, var(--color-english), var(--color-english-end)); }
.breakdown-bar-fill.science { background: linear-gradient(90deg, var(--color-science), var(--color-science-end)); }
.breakdown-bar-fill.pva { background: linear-gradient(90deg, var(--color-pva), var(--color-pva-end)); }

/* ==========================================================================
   Feynman Simplicity Lab Styles
   ========================================================================== */
#feynman-explanation-input {
    width: 100%;
    min-height: 140px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 14px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: all 0.2s ease;
}

#feynman-explanation-input:focus {
    border-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.feynman-feedback-panel {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.feynman-score-container {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.feynman-gauge {
    flex-grow: 1;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.gauge-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary), var(--color-science));
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.feynman-score-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.feynman-score-details strong {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-primary);
}

.feedback-text-content {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.feedback-text-content p {
    margin-bottom: 8px;
}

.feedback-text-content ul {
    margin-left: 20px;
    margin-bottom: 8px;
}

.feedback-text-content li {
    margin-bottom: 4px;
}

/* ==========================================================================
   Interactive Subject Workshops Layout
   ========================================================================== */
.workshop-display-area {
    width: 100%;
    min-height: 320px;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Workshop: Ethiopian analog clocks */
.clocks-comparison-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 24px;
}

.clocks-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 20px;
}

.clock-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.clock-panel h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.analog-clock {
    width: 140px;
    height: 140px;
    border: 4px solid var(--text-secondary);
    border-radius: 50%;
    position: relative;
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow-sm);
}

.clock-center {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    background-color: #fff;
    border-radius: 4px;
}

.hour-hand {
    width: 4px;
    height: 40px;
    background-color: var(--color-primary);
    z-index: 3;
}

.minute-hand {
    width: 3px;
    height: 55px;
    background-color: var(--text-secondary);
    z-index: 2;
}

.clock-nums {
    position: absolute;
    width: 100%;
    height: 100%;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.num-12 { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); }
.num-3  { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); }
.num-6  { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); }
.num-9  { position: absolute; top: 50%; left: 6px; transform: translateY(-50%); }

.clock-digital {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.clock-slider-wrapper {
    width: 80%;
    max-width: 400px;
    text-align: center;
    margin-top: 12px;
}

.clock-slider-wrapper input[type="range"] {
    width: 100%;
    margin-bottom: 8px;
    cursor: pointer;
}

/* Workshop: Noun Sorter */
.sorter-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nouns-pool {
    min-height: 80px;
    background-color: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.noun-chip {
    padding: 8px 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.noun-chip:hover {
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.baskets-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.basket-box {
    border: 2px dashed var(--border-color);
    background-color: rgba(255,255,255,0.01);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    transition: all 0.2s ease;
}

.basket-box.hovered {
    border-color: var(--color-primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.basket-box h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.basket-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.basket-items .noun-chip {
    cursor: default;
    pointer-events: none;
}

.basket-items .noun-chip.correct-chip {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--color-science);
    color: var(--color-science);
}

/* Workshop: Organ Clicker */
.organ-clicker-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.clue-card {
    width: 100%;
    max-width: 450px;
    background-color: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
}

.organs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 400px;
}

.organ-btn {
    padding: 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.organ-btn:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.organ-btn.correct-organ {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border-color: var(--color-science) !important;
    color: var(--color-science);
}

.organ-btn.incorrect-organ {
    background-color: rgba(244, 63, 94, 0.15) !important;
    border-color: var(--color-accent) !important;
    color: var(--color-accent);
}

/* Workshop: Color Mixer */
.color-mixer-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.mixer-controllers {
    display: flex;
    justify-content: center;
    gap: 24px;
    width: 100%;
    flex-wrap: wrap;
}

.color-select-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.color-select-panel select {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    outline: none;
    cursor: pointer;
}

.mixer-bowl-area {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 400px;
    justify-content: center;
}

.mixed-color-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease;
}

.mixed-color-name {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
}

/* Litmus simulation */
.litmus-wrapper {
    width: 100%;
    max-width: 400px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.litmus-liquid-select {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    outline: none;
    cursor: pointer;
}

.litmus-beaker {
    width: 100px;
    height: 120px;
    border: 3px solid var(--text-secondary);
    border-radius: 0 0 16px 16px;
    position: relative;
    background-color: rgba(255,255,255,0.02);
}

.beaker-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(0, 191, 255, 0.2);
    border-radius: 0 0 12px 12px;
    transition: background-color 0.4s ease;
}

.litmus-paper-strip {
    width: 20px;
    height: 80px;
    background-color: #d1d5db; /* neutral grey-blue */
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.litmus-paper-strip.dipped {
    top: 40px;
}

.litmus-paper-strip.red-result { background-color: #ef4444 !important; }
.litmus-paper-strip.blue-result { background-color: #3b82f6 !important; }

/* ==========================================================================
   Mobile Header and Menu Styles
   ========================================================================== */
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 22px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Achievements and Badges UI
   ========================================================================== */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.badge-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.badge-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.badge-item.locked {
    opacity: 0.35;
    filter: grayscale(1);
}

.badge-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-sm);
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.badge-item.unlocked .badge-icon {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-science);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.badge-info h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.badge-info p {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   Popup Modal Overlay Styles
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(5, 7, 13, 0.75);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   XP Points Popup alert
   ========================================================================== */
.xp-popup-alert {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, var(--color-science), var(--color-science-end));
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: xpPopupAnim 2.5s ease forwards;
}

@keyframes xpPopupAnim {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    85% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
}

/* ==========================================================================
   Mobile Responsiveness (Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
    /* Main Layout Grid collapses to single column */
    .app-container {
        grid-template-columns: 1fr;
    }

    /* Sidebar Drawer Slide-in overlay */
    .app-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        width: 260px;
        height: 100vh;
        z-index: 100;
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .app-sidebar.active {
        left: 0;
    }

    /* Dark overlay backdrop when sidebar is active */
    .sidebar-overlay-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(5,7,13,0.5);
        backdrop-filter: blur(4px);
        z-index: 90;
        animation: fadeIn 0.2s ease;
    }

    /* Mobile header toggling */
    .mobile-menu-btn {
        display: flex;
    }

    .app-header {
        height: auto;
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-welcome {
        margin-top: 6px;
    }

    .header-actions {
        width: 100%;
    }

    /* Horizontal scrollable stat pills on mobile */
    .quick-stats-pills {
        display: flex;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 8px;
        gap: 8px;
        white-space: nowrap;
        scrollbar-width: none; /* Firefox */
    }

    .quick-stats-pills::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .stat-pill {
        margin-left: 0;
        font-size: 11px;
        padding: 6px 12px;
    }

    /* Content viewport padding */
    .tab-container {
        padding: 20px;
    }

    /* Hub outline layout switches to column */
    .grid-layout.cols-4-1 {
        grid-template-columns: 1fr;
    }

    .chapter-list-card {
        height: 250px; /* shorter height on mobile */
    }

    .study-panel-container {
        margin-top: 16px;
    }

    /* Flex adjustments for mobile controls */
    .planner-setup {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

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

    .multiselect-group {
        justify-content: space-between;
    }

    /* Clocks layout on mobile */
    .clocks-container {
        flex-direction: column;
        gap: 24px;
    }

    /* Baskets container */
    .baskets-container {
        grid-template-columns: 1fr;
    }
}

