/* ESTILO DEFINITIVO - INFILTRADO (INOTEC URUGUAY) */

:root {
    --neon-blue: #00d2ff;
    --neon-red: #ff003c;
    --matrix-green: #00ff41;
    --bg-dark: #050505;
}

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

body, html { 
    height: 100%; 
    width: 100%; 
    font-family: 'Consolas', 'Courier New', monospace; 
    color: #ffffff; 
    background-color: var(--bg-dark);
    overflow: hidden;
}

/* FIX DE FONDO: EL VIDEO SE QUEDA ATRÁS */
.video-wrapper {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw; 
    height: 100vh;
    z-index: -10; /* Fondo absoluto */
    overflow: hidden;
}

#bg-video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    opacity: 0.4;
}

.dark-overlay {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    /* Oscurecemos más los bordes para resaltar el centro */
    background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.9) 100%);
    z-index: -5;
}

/* CONTENEDOR PRINCIPAL: SIEMPRE ADELANTE */
.main-terminal, .game-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10; /* Asegura que el logo y botones floten sobre el fondo */
}

.logo-gaming { 
    width: 160px; 
    filter: drop-shadow(0 0 15px var(--neon-red)); 
    margin-bottom: 20px;
    position: relative;
    z-index: 20;
}

.glitch-title {
    font-size: 4rem;
    color: var(--neon-red);
    text-shadow: 2px 2px var(--neon-blue), 0 0 20px rgba(255,0,60,0.5);
    letter-spacing: 15px;
    font-weight: bold;
    text-transform: uppercase;
}

/* BOTONES */
.btn-main {
    background: transparent;
    border: 2px solid var(--neon-red);
    color: var(--neon-red);
    padding: 15px 35px;
    font-size: 1rem;
    cursor: pointer;
    margin: 10px;
    transition: 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-main:hover {
    background: var(--neon-red);
    color: white;
    box-shadow: 0 0 25px var(--neon-red);
}

.btn-main.blue {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.btn-main.blue:hover {
    background: var(--neon-blue);
    color: black;
    box-shadow: 0 0 25px var(--neon-blue);
}

/* VENTANAS MODALES */
.modal {
    display: none;
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Siempre por encima de todo */
}

.modal-content {
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 40px;
    width: 90%;
    max-width: 420px;
    border-top: 5px solid var(--neon-red);
    text-align: center;
    box-shadow: 0 0 40px rgba(0,0,0,1);
}

input[type="text"] {
    width: 100%;
    background: #111;
    border: 1px solid var(--neon-blue);
    padding: 14px;
    color: white;
    margin-bottom: 15px;
    font-family: inherit;
    text-align: center;
    outline: none;
}

.btn-confirm {
    width: 100%;
    padding: 14px;
    background: var(--neon-red);
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    text-transform: uppercase;
    transition: 0.2s;
}

.btn-confirm:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px var(--neon-red);
}

.btn-cancel {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

/* ELEMENTOS DEL JUEGO */
.game-card {
    background: rgba(10, 10, 10, 0.98);
    border: 1px solid #333;
    padding: 40px;
    width: 95%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    position: relative;
}

.status-bar {
    background: #111;
    padding: 8px;
    font-size: 0.85rem;
    color: var(--matrix-green);
    margin: 15px 0;
    border: 1px solid #222;
    text-transform: uppercase;
}

.names-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 25px 0;
}

.badge {
    background: #1a1a1a;
    padding: 6px 18px;
    border: 1px solid var(--neon-blue);
    font-size: 0.95rem;
    color: var(--neon-blue);
}

.word-box {
    font-size: 2.8rem;
    color: var(--matrix-green);
    margin: 25px 0;
    text-shadow: 0 0 15px var(--matrix-green);
    font-weight: bold;
}

/* ANIMACIONES */
.blink { animation: blinker 1.5s linear infinite; }
@keyframes blinker { 50% { opacity: 0; } }

.loader {
    border: 4px solid #111;
    border-top: 4px solid var(--neon-blue);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    animation: spin 1s linear infinite;
    margin: 15px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }