/* --- MOTOR DEL JUEGO BASADO EN STE-VG --- */
@import url('https://fonts.googleapis.com/css?family=Comfortaa');

:root {
    --color-dark: #1a1a1a;
    --neon-pink: #ff0000;
}

html, body {
    font-family: 'Comfortaa', cursive;
    background-color: #050505; /* Fondo oscuro */
}

/* Créditos estilo Ste-vg */
.credits {
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 100;
}

.credits a {
    text-decoration: none;
    color: var(--color-dark);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--neon-pink);
    padding-bottom: 2px;
    transition: all 0.3s;
}

.credits a:hover {
    color: var(--neon-pink);
    background: rgba(255, 255, 255, 0.2);
}

/* UI del Juego */
#container {
    flex-grow: 1;
    width: 100%;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

#game {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

#score {
    position: absolute;
    top: 20px;
    width: 100%;
    text-align: center;
    font-size: 10vh;
    color: var(--color-dark);
    z-index: 10;
    pointer-events: none;
}

.game-over, .game-ready {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
    text-align: center;
}

#start-button {
    pointer-events: auto;
    cursor: pointer;
    padding: 15px 30px;
    border: 3px solid var(--color-dark);
    background: transparent;
    font-family: 'Comfortaa', cursive;
    font-size: 24px;
    font-weight: bold;
    color: var(--color-dark);
    transition: all 0.3s;
}

#start-button:hover {
    background: var(--color-dark);
    color: #fff;
}

/* Visibilidad de estados */
#container.playing #score { opacity: 1; }
#container.ready #score { opacity: 0; }
#container.ended #start-button { display: block; }
.hide { display: none !important; }

/* --- BACKGROUND & TEXTURES --- */
.bg-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(20, 20, 20, 0.8) 0%, transparent 100%),
        url('https://www.transparenttextures.com/patterns/asfalt-dark.png');
    opacity: 0.8;
    z-index: -3;
    pointer-events: none;
}

.liminal-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    z-index: -2;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.vhs-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 0, 0, 0.1);
    z-index: -1;
    pointer-events: none;
    animation: vhs-move 4s linear infinite;
}

@keyframes vhs-move {
    0% { top: -5%; }
    100% { top: 105%; }
}

@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes flicker {
    0% { opacity: 0.8; }
    5% { opacity: 0.9; }
    10% { opacity: 0.8; }
    15% { opacity: 1; }
    20% { opacity: 0.8; }
    25% { opacity: 0.7; }
    30% { opacity: 1; }
    100% { opacity: 0.9; }
}
