:root {
    --night-page-top-offset: 40px; /* INSTÄLLNING - Avståndet från toppen för hela layouten. */
    --night-section-gap: 16px; /* INSTÄLLNING - Avståndet mellan HUD, spelplan och instruktion. */
    --night-panel-size: min(450px, calc(100vh - 350px)); /* INSTÄLLNING - Storlek på spelpanelen. */
    --night-pulse-glow: 0.36; /* INSTÄLLNING - nightPulseGlow */
    --timing-window-glow: 0.26; /* INSTÄLLNING - Ändra hur tydligt timingfönstret syns. */
    --miss-feedback-opacity: 0.24; /* INSTÄLLNING - Ändra hur tydlig miss-feedback är. */
}

.fade-in-up.delay-1 {
    padding-top: var(--night-page-top-offset);
}

#game-container {
    position: relative;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle at center, #0a0a0f, #050507);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    cursor: crosshair;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 
        inset 0 12px 60px rgba(0, 0, 0, 1),
        0 20px 60px rgba(0, 0, 0, 0.5);
}

#target-ring {
    position: absolute;
    width: 80%;
    height: 80%;
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
}

#target-ring.hit {
    border-color: #8b6cff;
    box-shadow: 
        0 0 30px rgba(139, 108, 255, 0.4),
        inset 0 0 20px rgba(139, 108, 255, 0.2);
    transform: scale(1.015);
}

#target-ring.miss {
    border-color: #ff4c4c;
    box-shadow: 
        0 0 30px rgba(255, 76, 76, 0.4),
        inset 0 0 20px rgba(255, 76, 76, 0.2);
}

.pulse {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
}

.pulse.true { 
    border-color: #8b6cff; 
    box-shadow: 0 0 15px rgba(139, 108, 255, var(--night-pulse-glow)); 
}
.pulse.false { border-color: rgba(255, 255, 255, 0.08); }

.overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 2rem;
    text-align: center;
    border-radius: 50%;
}

.overlay.hidden { display: none; }
.overlay-title { font-size: 1.75rem; margin-bottom: 0.5rem; }
.overlay-desc { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; max-width: 240px; }
.instruction-text { font-size: 0.875rem; color: var(--text-muted); }


/* INSTÄLLNING - Global Mobile Fallback Fix */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}
@media (max-width: 800px) {
    canvas, .game-canvas, #game-container, #game-stage, #app {
        max-width: 100% !important;
        height: auto;
    }
    .panel, .sidebar, .menu, #ui, #overlay {
        max-width: 100% !important;
        box-sizing: border-box;
    }
}
