:root {
    --echo-page-top-offset: 40px; /* INSTÄLLNING - Avståndet från toppen för hela layouten. */
    --echo-section-gap: 16px; /* INSTÄLLNING - Avståndet mellan HUD, spelplan och instruktion. */
    --echo-panel-size: min(450px, calc(100vh - 350px)); /* INSTÄLLNING - Storlek på spelpanelen. */
    --echo-veil-opacity: 0.72; /* INSTÄLLNING - veilOpacity */
    --echo-glow: 0.30; /* INSTÄLLNING - echoGlowStrength */
    --reveal-pulse: 0.36; /* INSTÄLLNING - revealPulseStrength */
}

.fade-in-up.delay-1 {
    padding-top: var(--echo-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: var(--radius-lg);
    cursor: crosshair;
    overflow: hidden;
    box-shadow: 
        inset 0 12px 60px rgba(0, 0, 0, 1),
        0 20px 60px rgba(0, 0, 0, 0.5);
}

.instruction-text { font-size: 0.875rem; color: var(--text-muted); }
.instruction-text.active { color: var(--accent); }

#veil {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 25%, #050507 85%);
    opacity: var(--echo-veil-opacity, 0.72); /* INSTÄLLNING - veilOpacity */
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.echo-point {
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: #8b6cff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(139, 108, 255, var(--echo-glow, 0.30)); /* INSTÄLLNING - echoGlowStrength */
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.echo-point.revealed { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
.echo-point.found { 
    background-color: #4cc9f0; 
    box-shadow: 0 0 25px rgba(76, 201, 240, 0.5); 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1.2); 
    border-color: rgba(255, 255, 255, 0.3);
}

#pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border: 2px solid rgba(139, 108, 255, var(--reveal-pulse, 0.36)); /* INSTÄLLNING - revealPulseStrength */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 0 15px rgba(139, 108, 255, 0.2);
}

.pulse-animation {
    animation: pulseRing 1.5s ease-out forwards;
}

@keyframes pulseRing {
    0% { width: 0; height: 0; opacity: 0.8; }
    100% { width: 150%; height: 150%; opacity: 0; }
}

/* Echo Veil Overlay specific overrides */
.overlay-title { font-size: 2rem; margin-bottom: 0.5rem; text-shadow: 0 0 20px var(--accent-glow); }
.overlay-desc { color: var(--text-muted); margin-bottom: 1.5rem; max-width: 400px; }


/* 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;
    }
}
