
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    overflow-x: hidden;
    background-color: #000;

    /* Capas: primero la textura, luego el degradado animado */
    background-image: 
        url('/res/img/textura-juego.jpg'), 
        linear-gradient(270deg, rgba(0, 0, 0, 0.85), rgba(15, 15, 15, 0.85), rgba(30, 30, 30, 0.85));

    background-repeat: repeat, no-repeat; /* La textura se repite, el degradado no */
    background-size: auto, 600% 600%;     /* Textura en su tamaño real, degradado animado */
    background-attachment: fixed;
    background-position: top left, center;

    color: #fff;
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 0;
}

* {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent; /* Android Chrome */
    -webkit-focus-ring-color: transparent;
    outline: none;
}

@keyframes fondoAnimado {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* sombra oscura, puedes aumentar o disminuir */
    z-index: -1;
}

h1 {
    margin-top: 20px;
    text-shadow: 2px 2px 4px #000;
}

#juego {
    display: flex;
    justify-content: center;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

.columna {
    flex: 1;
    height: 450px;
    margin: 0 5px;
    border: 2px solid #555;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    background-color: #222;
    transition: box-shadow 0.2s ease;
}

#columna-a .nota {
    background: linear-gradient(135deg, #00ffbf, #009f7f);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.4),
        inset 0 -1px 1px rgba(0,0,0,0.2),
        0 0 8px #00ffbf88;
    border: 1px solid #00c0a0;
    border-radius: 4px;
}

#columna-s .nota {
    background: linear-gradient(135deg, #fc8662, #d64c27);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.4),
        inset 0 -1px 1px rgba(0,0,0,0.2),
        0 0 8px #fc866288;
    border: 1px solid #d64c27;
    border-radius: 4px;
}

#columna-d .nota {
    background: linear-gradient(135deg, #64b5f6, #2c82c9);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.4),
        inset 0 -1px 1px rgba(0,0,0,0.2),
        0 0 8px #64b5f688;
    border: 1px solid #2c82c9;
    border-radius: 4px;
}

#columna-f .nota {
    background: linear-gradient(135deg, #f48fb1, #d0527a);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.4),
        inset 0 -1px 1px rgba(0,0,0,0.2),
        0 0 8px #f48fb188;
    border: 1px solid #d0527a;
    border-radius: 4px;
}


.columna.acierto {
    box-shadow: 0 0 15px 5px #00b0ff;
}

.columna.fallo {
    box-shadow: 0 0 15px 5px red;
}

.hitbox {
    position: absolute;
    bottom: 0;
    height: 40px;
    width: 100%;
    background: rgba(255,255,255,0.1);
    border-top: 2px solid #fff;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Asignar una imagen distinta por cada tecla */
#columna-a .hitbox {
    background-image: url('botones/triangulo.png');
    user-select: none;
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    touch-action: manipulation;
}
#columna-s .hitbox {
    background-image: url('botones/circulo.png');
    user-select: none;
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    touch-action: manipulation;
}
#columna-d .hitbox {
    background-image: url('botones/equis.png');
    user-select: none;
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    touch-action: manipulation;
}
#columna-f .hitbox {
    background-image: url('botones/cuadrado.png');
    user-select: none;
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    touch-action: manipulation;
}

.nota {
    position: absolute;
    width: 100%;
    height: 20px;
    top: 0;
}

button#iniciar {
    padding: 12px 24px;
    font-size: 18px;
    background-color: #e91e63;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    margin-top: 20px;
}

#marcador {
    font-size: 14px;
    margin-top: 20px;
}

#puntaje {
    font-size: 16px;
    margin-top: 10px;
}

/* Brillos según la racha */
.puntaje-normal { text-shadow: none; }
.puntaje-x2 { text-shadow: 0 0 10px #00e5ff; color: #00e5ff; }
.puntaje-x3 { text-shadow: 0 0 10px #d500f9; color: #d500f9; }
.puntaje-x4 { text-shadow: 0 0 15px gold; color: gold; }

#mensajeFinal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0,0,0,0.85);
    color: white;
    padding: 30px;
    border: 2px solid white;
    border-radius: 15px;
    z-index: 999;
    font-family: 'Press Start 2P', cursive;
    text-align: center;
}

#mensajeFinal button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 12px;
    background: #e91e63;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

#dificultad {
    margin-top: 20px;
}

#dificultad button {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #333;
    color: #fff;
    border: none;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#dificultad button:hover {
    background-color: #555;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.pop {
    animation: pop 0.3s ease-out;
}


.particula {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
    animation: explotar 0.8s ease-out forwards;
    z-index: 9999;
}

@keyframes explotar {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0.5);
        opacity: 0;
    }
}

#selectorCancion {
    font-size: 10px;
    padding: 8px;
    border-radius: 5px;
    margin: 10px;
}

#selectorCancion option {
    font-size: 10px; /* ajusta a tu gusto */
    font-family: 'Press Start 2P', cursive;
    background-color: #111;
    color: #fff;
    border: 2px solid #e91e63;
    padding: 5px;
}

#fondoJuego {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    overflow: hidden;
}

#brilloRacha {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
}


.fondo-x2 {
    animation: fondoAzul 1s infinite alternate;
}

.fondo-x3 {
    animation: fondoMorado 1s infinite alternate;
}

.fondo-x4 {
    animation: fondoDorado 1s infinite alternate;
}

@keyframes fondoAzul {
    from { background-color: rgba(0, 107, 133, 0.2); }
    to   { background-color: rgba(0, 191, 255, 0.3); }
}

@keyframes fondoMorado {
    from { background-color: rgba(91, 0, 115, 0.2); }
    to   { background-color: rgba(168, 77, 255, 0.3); }
}

@keyframes fondoDorado {
    from { background-color: rgba(133, 106, 1, 0.2); }
    to   { background-color: rgba(255, 215, 0, 0.3); }
}

.resultado-juego.oro {
    background: linear-gradient(135deg, #ffcc00, #fff2a8);
    border: 2px solid #bfa100;
    color: #111;
    padding: 2px;
}

.resultado-juego.plata {
    background: linear-gradient(135deg, #e0e0e0, #f9f9f9);
    border: 2px solid #aaaaaa;
    color: #111;
    padding: 2px;
}

.resultado-juego.bronce {
    background: linear-gradient(135deg, #d19058, #f0c49a);
    border: 2px solid #a66c2f;
    color: #111;
    padding: 2px;
}

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-contenido {
    background: #111;
    color: white;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    line-height: 1.5em;
    box-shadow: 0 0 20px #e91e63;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
}
.cerrar {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #fff;
}
#btnVolverInicio {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4d001a;
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: background-color 0.3s;
}

#btnVolverInicio:hover {
    background-color: #c2185b;
}

.circular_shadow { 
    width: 40px; 
    height: 40px; 
    border-radius: 150px; 
    -webkit-border-radius: 150px; 
    -moz-border-radius: 150px; 
    background-size: 40px 40px;
    box-shadow: 0 0 8px rgba(0, 0, 0, .8); 
    -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .8); 
    -moz-box-shadow: 0 0 8px rgba(0, 0, 0, .8);
    margin-top: 5px;

}

select, .form-control {
    background-color: #111;
    color: #fff;
    border: 2px solid #e91e63;
    padding: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    border-radius: 8px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.4);
    transition: box-shadow 0.3s ease;
}

select:hover {
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.8);
}

select:focus {
    box-shadow: 0 0 20px #e91e63;
}

.nota.dorada {
    background: radial-gradient(circle at 30% 30%, #fffac0, #ffd700, #cc9a00);
    border: 1px solid #fff3b0;
    box-shadow:
        0 0 8px #ffd700,
        0 0 16px #ffe066,
        inset 0 0 4px #ffffff;
    animation: brillarDorada 1s infinite alternate;
}

@keyframes brillarDorada {
    0% {
        filter: brightness(1.2) drop-shadow(0 0 4px #ffe066);
    }
    50% {
        filter: brightness(1.7) drop-shadow(0 0 8px #fff176);
    }
    100% {
        filter: brightness(1.3) drop-shadow(0 0 5px #ffd700);
    }
}


.nota.bomba {
    background-color: #1a0000;
    background-image: radial-gradient(circle, #330000, #000);
    border: 2px solid #ff0000;
    box-shadow: inset 0 0 5px #aa0000;
    animation: parpadearBomba 1.2s infinite alternate;
}

@keyframes parpadearBomba {
    0%   { filter: brightness(0.6) contrast(1); }
    100% { filter: brightness(0.85) contrast(1.2); }
}

.explosion-bomba {
    animation: temblorBomba 0.3s;
}

@keyframes temblorBomba {
    0% { transform: scale(1.05) rotate(-2deg); }
    50% { transform: scale(0.95) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.particula-bomba {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff0000;
    border-radius: 50%;
    opacity: 0.9;
    animation: estallarBomba 0.6s ease-out forwards;
    z-index: 1000;
}

@keyframes estallarBomba {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--x), var(--y)) scale(0.3); opacity: 0; }
}

#logoSaborLatinoContainer {
    margin-top: 5 px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    pointer-events: none; /* evita que interfiera con clics debajo */
}

#logoSaborLatino {
    width: 200px;
    height: auto;
}

/* En móviles, más pequeño */
@media (max-width: 600px) {
    #logoSaborLatino {
        width: 120px;
    }
}



#carruselWrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
}
#carruselCanciones {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px;
    scroll-behavior: smooth;
    max-width: 90vw;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}
.scroll-touch::-webkit-scrollbar {
    display: none;
}
.tarjeta-cancion {
    min-width: 100px;
    height: 100px;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.2s, border 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}
.tarjeta-cancion:hover {
    transform: scale(1.1);
}
.tarjeta-cancion.seleccionada {
    box-shadow: 0 0 6px 1px gold;
    border: 1px solid gold;
    animation: brilloBorde 1.5s infinite alternate;
}
@keyframes brilloBorde {
    from { box-shadow: 0 0 6px 2px gold; }
    to { box-shadow: 0 0 7px 2px gold; }
}
.tarjeta-cancion img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}
.tarjeta-cancion .titulo-cancion {
    font-size: 7px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    width: 100%;
    text-align: center;
    padding: 2px;
    position: absolute;
    bottom: 0;
    border-radius: 0 0 10px 10px;
}
.flechaCarrusel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    padding: 10px;
    border-radius: 50%;
    user-select: none;
}
#btnAnterior { left: 5px; }
#btnSiguiente { right: 5px; }

.vinilo-girando {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
    animation: girarVinilo 6s linear infinite;
}

.vinilo-girando img#viniloGirando {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}
#portadaPrincipal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid white;
    z-index: 2;
}
#nombreCancionSeleccionada {
    font-size: 12px;
    margin-top: 5px;
}

@keyframes girarVinilo {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-menu {
    display: block;
    width: 100%;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px 12px;
    margin: 10px 0;
    text-align: left;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-menu:active,
.btn-menu:focus {
    outline: none;
}

.btn-menu:hover {
    background-color: #444;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.btn-menu-lateral {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    background: #111;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 100;
}


.menu-lateral {
    position: fixed;
    right: -100%;
    top: 0;
    width: 200px;
    height: 100%;
    background: #222;
    padding: 15px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.4);
    transition: right 0.3s ease;
    z-index: 99;
}
.menu-lateral.abierto {
    right: 0;
}
.cerrar-lateral {
    background: none;
    color: white;
    font-size: 14px;
    border: none;
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
}

.btn-salir {
    background-color: #800000; /* burdeo */
    color: white;
    margin-top: auto; /* empuja hacia el fondo */
    font-size: 10px;
}

.btn-salir:hover {
    background-color: #a00000;
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.3);
}

#viniloCentral.minimizado {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 100px;
    height: 100px;
    z-index: 90;
    transition: all 0.4s ease;
}

#viniloCentral.minimizado .vinilo-girando {
    width: 90px;
    height: 90px;
}

#viniloCentral.minimizado #portadaPrincipal {
    width: 40px;
    height: 40px;
    border-width: 2px;
}

#viniloCentral.sin-fondo {
    background-color: transparent;
    box-shadow: none;
}

#viniloCentral.minimizado #nombreCancionSeleccionada {
    font-size: 10px;
    font-style: italic;
    font-family: 'Caveat', cursive; /* Puedes cambiar la fuente si prefieres otra */
    color: #ccc;
    margin-top: 4px;
    opacity: 0.7;
}

@media (max-width: 600px) {
    #viniloCentral.minimizado {
        top: 5px; /* sube el vinilo más arriba */
        left: 10px;
    }

    #viniloCentral.minimizado .vinilo-girando {
        width: 80px;
        height: 80px;
    }

    #viniloCentral.minimizado #portadaPrincipal {
        width: 35px;
        height: 35px;
    }

    #viniloCentral.minimizado #nombreCorto {
        font-size: 9px;
        margin-top: 4px;
        display: block;
        text-align: center;
    }
}

#menuPrincipal {
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 16px;
    padding: 5px;
    margin: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}
#viniloCentral {
    background-color: #111;
    border-radius: 12px;
    padding: 5px;
    margin-top: 5px;
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.3);
}

.estrellas-dificultad {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 28px;
    cursor: pointer;
    margin: 10px 0;
}

.estrella {
    color: #555; /* color más oscuro (apagado) por defecto */
    opacity: 0.4;
    transition: transform 0.2s, color 0.2s, opacity 0.2s;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.estrellas img, .estrellas button {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
}

.estrella.seleccionada {
    color: gold;
    opacity: 1;
    text-shadow: 0 0 6px #ffc107, 0 0 10px gold;
}

.estrella:hover {
    opacity: 1;
    transform: scale(1.2);
    color: gold;
    text-shadow: 0 0 4px #ffc107;
}

.btn-iniciar {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 8px 18px;
    background-color: #00c853;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 200, 83, 0.5);
    transition: background-color 0.3s ease;
}

.btn-iniciar:hover {
    background-color: #00b248;
}

.modal-contenido .form-group {
    margin-bottom: 12px;
}

.modal-contenido input {
    width: 100%;
    padding: 8px;
    background: #222;
    border: 1px solid #555;
    border-radius: 6px;
    color: white;
}

.modal-footer {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}

#preloader {
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e91867;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: girar 1s linear infinite;
}

@keyframes girar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#modalTop10 #filtroPeriodoTop10,
#modalTop10 #filtroCancion {
    display: block;
    width: 100%;
    box-sizing: border-box;
}