/* 🪐 COSMIC SYSTEM COLOR CONFIGURATIONS */
:root {
    --bg-color: #0b0914;
    --card-bg: rgba(20, 16, 38, 0.7);
    --text-main: #f0edff;
    --text-muted: rgba(240, 237, 255, 0.6);
    --accent: #00bcff;
    --accent-glow: rgba(0, 188, 255, 0.3);
    --border-color: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(0, 0, 0, 0.65);
    
    /* Quiz Specific Elements */
    --option-bg: rgba(255, 255, 255, 0.04);
    --option-border: rgba(255, 255, 255, 0.1);
    --option-hover: rgba(0, 188, 255, 0.1);
    --option-selected: #00bcff;
    --option-selected-text: #0b0914;

    --tip-urgent-bg: rgba(255, 75, 75, 0.12);
    --tip-urgent-border: #ff4b4b;
    --tip-passive-bg: rgba(40, 200, 120, 0.12);
    --tip-passive-border: #28c878;
}

/* ☀️ DYNAMIC LIGHT MODE OVERRIDE CONTROLS */
body.light {
    --bg-color: #f4f3fa;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #1e1b2e;
    --text-muted: rgba(30, 27, 46, 0.65);
    --accent: #0076a8;
    --accent-glow: rgba(0, 118, 168, 0.2);
    --border-color: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.85);
    
    /* Quiz Specific Light Overrides */
    --option-bg: rgba(0, 0, 0, 0.03);
    --option-border: rgba(0, 0, 0, 0.08);
    --option-hover: rgba(0, 118, 168, 0.08);
    --option-selected: #0076a8;
    --option-selected-text: #ffffff;

    --tip-urgent-bg: rgba(220, 0, 0, 0.06);
    --tip-urgent-border: #cc0000;
    --tip-passive-bg: rgba(0, 150, 50, 0.06);
    --tip-passive-border: #00802b;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 🌌 BACKGROUND SYSTEM CANVAS & NEBULA FILTERS */
#starCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
}

.nebula {
    position: fixed;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    z-index: -2;
    background: radial-gradient(circle at 30% 30%, rgba(138,43,226,0.15), transparent 45%),
                radial-gradient(circle at 70% 60%, rgba(0,191,255,0.12), transparent 45%);
    filter: blur(50px);
    animation: nebulaMove 40s linear infinite;
    pointer-events: none;
}

@keyframes nebulaMove {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 🧭 NAVIGATION */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 14px 10px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-sizing: border-box;
}

nav a, nav button {
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

nav a:hover, nav button:hover {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* 🏛 STRUCTURAL CARDS & SECTIONS */
header {
    text-align: center;
    padding: 130px 20px 30px;
}

header h1 { font-size: 2.4rem; margin: 0 0 10px; }
header p { color: var(--text-muted); margin: 0; }

main {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 📝 MULTIPLE CHOICE OPTION SELECTION MATRIX */
.quiz-item {
    margin-bottom: 35px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}

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

.quiz-item p {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: var(--text-main);
}

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

.option-btn {
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    background: var(--option-bg);
    border: 1px solid var(--option-border);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.option-btn:hover {
    background: var(--option-hover);
    border-color: var(--accent);
}

/* Active Highlight Class injected via Javascript execution click */
.option-btn.selected {
    background: var(--option-selected) !important;
    color: var(--option-selected-text) !important;
    border-color: var(--option-selected) !important;
    font-weight: 600;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: transform 0.1s, opacity 0.2s;
}

.submit-btn:hover { opacity: 0.95; }
.submit-btn:active { transform: scale(0.99); }

/* 📊 INTERACTIVE FEEDBACK CARDS */
.tip-card {
    padding: 18px;
    border-radius: 8px;
    margin-top: 15px;
    line-height: 1.6;
}
.tip-card.urgent {
    background: var(--tip-urgent-bg);
    border-left: 4px solid var(--tip-urgent-border);
}
.tip-card.passive {
    background: var(--tip-passive-bg);
    border-left: 4px solid var(--tip-passive-border);
}
.tip-card h4 { margin: 0 0 6px 0; font-size: 15px; }
.tip-card p { margin: 0; font-size: 14px; color: var(--text-main); }

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0b0914;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #00bcff;
    font-size: 18px;
    transition: opacity 0.3s;
}
