/* =========================================================
   SING IN FRENCH — CSS
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #ffffff;
    overflow-x: hidden;

    background:
        radial-gradient(circle at 10% 10%, rgba(185,145,255,.22), transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(119,88,255,.18), transparent 30%),
        linear-gradient(135deg, #120b25, #1d1038 45%, #0d0920);
}

/* =========================================================
   FONDO
========================================================= */

body::before,
body::after {
    content: "";
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(151,94,255,.08);
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
}

body::before {
    top: 100px;
    left: -150px;
}

body::after {
    right: -150px;
    bottom: 100px;
}

/* =========================================================
   VOLVER
========================================================= */

.volver {
    display: inline-flex;
    margin: 25px 6%;
    padding: 11px 20px;

    color: #fff;
    text-decoration: none;

    border: 1px solid rgba(255,255,255,.18);
    border-radius: 30px;

    background: rgba(255,255,255,.07);
    backdrop-filter: blur(15px);

    transition: .3s;
}

.volver:hover {
    transform: translateX(-5px);
    background: rgba(255,255,255,.14);
}

/* =========================================================
   ENCABEZADO
========================================================= */

.encabezado {
    width: 88%;
    max-width: 1200px;
    margin: 10px auto 45px;

    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-letra {
    width: 75px;
    height: 75px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 24px;
    font-size: 38px;

    background: linear-gradient(135deg, #9b62ff, #6542e9);

    box-shadow: 0 15px 45px rgba(122,70,255,.45);

    animation: flotarLogo 3s ease-in-out infinite;
}

.encabezado h1 {
    font-size: clamp(32px, 5vw, 58px);
    letter-spacing: -2px;

    background: linear-gradient(
        90deg,
        #ffffff,
        #cbaeff,
        #ffffff
    );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.encabezado p {
    margin-top: 6px;
    color: #b9a9d8;
    font-size: 17px;
}

/* =========================================================
   PRESENTACIÓN
========================================================= */

.presentacion {
    width: 88%;
    max-width: 1200px;
    margin: auto;

    padding: 42px;
    text-align: center;

    border-radius: 30px;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.10),
            rgba(255,255,255,.035)
        );

    border: 1px solid rgba(255,255,255,.12);

    box-shadow: 0 30px 80px rgba(0,0,0,.25);

    backdrop-filter: blur(20px);

    animation: aparecer .8s ease;
}

.etiqueta {
    display: inline-block;

    padding: 8px 15px;

    border-radius: 50px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;

    color: #d7c3ff;

    background: rgba(151,100,255,.15);

    border: 1px solid rgba(170,130,255,.25);
}

.presentacion h2 {
    margin-top: 18px;
    font-size: clamp(28px, 4vw, 46px);
}

.presentacion p {
    max-width: 750px;
    margin: 15px auto 0;

    color: #bfb2d8;
    line-height: 1.7;
    font-size: 17px;
}

.presentacion strong {
    color: #c9a8ff;
}

/* =========================================================
   SELECCIÓN
========================================================= */

.seleccion {
    width: 88%;
    max-width: 1200px;
    margin: 70px auto;
}

.seleccion h2 {
    font-size: 32px;
    margin-bottom: 5px;
}

.subtitulo {
    color: #9e91b9;
    margin-bottom: 25px;
}

.canciones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

/* =========================================================
   TARJETAS
========================================================= */

.cancion {
    position: relative;

    min-height: 145px;

    display: flex;
    align-items: center;
    gap: 16px;

    padding: 22px;

    color: #ffffff;
    text-align: left;

    cursor: pointer;

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;

    background: rgba(255,255,255,.055);

    backdrop-filter: blur(18px);

    transition:
        transform .35s,
        border .35s,
        background .35s,
        box-shadow .35s;

    overflow: hidden;
}

.cancion:hover {
    transform: translateY(-8px) scale(1.015);

    border-color: rgba(180,140,255,.45);

    background: rgba(139,91,255,.12);

    box-shadow: 0 20px 45px rgba(0,0,0,.25);
}

.cancion.activa {
    border-color: rgba(184,145,255,.75);

    background:
        linear-gradient(
            135deg,
            rgba(135,85,255,.28),
            rgba(86,53,180,.14)
        );

    box-shadow:
        0 15px 50px rgba(105,60,255,.25);
}

.cancion.activa::after {
    content: "";

    position: absolute;
    left: 0;
    top: 15%;

    width: 4px;
    height: 70%;

    border-radius: 10px;

    background: linear-gradient(#c6a3ff, #7d4cff);

    box-shadow: 0 0 15px #8f5bff;
}

/* =========================================================
   NÚMERO
========================================================= */

.numero {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 17px;

    font-weight: 900;
    color: #d8c5ff;

    background: rgba(155,96,255,.15);

    border: 1px solid rgba(180,140,255,.18);
}

.info-cancion {
    flex: 1;
    min-width: 0;
}

.info-cancion h3 {
    font-size: 17px;
    margin-bottom: 6px;
}

.info-cancion p {
    color: #9185aa;
    font-size: 14px;
    margin-bottom: 10px;
}

.flecha {
    font-size: 25px;
    color: #80699f;
    transition: .3s;
}

.cancion:hover .flecha {
    color: #ffffff;
    transform: translateX(5px);
}

/* =========================================================
   ETIQUETAS
========================================================= */

.tag {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 800;
}

.tag.presente {
    color: #b9a1ff;
    background: rgba(137,89,255,.14);
}

.tag.pasado {
    color: #7fe6ff;
    background: rgba(44,191,255,.12);
}

.tag.ambos {
    color: #ffcb78;
    background: rgba(255,177,65,.12);
}

/* =========================================================
   ACTIVIDAD
========================================================= */

.actividad {
    width: 88%;
    max-width: 1200px;

    margin: 0 auto 70px;
    padding: 35px;

    border-radius: 34px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.085),
            rgba(255,255,255,.025)
        );

    border: 1px solid rgba(255,255,255,.12);

    box-shadow: 0 35px 90px rgba(0,0,0,.30);

    backdrop-filter: blur(25px);
}

/* =========================================================
   CABECERA ACTIVIDAD
========================================================= */

.cabecera-actividad {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;
}

#gramatica {
    display: inline-block;

    padding: 7px 13px;

    border-radius: 20px;

    color: #c7aaff;

    background: rgba(150,95,255,.13);

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
}

.cabecera-actividad h2 {
    margin-top: 10px;
    font-size: clamp(25px, 4vw, 40px);
}

.cabecera-actividad p {
    color: #9284a8;
    margin-top: 5px;
}

.numero-reto {
    min-width: 110px;

    padding: 14px 18px;

    text-align: center;

    border-radius: 18px;

    color: #a999bd;

    background: rgba(255,255,255,.05);
}

.numero-reto strong {
    color: #ffffff;
    font-size: 22px;
}

/* =========================================================
   REPRODUCTOR
========================================================= */

.reproductor {
    display: flex;
    align-items: center;
    gap: 22px;

    padding: 25px;
    margin-bottom: 25px;

    border-radius: 25px;

    background:
        linear-gradient(
            120deg,
            rgba(111,70,210,.17),
            rgba(255,255,255,.035)
        );

    border: 1px solid rgba(255,255,255,.08);
}

.disco {
    width: 78px;
    height: 78px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 34px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            #b997ff 0 8%,
            #6540b7 9% 25%,
            #24113f 26% 100%
        );

    box-shadow:
        0 0 0 8px rgba(145,94,255,.08),
        0 12px 35px rgba(111,61,255,.35);

    animation: girar 7s linear infinite;
    animation-play-state: paused;
}

.reproductor:hover .disco {
    animation-play-state: running;
}

.datos-musica {
    flex: 1;
}

.datos-musica h3 {
    margin-bottom: 5px;
}

.datos-musica p {
    color: #9385aa;
    font-size: 14px;
    margin-bottom: 13px;
}

audio {
    width: 100%;
    height: 42px;
}

/* =========================================================
   LEO
========================================================= */

.leo {
    display: flex;
    align-items: center;
    gap: 20px;

    margin: 28px 0;
    padding: 20px;

    border-radius: 27px;

    background:
        linear-gradient(
            135deg,
            rgba(122,74,255,.18),
            rgba(255,255,255,.04)
        );

    border: 1px solid rgba(166,125,255,.18);

    animation: aparecerLeo .7s ease;
}

.leo-avatar {
    position: relative;

    width: 100px;
    height: 100px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 32px;

    font-size: 55px;

    background:
        linear-gradient(
            145deg,
            #6e42d5,
            #34205c
        );

    border: 2px solid rgba(200,165,255,.3);

    box-shadow: 0 15px 35px rgba(90,45,190,.35);

    animation: leoFlota 2.5s ease-in-out infinite;
}

.leo-dialogo {
    flex: 1;

    padding: 20px 24px;

    border-radius: 22px;

    background: rgba(255,255,255,.07);
}

.leo-dialogo span {
    display: block;

    margin-bottom: 6px;

    color: #b992ff;

    font-size: 13px;
    font-weight: 900;
}

.leo-dialogo p {
    color: #eee8f8;
    line-height: 1.6;
    font-size: 16px;
}

/* =========================================================
   RETO
========================================================= */

.reto {
    display: flex;
    gap: 25px;

    padding: 35px;

    border-radius: 30px;

    background: rgba(9,5,20,.38);

    border: 1px solid rgba(255,255,255,.07);
}

.reto-icono {
    width: 75px;
    height: 75px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 23px;

    font-size: 34px;

    background:
        linear-gradient(
            135deg,
            rgba(145,91,255,.24),
            rgba(76,45,160,.14)
        );

    animation: iconoPulso 2s ease-in-out infinite;
}

.reto-contenido {
    flex: 1;
}

.reto-tipo {
    color: #9e78e8;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 1.5px;
}

.reto h2 {
    margin-top: 9px;
    font-size: clamp(22px, 3vw, 34px);
}

.reto-contenido > p {
    margin-top: 10px;

    color: #9b8ead;

    line-height: 1.6;
}

/* =========================================================
   MICRÓFONO
========================================================= */

.zona-microfono {
    position: relative;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    margin-top: 35px;
    padding: 25px;

    text-align: center;

    border-radius: 25px;

    background:
        radial-gradient(
            circle,
            rgba(131,78,255,.12),
            transparent 70%
        );
}

#btnMicrofono {
    position: relative;

    width: 90px;
    height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    color: #ffffff;

    font-size: 34px;

    cursor: pointer;

    background:
        linear-gradient(
            145deg,
            #9861ff,
            #5a35c2
        );

    box-shadow:
        0 15px 40px rgba(112,60,255,.40);

    transition: .3s;

    z-index: 2;
}

#btnMicrofono:hover {
    transform: scale(1.08);
}

#btnMicrofono:active {
    transform: scale(.94);
}

#btnMicrofono.escuchando {
    animation: microfonoActivo 1.1s infinite;
}

.microTexto {
    margin-top: 15px;
    color: #9788aa;
    font-size: 13px;
}

/* =========================================================
   ONDAS
========================================================= */

.ondas {
    position: absolute;

    width: 180px;
    height: 180px;

    pointer-events: none;
}

.ondas span {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 90px;
    height: 90px;

    transform:
        translate(-50%, -50%)
        scale(.5);

    border: 2px solid rgba(165,118,255,.45);

    border-radius: 50%;

    opacity: 0;
}

.ondas.activa span {
    animation: ondasMicro 2s infinite;
}

.ondas.activa span:nth-child(2) {
    animation-delay: .4s;
}

.ondas.activa span:nth-child(3) {
    animation-delay: .8s;
}

.ondas.activa span:nth-child(4) {
    animation-delay: 1.2s;
}

.ondas.activa span:nth-child(5) {
    animation-delay: 1.6s;
}

/* =========================================================
   RESULTADO
========================================================= */

.resultado {
    margin-top: 25px;

    padding: 35px;

    text-align: center;

    border-radius: 28px;

    background:
        linear-gradient(
            135deg,
            rgba(118,72,238,.18),
            rgba(255,255,255,.04)
        );

    border: 1px solid rgba(185,150,255,.2);

    animation: resultadoEntrada .5s ease;
}

.resultado.oculto {
    display: none;
}

.resultado-icono {
    font-size: 55px;
    margin-bottom: 10px;

    animation: rebote .7s ease;
}

.resultado h2 {
    font-size: 30px;
    margin-bottom: 10px;
}

.resultado p {
    color: #a89ab9;
    line-height: 1.6;
}

.puntos-ganados {
    display: inline-block;

    margin-top: 18px;
    padding: 10px 18px;

    border-radius: 30px;

    color: #e0cbff;

    background: rgba(146,92,255,.15);

    font-weight: 800;
}

.btn-siguiente {
    display: block;

    margin: 22px auto 0;
    padding: 14px 25px;

    border: none;
    border-radius: 15px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #9560ff,
            #6236c6
        );

    font-weight: 800;

    cursor: pointer;

    transition: .3s;
}

.btn-siguiente:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 30px rgba(104,54,210,.35);
}

/* =========================================================
   MARCADOR
========================================================= */

.marcador {
    width: 88%;
    max-width: 900px;

    margin: 0 auto 45px;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 15px;
}

.marcador > div {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-height: 120px;

    border-radius: 24px;

    background: rgba(255,255,255,.055);

    border: 1px solid rgba(255,255,255,.08);

    transition: .3s;
}

.marcador > div:hover {
    transform: translateY(-5px);

    background:
        rgba(142,88,255,.10);
}

.marcador span {
    font-size: 27px;
    margin-bottom: 7px;
}

.marcador strong {
    font-size: 28px;
}

.marcador small {
    color: #82748f;
    margin-top: 3px;
}

/* =========================================================
   PROGRESO
========================================================= */

.progreso {
    width: 88%;
    max-width: 900px;

    margin: 0 auto 80px;
}

.progreso-cabecera {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 12px;
}

.progreso-cabecera h2 {
    font-size: 20px;
}

#progresoNumero {
    color: #b998ff;
    font-weight: 900;
}

.barra {
    width: 100%;
    height: 13px;

    overflow: hidden;

    border-radius: 20px;

    background:
        rgba(255,255,255,.07);
}

.barra-interna {
    width: 0%;
    height: 100%;

    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            #6336c8,
            #b387ff,
            #6e42d9
        );

    box-shadow:
        0 0 20px rgba(150,94,255,.45);

    transition:
        width .7s ease;
}

/* =========================================================
   ANIMACIONES
========================================================= */

@keyframes flotarLogo {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes aparecerLeo {
    from {
        opacity: 0;
        transform: translateX(-25px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes leoFlota {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-7px) rotate(1deg);
    }
}

@keyframes girar {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes iconoPulso {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }
}

@keyframes microfonoActivo {
    0% {
        box-shadow:
            0 0 0 0 rgba(154,97,255,.65);
    }

    70% {
        box-shadow:
            0 0 0 25px rgba(154,97,255,0);
    }

    100% {
        box-shadow:
            0 0 0 0 rgba(154,97,255,0);
    }
}

@keyframes ondasMicro {
    0% {
        opacity: 0;

        transform:
            translate(-50%, -50%)
            scale(.5);
    }

    30% {
        opacity: .8;
    }

    100% {
        opacity: 0;

        transform:
            translate(-50%, -50%)
            scale(1.8);
    }
}

@keyframes resultadoEntrada {
    from {
        opacity: 0;

        transform:
            translateY(20px)
            scale(.97);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes rebote {
    0% {
        transform: scale(.4);
    }

    70% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 800px) {

    .presentacion,
    .actividad {
        padding: 25px;
    }

    .reto {
        flex-direction: column;
        padding: 25px;
    }

    .cabecera-actividad {
        align-items: flex-start;
        flex-direction: column;
    }

    .numero-reto {
        align-self: flex-start;
    }
}

/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 600px) {

    .volver {
        margin-left: 5%;
        margin-right: 5%;
    }

    .encabezado {
        width: 90%;
        margin-bottom: 30px;
    }

    .logo-letra {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        font-size: 28px;
    }

    .encabezado h1 {
        font-size: 32px;
    }

    .encabezado p {
        font-size: 14px;
    }

    .presentacion {
        width: 90%;
        padding: 28px 20px;
    }

    .presentacion h2 {
        font-size: 27px;
    }

    .seleccion,
    .actividad {
        width: 90%;
    }

    .canciones {
        grid-template-columns: 1fr;
    }

    .cancion {
        min-height: 125px;
    }

    .actividad {
        padding: 20px;
        border-radius: 25px;
    }

    .reproductor {
        flex-direction: column;
        text-align: center;
    }

    .datos-musica {
        width: 100%;
    }

    .leo {
        align-items: flex-start;
    }

    .leo-avatar {
        width: 70px;
        height: 70px;
        font-size: 38px;
        border-radius: 22px;
    }

    .leo-dialogo {
        padding: 16px;
    }

    .reto {
        padding: 20px;
    }

    .marcador {
        width: 90%;
        gap: 8px;
    }

    .marcador > div {
        min-height: 100px;
        border-radius: 18px;
    }

    .marcador span {
        font-size: 21px;
    }

    .marcador strong {
        font-size: 23px;
    }

    .marcador small {
        font-size: 11px;
    }

    .progreso {
        width: 90%;
    }
}