:root {
    --bg-color: #FFFFFF;
    --text-main: #1D1D1F;
    --text-light: #86868B;
    --accent-blue: #007AFF;
    --accent-red: #FF3B30;
    --glass: rgba(255, 255, 255, 0.7);
    --shadow: 0 20px 40px rgba(0,0,0,0.05);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    touch-action: none;
}

/* --- AURORA BACKGROUND --- */
.blob-cont {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: #FFFFFF;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 15s infinite alternate;
}

.blob-one {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #E0F2FE;
}

.blob-two {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: #F3E8FF;
    animation-delay: -5s;
}

.blob-three {
    top: 40%;
    left: 30%;
    width: 30vw;
    height: 30vw;
    background: #E0E7FF;
    opacity: 0.2;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 60px) scale(1.1);
    }
}

/* --- NAVIGATION --- */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 2rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-img {
    height: 40px;
    width: auto;
    mix-blend-mode: multiply;
}

.logo span {
    font-weight: 700;
    letter-spacing: -0.05em;
    font-size: 1.1rem;
}

.nav-links {
    list-style: none;
}

    .nav-links a {
        font-weight: 500;
        color: var(--text-light);
        text-decoration: none;
        transition: var(--transition);
    }

        .nav-links a:hover {
            color: var(--accent-red);
        }

/* --- GAME AREA --- */
#game-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 60px;
}

.game-card {
    position: relative;
    padding: 0;
    background: transparent;
    border-radius: 16px;
}

canvas {
    background: white;
    border-radius: 16px;
    display: block;
    box-shadow: var(--shadow);
    max-width: 100vw;
    max-height: 80vh;
}

#ui-layer {
    position: absolute;
    top: 40px;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

#score-display {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(0,0,0,0.05);
    line-height: 1;
}

#instruction {
    margin-top: 10px;
    color: var(--accent-blue);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* --- MODALS (Shared Styles) --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid #E5E5E7;
}

.warning-text {
    color: var(--accent-red);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.math-display {
    font-size: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-soft);
    border-radius: 12px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.math-btn {
    padding: 1rem;
    border: 1px solid #E5E5E7;
    background: white;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-main);
}

    .math-btn:hover {
        border-color: var(--accent-blue);
        color: var(--accent-blue);
        transform: translateY(-2px);
    }

/* ... (Keep all your existing CSS) ... */

/* --- ADD THIS AT THE BOTTOM --- */
.final-score-display {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 20px 0;
    letter-spacing: -0.05em;
    line-height: 1;
}