/*
 * Bioelectric engine — camada de fundo (canvas Three.js fixo + vinheta + loader + cursor).
 * Os painéis de HUD originais foram removidos; a UI visível vem de scroll.css.
 */

:root {
    --cyan: #00f0ff;
    --gold: #ffaa00;
    --magenta: #ff00aa;
    --bg-dark: #010204;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: var(--bg-dark);
    overflow-x: hidden;
}

/* Canvas do renderer (inserido direto no body pelo engine.js).
   Largura/altura ficam por conta do estilo inline do Three.js, que
   acompanha o viewport em cada resize. */
body > canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Vinheta (escurecimento das bordas). As scanlines/textura foram removidas. */
.overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
}

#cursor {
    position: fixed;
    top: 0; left: 0;
    width: 24px; height: 24px;
    border: 1px solid rgba(0, 240, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: screen;
    box-shadow: 0 0 10px rgba(0,240,255,0.4);
}
#cursor.click {
    width: 12px; height: 12px;
    background: var(--cyan);
    border-color: transparent;
}

#loader {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 1s ease;
}

#loader h1 {
    margin: 0;
    font-family: 'DM Mono', 'SF Pro Display', monospace;
    font-weight: 700;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.spinner {
    width: 50px; height: 50px;
    border: 2px solid rgba(0,240,255,0.1);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-bottom: 24px;
    box-shadow: 0 0 20px rgba(0,240,255,0.2);
}
@keyframes spin { 100% { transform: rotate(360deg); } }

@media (max-width: 720px) {
    .overlay {
        background:
            radial-gradient(circle at center, transparent 52%, rgba(0, 0, 0, 0.78) 100%);
        box-shadow: inset 0 0 60px rgba(0,0,0,0.82);
    }

    #cursor {
        display: none;
    }
}
