/* ============================================================================
   EDU-HUB MASTER THEMED ARCHITECTURAL STYLESHEET
   ============================================================================ */

/* ----------------------------------------------------------------------------
   THEME STYLING CONFIGURATIONS (CSS VARIABLES)
   ---------------------------------------------------------------------------- */

/* 1. Classic Blue (Default baseline) */
.theme-default {
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --success: #16a34a;
    --warning: #eab308;
    --dark: #0f172a;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --header-bg: #ffffff;
}

/* 2. Animated Rainbow Theme 🌈 */
@keyframes rainbowGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.theme-rainbow {
    --primary: #ff007f;
    --primary-light: #ffe5f1;
    --success: #00e676;
    --warning: #ffea00;
    --dark: #2a085c;
    --bg: #fff5f5;
    --card-bg: #ffffff;
    --text-color: #2a085c;
    --header-bg: #ffffff;
    /* Custom background override applied directly below */
}
.theme-rainbow body {
    background: linear-gradient(-45deg, #ff9a9e, #fecfef, #a1c4fd, #c2e9fb, #e0c3fc, #fedd6e);
    background-size: 400% 400%;
    animation: rainbowGradient 15s ease infinite;
}

/* 3. Cosmic Space (Dark Mode) 🚀 */
.theme-space {
    --primary: #a855f7;
    --primary-light: #3b0764;
    --success: #22c55e;
    --warning: #eab308;
    --dark: #f8fafc;
    --bg: #090514;
    --card-bg: #130b24;
    --text-color: #f1f5f9;
    --header-bg: #130b24;
}

/* 4. Fraction Forest 🌲 */
.theme-forest {
    --primary: #15803d;
    --primary-light: #dcfce7;
    --success: #16a34a;
    --warning: #eab308;
    --dark: #14532d;
    --bg: #f0fdf4;
    --card-bg: #ffffff;
    --text-color: #14532d;
    --header-bg: #ffffff;
}

/* 5. Crimson Sunset 🌇 */
.theme-sunset {
    --primary: #dc2626;
    --primary-light: #ffedd5;
    --success: #16a34a;
    --warning: #f97316;
    --dark: #450a0a;
    --bg: #fff7ed;
    --card-bg: #ffffff;
    --text-color: #450a0a;
    --header-bg: #ffffff;
}

/* 6. Cyber Neon (Dark Mode) ⚡ */
.theme-neon {
    --primary: #00ffff;
    --primary-light: #002b2b;
    --success: #39ff14;
    --warning: #ff007f;
    --dark: #ffffff;
    --bg: #0d0d0d;
    --card-bg: #1a1a1a;
    --text-color: #f0f0f0;
    --header-bg: #1a1a1a;
}

/* 7. Sweet Bubblegum 🍬 */
.theme-bubblegum {
    --primary: #ec4899;
    --primary-light: #fce7f3;
    --success: #10b981;
    --warning: #f59e0b;
    --dark: #4c0519;
    --bg: #fff1f2;
    --card-bg: #ffffff;
    --text-color: #4c0519;
    --header-bg: #ffffff;
}

/* 8. Deep Sea Diver 🐋 */
.theme-ocean {
    --primary: #0284c7;
    --primary-light: #e0f2fe;
    --success: #10b981;
    --warning: #f59e0b;
    --dark: #0c4a6e;
    --bg: #f0f9ff;
    --card-bg: #ffffff;
    --text-color: #0c4a6e;
    --header-bg: #ffffff;
}

/* 9. Dino Jungle 🦖 */
.theme-dinosaur {
    --primary: #854d0e;
    --primary-light: #fef9c3;
    --success: #16a34a;
    --warning: #ca8a04;
    --dark: #422006;
    --bg: #fefce8;
    --card-bg: #ffffff;
    --text-color: #422006;
    --header-bg: #ffffff;
}

/* 10. Honey Bee Hive 🐝 */
.theme-honey {
    --primary: #d97706;
    --primary-light: #fef3c7;
    --success: #16a34a;
    --warning: #b45309;
    --dark: #451a03;
    --bg: #fffbeb;
    --card-bg: #ffffff;
    --text-color: #451a03;
    --header-bg: #ffffff;
}

/* ----------------------------------------------------------------------------
   CORE LAYOUT FUNCTIONAL STYLES (USES ATTRIBUTED DESIGN VARIABLES)
   ---------------------------------------------------------------------------- */

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background-color: var(--header-bg);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    cursor: pointer;
}

/* Theme Selector Box styles */
.theme-selector-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}
.theme-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}
.theme-selector-box select {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    cursor: pointer;
}

nav { display: flex; gap: 10px; }

.nav-link {
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.score-tracker {
    background-color: #fef08a;
    border: 2px solid var(--warning);
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 700;
    color: #854d0e;
}

main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 25px;
}

.hidden { display: none !important; }

/* Home / Dashboard Panels */
.hero { text-align: center; max-width: 800px; margin: 40px auto; }
.hero h1 { font-size: 2.8rem; font-weight: 800; }

.search-box {
    display: flex;
    margin: 30px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.06);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 1px solid #cbd5e1;
}
.search-box input {
    flex: 1;
    border: none;
    padding: 20px 25px;
    font-size: 1.1rem;
    outline: none;
}
.search-box button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

.ai-response-frame {
    background: var(--card-bg);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    text-align: left;
    margin-top: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.ai-frame-header {
    background: var(--primary-light);
    color: var(--primary);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
.ai-output-content { padding: 30px; }

/* Encyclopedia Area */
.wiki-header { border-bottom: 2px solid var(--primary-light); padding-bottom: 10px; margin-bottom: 25px; }
.lessons-layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; }
.lesson-sidebar { background: var(--card-bg); border: 1px solid #cbd5e1; padding: 15px; border-radius: 8px; }
.sidebar-category { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; color: #64748b; margin: 15px 0 5px 5px; }
.tab-btn { background: none; border: none; padding: 8px 12px; width: 100%; text-align: left; font-size: 0.95rem; color: var(--primary); cursor: pointer; }
.tab-btn:hover, .tab-btn.active { background-color: var(--primary-light); font-weight: bold; border-radius: 4px; }

.wiki-document-panel { background: var(--card-bg); padding: 40px; border: 1px solid #cbd5e1; border-radius: 8px; }
.wiki-control-bar { background: var(--primary-light); padding: 10px 20px; border-left: 4px solid var(--primary); margin-bottom: 30px; display: flex; align-items: center; gap: 15px; }
.wiki-mode-btn { background: var(--card-bg); border: 1px solid #cbd5e1; padding: 6px 14px; border-radius: 4px; font-size: 0.85rem; cursor: pointer; color: var(--text-color); }
.wiki-mode-btn.active { background: var(--primary); color: white; }
.wiki-section-h2 { border-bottom: 1px solid var(--primary-light); padding-bottom: 4px; margin-top: 30px; }

/* Assessments Portal */
.stage-filter-row { display: flex; gap: 15px; margin: 25px 0; }
.stage-btn { background: var(--card-bg); border: 1px solid #cbd5e1; padding: 12px 24px; border-radius: 6px; font-weight: 600; cursor: pointer; color: var(--text-color); }
.stage-btn.active { background: var(--primary); color: white; }
.quiz-workspace { max-width: 700px; margin-top: 25px; }
.quiz-card { background: var(--card-bg); border: 1px solid #cbd5e1; padding: 35px; position: relative; border-radius: 8px; }
.badge { position: absolute; top: 20px; right: 20px; background: var(--primary-light); color: var(--primary); padding: 4px 12px; font-size: 0.8rem; font-weight: bold; border-radius: 4px; }
.quiz-options-vertical { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.quiz-opt-btn { background: var(--card-bg); border: 1px solid #cbd5e1; padding: 14px; border-radius: 4px; text-align: left; cursor: pointer; color: var(--text-color); }
.quiz-opt-btn:hover { background: var(--primary-light); }
