:root {
    --border-scale: 0.6;
}


body {
    margin: 0;
    min-height: 100vh;
    background: #0f2027;
    overflow: hidden;
    color: #fff;
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.6s ease;
    opacity: 1;

}

ul {
    list-style: none;
    text-align: center;
}

li {
    list-style: none;
}

body .neon-particle {

    position: absolute;
    width: 5px;
    height: 5px;
    background: #00ffcc;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
    animation-name: float;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

img {
    max-width: 100%;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(200px);
        opacity: 0;
    }
}

@keyframes parpadeoTextarea {
    0% {
        box-shadow:
            0 0 8px rgba(0, 255, 204, 0.4),
            0 0 16px rgba(0, 255, 204, 0.3);
        border-color: #00ffcc;
    }

    50% {
        box-shadow:
            0 0 18px rgba(0, 255, 204, 0.8),
            0 0 30px rgba(0, 255, 204, 0.9),
            0 0 45px rgba(0, 255, 204, 0.6);
        border-color: #6affea;
    }

    100% {
        box-shadow:
            0 0 8px rgba(0, 255, 204, 0.4),
            0 0 16px rgba(0, 255, 204, 0.3);
        border-color: #00ffcc;
    }
}

main {
    /* para el blur */
    position: relative;
    z-index: 1;
}



body.fade-out {

    opacity: 0;
    transform: scale(0.95);
}

html,
body {
    height: 100%;
    margin: 0;
}

body.index main {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-template-rows: repeat(2, auto);
    justify-items: center;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: 20px;
    margin-top: -100px;
}

body.index .copy {
    color: grey;
}



@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



body.index .logo {

    position: relative;
    display: inline-block;
    margin-top: -10px;


}

@keyframes neonPulse {

    0%,
    100% {
        box-shadow:
            0 0 10px #00ffcc,
            0 0 20px #00ffcc;
    }

    50% {
        box-shadow:
            0 0 20px #00ffcc,
            0 0 30px #00ffcc,
            0 0 40px #00ffcc;
    }
}

body.index .logo img {

    display: block;
    max-width: 250px;
    height: auto;
    padding-top: 6px;


}


body.index .logo::before {

    content: '';
    position: absolute;
    top: 0;
    left: 0;
    border: 2px solid #00ffcc;
    border-radius: 100%;
    width: 100%;
    height: 96%;
    box-shadow:
        0 0 10px #00ffcc,
        0 0 20px #00ffcc,
        0 0 30px #00ffcc;
    pointer-events: none;

    transform: scale(var(--border-scale));
    transform-origin: center;
    animation: neonPulse 3s ease-in-out infinite;

}


body.index button {

    position: relative;
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.15);
    border: 2px solid #00ffcc;
    border-radius: 15px;
    backdrop-filter: blur(6px) saturate(200%);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
    width: 250px;

    height: 100px;

    transition: all 0.3s ease;

}

body.TiempoTexto button,
body.cuentaletras button,
body.Sudoku button,
body.Punteria button {

    position: relative;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.15);
    border: 2px solid #00ffcc;
    border-radius: 15px;
    backdrop-filter: blur(6px) saturate(200%);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
    width: 180px;
    height: 60px;
    transition: all 0.3s ease;
}



body.index button::before,
body.TiempoTexto button::before,
body.cuentaletras button::before,
body.Sudoku button::before,
body.Punteria button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0) 80%);
    pointer-events: none;
    mix-blend-mode: overlay;

}


body.index button:hover {
    background: rgba(0, 255, 204, 0.15);
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.8);
    transform: scale(1.05);

}

body.TiempoTexto .botonEmpezarTiempo-TiempoTexto:hover,
body.cuentaletras .botonEmpezarTiempo:hover,
body.Sudoku .botonEmpezarTiempo:hover,
body.Punteria .botonEmpezarTiempo:hover {
    letter-spacing: 20px;
    border-color: #00ffcc;
    box-shadow: 0 0 25px rgba(0, 255, 204, 1), 0 0 50px rgba(0, 255, 204, 0.5);
    /* efecto de luz más intenso */
    transition: all 0.8s ease;
}

/* Al mantener pulsado */
body.index button:active,
body.TiempoTexto button:active,
body.cuentaletras button:active,
body.Sudoku button:active,
body.Punteria button:active {
    box-shadow: 0 0 30px #0ff;
    background: #00aaff;
    letter-spacing: 2px;
}

/* Cambia la distribucion de los elementos
en funcion del tamaño de la pantalla */
@media (max-width: 600px) {
    body.index main {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        margin-top: 50px;
    }

    body.index .logo {
        display: none;
    }

}


body.TiempoTexto .contenedorPrincipal,
body.cuentaletras .contenedorPrincipal,
body.Sudoku .contenedorPrincipal,
body.Punteria .contenedorPrincipal {

    background: rgba(26, 24, 24, 0.767);
    border-radius: 10%;
    backdrop-filter: blur(6px) saturate(200%);
    padding: 10px 30px;

}

body.TiempoTexto .img {
    max-width: 40%;
}

body.TiempoTexto .textoUsuario-TiempoTexto.bloqueado {
    color: #00ffcc;
    text-align: center;
    font-weight: bold;
}

body.TiempoTexto .instruccion,
body.cuentaletras .instruccion {
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

body.TiempoTexto .instrucciones {

    border: 2px dashed #00ffcc !important;
    font-weight: bold;
}

body.TiempoTexto .texto {
    font-family: monospace;
    font-weight: bold;
}

body.TiempoTexto .home,
body.cuentaletras .home,
body.Sudoku .home,
body.Punteria .home {
    position: fixed;
    top: 0;
    left: 0;
    width: 70px;
    height: 70px;
    margin-left: 10px;
    margin-top: 10px;
    border-radius: 100%;
    padding: 0;
}


body.TiempoTexto .home:hover,
body.cuentaletras .home:hover,
body.Sudoku .home:hover,
body.Punteria .home:hover {
    box-shadow: 0 0 30px #0ff;
    background: #00aaff;
}


body.TiempoTexto .textoUsuario-TiempoTexto,
body.Sudoku .textoUsuario-TiempoTexto,
body.Punteria .textoUsuario-TiempoTexto {

    width: 556px;
    height: 85px;
    box-sizing: border-box;
    font-size: 20px;
    color: #fff;
    background: transparent;
    border: 2px solid #00ffcc;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
    margin-bottom: 20px;
    resize: none;
    line-height: 1.4;
    padding-top: calc(20px + 10px);
    padding-left: 15px;
    transform: scale(0.95);
    animation: parpadeoTextarea 1s ease-in-out infinite;
}


body.TiempoTexto .transformado .botonEmpezarTiempo-TiempoTexto,
body.Sudoku .transformado .botonEmpezarTiempo,
body.Punteria .transformado .botonEmpezarTiempo {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

body.TiempoTexto .transformado .textoUsuario-TiempoTexto,
body.cuentaletras .transformado .botonesFila,
body.Sudoku .transformado .textoUsuario-TiempoTexto,
body.Punteria .transformado .textoUsuario-TiempoTexto {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

body.TiempoTexto .resultadoTiempo,
body.Sudoku .resultadoTiempo,
body.Punteria .resultadoTiempo {

    border-radius: 15px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px) saturate(200%);
    border: 2px solid #00ffcc;
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.6);
    text-align: center;
    display: none;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

body.TiempoTexto .botonEmpezarTiempo-TiempoTexto,
body.TiempoTexto .textoUsuario-TiempoTexto,
body.cuentaletras .botonesFila,
body.Sudoku .textoUsuario-TiempoTexto,
body.Sudoku .botonEmpezarTiempo,
body.Punteria .textoUsuario-TiempoTexto,
body.Punteria .botonEmpezarTiempo {
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
}

body.cuentaletras .instrucciones {

    border-radius: 15px;
    text-align: center;
    padding: 25px;
    margin: 15px;

}

body.cuentaletras .divPalabrasAleatorias {
    display: none;
    padding: 10px 10px;
}

body.cuentaletras .textoPuntuacion {
    font-size: 20px;
}

body.cuentaletras .tablaPuntuacion,
body.cuentaletras h2,
body.cuentaletras .parejasAcertadas {
    text-align: center;
}

body.TiempoTexto .textoUsuario-TiempoTexto,
body.Sudoku .textoUsuario-TiempoTexto,
body.Punteria .textoUsuario-TiempoTexto {
    transform-origin: center;
}

body.TiempoTexto .oculto,
body.Sudoku .oculto,
body.Punteria .oculto {
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
}

body.TiempoTexto .resultadoTiempo.mostrar {
    display: block;
    margin: 0;
    padding: 20px 30px;
    opacity: 1;
    transform: translateY(-8px) scale(1);
}



body.TiempoTexto .reintentar,
body.Sudoku .reintentar ,
body.Punteria .reintentar{
    display: none;

}


body.TiempoTexto .botonesFila {

    display: flex;
    gap: 10px;
    justify-content: center;

}

body.TiempoTexto .botonEmpezarTiempo-TiempoTexto,
body.cuentaletras .botonEmpezarTiempo,
body.Sudoku .botonEmpezarTiempo,
body.Punteria .botonEmpezarTiempo {
    font-size: 30px;
    cursor: pointer;
    border-radius: 12px;
    background-color: #00ffcc;
    color: #1b1414;
    font-weight: 900;
    width: 556px;
    height: 85px;
    transition: all 0.8s ease;
    letter-spacing: 0;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
    border-color: #00ffcc;
}


body.TiempoTexto .textAreaBotones-TiempoTexto,
body.Sudoku .textAreaBotones-TiempoTexto,
body.Punteria .textAreaBotones-TiempoTexto {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    width: 556px;
    height: 85px;

}

body.TiempoTexto .textAreaBotones-TiempoTexto>button,
body.TiempoTexto .textAreaBotones-TiempoTexto>textarea,
body.Sudoku .textAreaBotones-TiempoTexto>button,
body.Sudoku .textAreaBotones-TiempoTexto>textarea,
body.Punteria .textAreaBotones-TiempoTexto>button,
body.Punteria .textAreaBotones-TiempoTexto>textarea {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

body.TiempoTexto .tiempo {
    font-size: 15px;
    white-space: nowrap;
    transition:
        font-size 0.4s ease,
        opacity 0.3s ease,
        transform 0.3s ease;
}

body.TiempoTexto .tiempo.cambio {
    opacity: 0;
    transform: scale(0.9);
}

body.TiempoTexto .divTexto,
body.cuentaletras .parejasAcertadas,
body.cuentaletras .puntuacion {

    position: relative;
    font-size: 15px;
    color: #00ffcc;
    border: 2px solid #00ffcc;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
    margin-bottom: 20px;
    padding: 15px;

}

body.cuentaletras .puntuacion {
    border: 5px solid #00ffcc;
}

body.cuentaletras .parejasAcertadas,
body.cuentaletras .puntuacion {
    margin-top: 10px;
    color: white;
}

body.cuentaletras .parejasAcertadas {
    box-shadow: none;
}

body.TiempoTexto .divTiempo,
body.cuentaletras .divTiempo,
body.Sudoku .divTiempo,
body.Punteria .divTiempo {

    margin: 0 auto;
    color: #00ffcc;
    background: transparent;
    border: 1px solid #00ffcc;
    border-radius: 15px;
    /*     box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
 */
    margin-bottom: 20px;
    width: fit-content;
    min-width: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    will-change: transform;
    transform-origin: center;

    transition:
        background-color 1s ease,
        opacity 0.8s ease,
        transform 0.8s ease,
        height 0.8s ease,
        margin 0.8s ease,
        padding 0.8s ease;

    overflow: hidden;
    height: auto;
    padding: 0.5em 1em;


}

body.cuentaletras .tablaPalabrasAcertadas {
    padding-left: -50px;
}

body.TiempoTexto .divTiempo.ocultar,
body.cuentaletras .divTiempo.ocultar,
body.cuentaletras .botonesFila.ocultar {
    opacity: 0;
    transform: scale(0);


}


body.TiempoTexto .divTiempo.animar {
    transform: scale(0);
}

body.cuentaletras .oculto {
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

body.cuentaletras ul.palabrasLetrasAContrar {

    gap: 15px;
    list-style: none;
    padding: 0;
    color: white;
    text-align: center;
    font-weight: bold;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 0;
    margin: 10px auto;

}

body.TiempoTexto .textAreaBotones-TiempoTexto,
body.Sudoku .textAreaBotones-TiempoTexto,
body.Punteria .textAreaBotones-TiempoTexto {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    width: 556px;
    height: 85px;

}




body.cuentaletras .textoInformativo,
body.cuentaletras .divPalabrasAleatorias {

    border: 2px solid #00ffcc !important;
}

body.cuentaletras .textoInformativo {
    pointer-events: none;
}

body.cuentaletras .tiempo {

    font-size: 15px;
    white-space: nowrap;
    transition:
        font-size 0.4s ease,
        opacity 0.3s ease,
        transform 0.3s ease;
}

body.cuentaletras .botonesFila {
    margin: 0 auto;
    color: #00ffcc;
    background: transparent;
    border-radius: 15px;
    /*     box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
 */
    margin-bottom: 20px;
    width: fit-content;
    min-width: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: transform;
    transform-origin: center;

    transition:
        background-color 1s ease,
        opacity 0.8s ease,
        transform 0.8s ease,
        height 0.8s ease,
        margin 0.8s ease,
        padding 0.8s ease;

    overflow: hidden;
    height: auto;
    padding: 0.5em 1em;

}


body.cuentaletras .divTiempo.animar,
body.cuentaletras .botonesFila.animar {
    transform: scale(1.1);
}

body.cuentaletras .tiempo.cambio {
    opacity: 0;
    transform: scale(0.9);
}

body.cuentaletras li {
    cursor: pointer;
}

body.cuentaletras li:hover {

    text-shadow:
        -1px -1px 0 #00FFCC,
        1px -1px 0 #00FFCC,
        -1px 1px 0 #00FFCC,
        1px 1px 0 #00FFCC;
}

body.cuentaletras .divResultados {
    pointer-events: none;
}

body.cuentaletras main {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.Sudoku textarea {

    resize: none;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body.Sudoku table {

    margin-bottom: 20px;
    width: 500px;
    height: auto;
    display: none;
    border-collapse: collapse;

}

body.Sudoku td {
    text-align: center;
    vertical-align: middle;
    width: 40px;
    height: 40px;
    padding: 0;
}

body.Sudoku .contenedorPrincipal {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 10px;

}

body.Sudoku textarea,
body.Punteria textarea {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.Punteria table {
    border-collapse: collapse;
    margin-top: 20px;
}

body.Sudoku td textarea {
    width: 100%;
    height: 100%;
    resize: none;
    border: none;
    outline: none;

    background: rgba(0, 255, 204, 0.08);
    color: #00ffcc;

    font-size: 26px;
    font-weight: bold;
    text-align: center;
    line-height: 1;

    cursor: text;
    caret-color: #00ffcc;

    font-family: 'Arial', monospace;
    line-height: 40px;
}

body.Sudoku td textarea:hover {
    background: rgba(0, 255, 204, 0.15);
}

body.Sudoku td {
    position: relative;
}

body.Sudoku .resultadoTiempo,body.Punteria .resultadoTiempo {
    padding: 5px;
    margin: 10px;
}

body.Sudoku .contenedorPrincipal {
    padding-bottom: 20px;
}

body.Punteria td {
    width: 30px;
    height: 30px;
    background-color: rgb(0, 255, 64);
    border: 2px solid #1b1414;

}

body.Punteria .contenedorPrincipal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 auto;
    margin: 0 auto;
    
}

body.Punteria table {
    margin-top: 25px;
    margin-bottom: 20px;
    border-collapse: separate;
    border-spacing: 6px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 20px;
    backdrop-filter: blur(10px) saturate(180%);
    box-shadow:
        0 0 25px rgba(0, 255, 204, 0.25),
        inset 0 0 15px rgba(0, 255, 204, 0.1);

    width: 500px;
    
}


body.Punteria td {
    width: 20px;
    height: 20px;
    border-radius: 8px;
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.35);
    cursor: pointer;

    transition:
        background-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

body.Punteria td[style*="green"] {
    background: #00ffcc !important;
    box-shadow:
        0 0 12px rgba(0, 255, 204, 1),
        0 0 25px rgba(0, 255, 204, 0.8);
    transform: scale(1.2);
}

body.Punteria td[style*="red"] {
    background: #00ff66 !important;
    box-shadow:
        0 0 8px rgba(0, 255, 102, 0.8),
        0 0 16px rgba(0, 255, 102, 0.6);
}