/* FUENTE RETRO */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    background: #000;
    color: #39ff14;
    font-family: "Press Start 2P", monospace;
    text-align: center;
    padding-top: 40px;
    overflow-y: auto;
    overflow-x: hidden;
}

h1 {
    text-shadow: 0 0 10px #39ff14, 0 0 20px #39ff14;
    font-size: 40px;
    animation: neonPulse 1s infinite alternate;
}

#palabraOculta {
    font-size: 30px;
    letter-spacing: 10px;
    margin-top: 20px;
    text-shadow: 0 0 8px #39ff14;
}

#intentos, #categoria {
    margin-top: 10px;
    font-size: 18px;
}

input {
    margin-top: 20px;
    padding: 10px;
    width: 50px;
    text-align: center;
    background: black;
    border: 2px solid #39ff14;
    color: #39ff14;
}

button {
    margin-left: 10px;
    padding: 10px;
    background: black;
    border: 2px solid #39ff14;
    color: #39ff14;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #39ff14;
    color: black;
    box-shadow: 0 0 10px #39ff14;
}

#letrasIncorrectas {
    margin-top: 20px;
    font-size: 14px;
}

#gameOver {
    display: none;
    font-size: 55px;
    font-weight: bold;
    color: #ff1a1a;
    text-shadow: 0 0 8px #ff0000;
    margin-top: 30px;
    animation: bloodPulse 1s infinite alternate;

    z-index: 100000;
position: relative;
}

#ganaste {
    display: none;
    font-size: 55px;
    font-weight: bold;
    color: cyan;
    text-shadow: 0 0 10px cyan;
    margin-top: 30px;
    animation: neonPulse 1s infinite alternate;
    z-index: 100000;
position: relative;
}

#botonReiniciar button {
    margin-top: 20px;
    font-size: 18px;
    background: black;
    border: 2px solid cyan;
    color: cyan;
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 0 8px cyan;
}

#botonReiniciar button:hover {
    box-shadow: 0 0 15px cyan;
    transform: scale(1.1);
}

/* TECLADO */
#teclado {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.tecla {
    margin: 3px;
    padding: 12px 18px;
    background: #111;
    border: 2px solid #39ff14;
    color: #39ff14;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    font-family: monospace;
}

.tecla:hover {
    background: #39ff14;
    color: black;
    box-shadow: 0 0 8px #39ff14;
}

/* Ahorcado neon */
#ahorcadoAnimado {
    color: #ff00ff;
    font-size: 70px;
    animation: glow 1.3s infinite alternate, float 2s infinite ease-in-out;
    margin-bottom: 20px;
    text-shadow: 0 0 15px #ff00ff;
}

/* Humo neon */
#humoNeon {
    width: 100%;
    height: 120px;
    background: radial-gradient(circle, rgba(0,255,180,0.15), transparent);
    filter: blur(40px);
    animation: smoke 6s infinite ease-in-out;
    opacity: 0.05;
}

/* ANIMACIONES */
@keyframes neonPulse {
    from { text-shadow: 0 0 5px #0f0; }
    to { text-shadow: 0 0 20px #0f0; }
}

@keyframes bloodPulse {
    from { opacity: 0.5; transform: scale(1); }
    to { opacity: 1; transform: scale(1.07); }
}

@keyframes glow {
    from { text-shadow: 0 0 8px hotpink; opacity: 0.6; }
    to { text-shadow: 0 0 25px hotpink; opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

@keyframes smoke {
    0% { opacity: .2; transform: translateY(0); }
    50% { opacity: .5; transform: translateY(-10px); }
    100% { opacity: .2; transform: translateY(0); }
}

/* CRT Scanlines */
.scanlines {
    pointer-events: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top:0;
    left:0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0.05),
        rgba(0,0,0,0.05) 2px,
        rgba(0,0,0,0.10) 3px
    );
    z-index: 99999;
}

/* Está­tica TV */
.staticNoise {
    pointer-events: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top:0;
    left:0;
    opacity: .07;
    background-image: url("https://media.giphy.com/media/oEI9uBYSzLpBK/giphy.gif");
    background-size: cover;
    mix-blend-mode: screen;
    z-index: 99998;
}

/* Contador errores esquina */
#contadorErr {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.6);
    color: #00ffea;
    font-size: 18px;
    font-family: monospace;
    border-radius: 8px;
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px #00ffff;
}
#rankingTop {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.6);
    color: #00ffea;
    font-size: 14px;
    font-family: monospace;
    border-radius: 8px;
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px #00ffff;
    text-align: left;
    line-height: 18px;
    min-width: 120px;
}
#contadorErr {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.6);
    color: #00ffea;
    font-size: 18px;
    font-family: monospace;
    border-radius: 8px;
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px #00ffff;
}
.panelIncorrectas {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
}

/* Cuadrados individuales */
.letraError {
    width: 28px;
    height: 28px;
    background: #440000;
    border: 2px solid #ff3333;
    color: #ff6666;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: monospace;
    font-size: 16px;
    border-radius: 4px;
    box-shadow: 0 0 6px #ff3333;
}