:root {
    --bg-deep-space: #0b0d17;
    --accent-blue: #4a90e2;
    --accent-purple: #9b51e0;
    --accent-gold: #f2c94c;
    --text-main: #e0e0e0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-deep-space);
    color: var(--text-main);
    font-family: var(--font-family);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#space-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
}

/* --- Stars Animation --- */
#stars, #stars2, #stars3 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
}

#stars {
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 1744px 122px #FFF , 134px 1321px #FFF , 43px 147px #FFF ,1142px 1424px #FFF;
    animation: animStar 50s linear infinite;
}

#stars:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 1744px 122px #FFF , 134px 1321px #FFF , 43px 147px #FFF , 1142px 1424px #FFF;
}

@keyframes animStar {
    from { transform: translateY(0px);}
    to   { transform: translateY(-2000px);}
}

/* --- Quiz Specifics --- */
.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.option-btn.correct {
    background: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
    color: #2ecc71;
}

.option-btn.wrong {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #e74c3c;
}

/* --- Timer Specifics --- */
.timer-display {
    font-size: 5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    margin: 1rem 0;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(242, 201, 76, 0.3);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* --- Animations --- */
.anima-fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

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

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--glass-border);
}

.stat-card .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-blue);
}

/* --- Header & UI --- */
header {
    text-align: center;
    z-index: 10;
}

header h1 {
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(155, 81, 224, 0.3);
}

header p {
    font-weight: 300;
    opacity: 0.8;
}

/* --- Universe & Floating Objects --- */
#universe {
    position: relative;
    flex-grow: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-object {
    position: absolute;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, filter 0.3s ease;
    user-select: none;
}

.floating-object .icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
    transition: filter 0.3s ease;
}

.floating-object span {
    margin-top: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    opacity: 0.7;
}

.floating-object:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.floating-object:hover .icon {
    filter: drop-shadow(0 0 15px var(--accent-blue));
}

/* Positions */
#obj-quiz { top: 20%; left: 20%; animation: float 6s ease-in-out infinite; }
#obj-explainer { top: 30%; right: 20%; animation: float 8s ease-in-out infinite reverse;}
#obj-timer { bottom: 25%; left: 25%; animation: float 7s ease-in-out infinite 1s;}
#obj-tracker { bottom: 20%; right: 25%; animation: float 9s ease-in-out infinite 0.5s;}

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

/* --- Modal & Cards --- */
#modal-overlay{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ✅ IMPORTANT FIX (cross hide) */
#modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.37);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
}

.close-btn:hover {
    opacity: 1;
}

/* Footer */
footer {
    width: 100%;
    display: flex;
    justify-content: center;
}

.stats-mini {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 2rem;
    border-radius: 50px;
    display: flex;
    gap: 2rem;
}

.stats-mini b {
    color: var(--accent-gold);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 { font-size: 2rem}
    .floating-object .icon { font-size: 3rem;}
    #obj-quiz { left: 10%;}
    #obj-explainer { right:10%;}
}