/* Estilos generales - Paleta de colores basada en la imagen de referencia */
:root {
    --color-predominante: #1a1a2e; /* Fondo principal oscuro */
    --color-secundario: #16213e; /* Azul oscuro */
    --color-acento: #e94560; /* Rojo/rosa vibrante */
    --color-fondo: #0f3460; /* Azul medio */
    --color-texto: #ffffff; /* Texto claro para contraste */
}

body {
    font-family: 'Poppins', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('img/fondoINICIO.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--color-texto);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 46, 0.7);
    z-index: -1;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background-color: var(--color-secundario);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    padding: 25px;
    text-align: center;
}

#pantalla-principal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    border-radius: 20px;
    background-color: rgba(100, 149, 237, 0.7);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    width: 90%;
    max-width: 800px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#pantalla-principal::before {
    content: none;
}

@keyframes pulseBackground {
    0% {
        transform: scale(1);
        filter: saturate(1.2) contrast(1.1) brightness(0.7);
    }
    50% {
        filter: saturate(1.4) contrast(1.2) brightness(0.8);
    }
    100% {
        transform: scale(1.05);
        filter: saturate(1.3) contrast(1.15) brightness(0.75);
    }
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    padding: 20px;
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    max-width: 150px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.5));
    animation: pulseLogo 3s infinite alternate;
}

@keyframes pulseLogo {
    from { transform: scale(1); filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.5)); }
    to { transform: scale(1.05); filter: drop-shadow(0 0 15px rgba(233, 69, 96, 0.8)); }
}

h1, .title {
    color: var(--color-texto);
    font-size: 3.2rem;
    margin-bottom: 40px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3), 0 0 20px rgba(233, 69, 96, 0.5);
    letter-spacing: 1px;
    background: linear-gradient(45deg, #ffffff, #e94560);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradientText 4s linear infinite;
}

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

#startBtn {
    background-color: var(--color-acento);
    color: white;
    border: none;
    padding: 16px 38px;
    font-size: 1.3rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#startBtn:hover {
    background-color: #d03d55;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.6);
}

/* Pantalla del reproductor */
#pantalla-reproductor {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-radius: 20px;
    background-color: rgba(100, 149, 237, 0.7);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 90%;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#pantalla-reproductor::before {
    content: none;
}

#mensaje-cancion {
    font-size: 20px;
    margin: 15px 0;
    color: var(--color-texto);
    font-weight: 600;
    letter-spacing: 0.5px;
}

#contador-tiempo {
    font-size: 46px;
    margin: 30px auto;
    font-weight: 700;
    color: var(--color-secundario);
    background-color: var(--color-texto);
    width: 130px;
    height: 80px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: none;
    transition: all 0.3s ease;
}

#etapa {
    font-size: 20px;
    margin: 20px 0 30px;
    color: var(--color-acento);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.reproductor {
    background-color: var(--color-fondo);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin: 25px 0;
}

.progress-bar {
    height: 100%;
    width: 0;
    background-color: var(--color-acento);
    border-radius: 6px;
}

.botonera {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.botonera button {
    width: 65px;
    height: 65px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.botonera button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.botonera button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#playBtn {
    background-color: var(--color-acento);
    color: white;
}

#playBtn:hover {
    background-color: #d03d55;
}

#stopBtn {
    background-color: #f44336;
    color: white;
}

#stopBtn:hover {
    background-color: #d32f2f;
}

#nextBtn {
    background-color: var(--color-fondo);
    color: white;
}

#nextBtn:hover {
    background-color: #0a2a4e;
}

#exitBtn {
    background-color: #333;
    color: white;
}

#exitBtn:hover {
    background-color: #222;
}

/* Estilos para la ventana modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-contenido {
    background-color: rgba(61, 90, 128, 0.8);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-contenido::before {
    content: none;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background-color: var(--color-acento);
    color: white;
    padding: 18px;
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.modal-body {
    padding: 25px;
    text-align: center;
    color: var(--color-texto);
}

.modal-body p {
    font-size: 1.3rem;
    margin: 15px 0;
    letter-spacing: 0.5px;
}

#nombre-cancion, #puntos-ganados {
    font-weight: bold;
    color: var(--color-acento);
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.3);
}

#countdown {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 20px auto;
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--color-acento);
}

.modal-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#cerrar-modal {
    background-color: var(--color-acento);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(233, 69, 96, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#cerrar-modal:hover {
    background-color: #d03d55;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(233, 69, 96, 0.4);
}