@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Playfair+Display:ital,wght=1,600&display=swap');

:root {
    --color-sangre: #8B0000;
    --color-sangre-brillante: #ff0000;
    --fondo-oscuro: #050000;
    --transicion-suave: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
    height: 100%;
    width: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0b0000;
    color: #fff;
    font-family: 'Cinzel', serif;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: none; /* Ocultamos el cursor real */
    touch-action: none; /* Evita scroll y gestos del sistema */
}

/* Estilos Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fondo-oscuro);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    transition: opacity 1s ease;
}

.loader-ritual {
    width: 82px;
    height: 82px;
    margin-bottom: 24px;
    overflow: visible;
    fill: transparent;
    stroke: var(--color-sangre);
    stroke-width: 42;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter:
        drop-shadow(0 0 10px rgba(139, 0, 0, 0.8))
        drop-shadow(0 0 28px rgba(255, 0, 0, 0.25));
    animation: ritual-pulse 2.8s infinite ease-in-out;
}

.loader-heartagram-trace {
    stroke-dasharray: 7600;
    stroke-dashoffset: 7600;
    animation: dibujar-heartagram 2.45s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

@keyframes dibujar-heartagram {
    0% {
        stroke-dashoffset: 7600;
        fill: rgba(139, 0, 0, 0);
        opacity: 0.35;
    }

    72% {
        stroke-dashoffset: 0;
        fill: rgba(139, 0, 0, 0);
        opacity: 1;
    }

    88% {
        stroke-dashoffset: 0;
        fill: rgba(139, 0, 0, 0.16);
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        fill: rgba(139, 0, 0, 0.08);
        opacity: 0.72;
    }
}

@keyframes ritual-pulse {
    0%, 100% {
        transform: scale(0.96);
        filter:
            drop-shadow(0 0 10px rgba(139, 0, 0, 0.75))
            drop-shadow(0 0 24px rgba(255, 0, 0, 0.2));
    }

    72% {
        transform: scale(1.025);
        filter:
            drop-shadow(0 0 14px rgba(255, 0, 0, 0.65))
            drop-shadow(0 0 28px rgba(139, 0, 0, 0.38));
    }
}

#preloader p {
    font-size: 0.7rem;
    letter-spacing: 5px;
    color: var(--color-sangre);
}

#custom-cursor {
    width: 32px;
    height: 32px;
    background: transparent;
    position: fixed;
    pointer-events: none;
    z-index: 30000;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #8B0000;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.8);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.8s ease, color 0.2s ease;
    will-change: left, top, transform;
}

/* Intensificamos el pentagrama al pasar sobre algo clickeable en lugar de usar el emoji */
body:has(.corazon-container:hover, #click-hint:hover, button:hover, #btn-fullscreen:hover) #custom-cursor {
    transform: translate(-50%, -50%) scale(1.4);
    color: #ff0000;
    text-shadow: 0 0 25px #ff0000, 0 0 45px rgba(139, 0, 0, 0.7);
}

#custom-cursor::after {
    content: "⛧";
}

body:active #custom-cursor {
    transform: translate(-50%, -50%) scale(0.85);
    color: #ff0000;
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
}

#btn-fullscreen {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10020;
    background: rgba(15, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: opacity;
    font-family: Arial, sans-serif;
    backdrop-filter: blur(4px);
    animation: fullscreen-pulse 3.6s infinite ease-in-out;
}

#btn-fullscreen:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(139, 0, 0, 0.2);
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

@keyframes fullscreen-pulse {
    0%, 100% {
        box-shadow:
            inset 0 0 14px rgba(0, 0, 0, 0.7),
            0 0 16px rgba(139, 0, 0, 0.2);
    }

    50% {
        box-shadow:
            inset 0 0 14px rgba(0, 0, 0, 0.66),
            0 0 28px rgba(255, 0, 0, 0.34);
    }
}

#btn-saltar-final {
    position: fixed;
    top: 24px;
    right: 84px; /* Espaciado simétrico respecto al de pantalla completa */
    z-index: 1000;
    background: rgba(15, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: opacity;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.08);
}

#btn-saltar-final.skip-visible {
    /* El JS ahora maneja la opacidad real para la inactividad */
}

#btn-saltar-final:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(139, 0, 0, 0.2);
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

@media (max-width: 640px) {
    #btn-saltar-final {
        top: 70px;
        right: 16px;
        padding: 8px 4px;
        font-size: 0.52rem;
        letter-spacing: 3.8px;
    }
}

body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Usamos una variable controlada por JS para la intensidad del latido */
    background: radial-gradient(circle, rgba(48, 0, 0, 0.05) 0%, transparent 40%, rgba(0,0,0,calc(0.75 + var(--vignette-boost, 0) * 0.2)) 90%, #000 100%);
    pointer-events: none;
    z-index: 20;
    transition: background 0.1s ease;
}

#mensaje-top-autor, 
#mensaje-top-autor-2, 
#mensaje-top-autor-3, 
#mensaje-top-autor-4, 
#mensaje-top-autor-5 {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 0 12px var(--color-sangre);
    letter-spacing: 6px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
    text-transform: uppercase;
}

/* Capa de ruido cinematográfico */
.ruido-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grains.vercel.app/grain.png'); /* Puedes usar una textura de ruido local */
    opacity: 0.04;
    pointer-events: none;
    z-index: 50;
}

/* Efecto de Niebla Gótica */
.niebla-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40vh;
    overflow: hidden;
    z-index: 5;
    pointer-events: none;
    mask-image: linear-gradient(to top, black, transparent);
    transform: translateZ(50px); /* Paralaje */
}

.niebla-capa {
    position: absolute;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(40, 0, 0, 0.2) 0%, transparent 70%);
    filter: blur(40px);
    animation: mover-niebla 20s linear infinite;
}

.niebla-capa:nth-child(2) {
    background: radial-gradient(circle at 50% 50%, rgba(20, 20, 20, 0.3) 0%, transparent 70%);
    animation-duration: 35s;
    animation-direction: reverse;
    opacity: 0.6;
}

@keyframes mover-niebla {
    0% { transform: translateX(-25%) translateY(10px); }
    50% { transform: translateX(0%) translateY(-10px); }
    100% { transform: translateX(-25%) translateY(10px); }
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

#escenario-experiencia {
    position: relative;
    z-index: 100;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

#pantalla-inicio {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: entrada-pantalla-inicio 1.4s ease-out both;
    transition: opacity 1.4s ease, transform 1.4s ease, filter 1.4s ease;
}

@keyframes entrada-pantalla-inicio {
    0% {
        opacity: 0;
        transform: scale(0.94);
        filter: blur(6px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.aura-eclipse {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(
        circle,
        rgba(45, 0, 15, 0.6) 0%,
        rgba(0,0,0,0) 65%
    );
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    animation: aura-pulso 4s infinite ease-in-out;
}

.corazon-container {
    width: 220px;
    height: 220px;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    overflow: visible;
    opacity: 0.68;
    filter:
        drop-shadow(0 0 18px rgba(255, 0, 0, 0.35))
        drop-shadow(0 0 38px rgba(139, 0, 0, 0.42))
        drop-shadow(0 0 54px rgba(0, 0, 0, 0.9));
    animation: flicker-vampirico 4s infinite alternate ease-in-out;
    cursor: none;
    will-change: transform, filter, opacity;
    transition: opacity 0.5s ease, filter 0.5s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    touch-action: manipulation;
}

.corazon-container:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.32);
    outline-offset: 14px;
}

.corazon-container::before {
    content: "";
    position: absolute;
    inset: 8px;
    z-index: 1;
}

.corazon-container:hover {
    opacity: 0.92;
    filter:
        drop-shadow(0 0 28px rgba(255, 0, 0, 0.55))
        drop-shadow(0 0 54px rgba(139, 0, 0, 0.5))
        drop-shadow(0 0 64px rgba(0, 0, 0, 0.9));
}

.corazon-latido {
    width: 150px;
    height: 150px;
    overflow: visible;
    animation: latido-cinematico 2.5s infinite cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    position: relative;
    z-index: 2;
}

.corazon-latido svg,
.corazon-latido path {
    pointer-events: none;
}

@keyframes latido-cinematico {

    0% { transform: scale(1); }
    10% { transform: scale(1.15); } 
    12% { transform: scale(1.1); }
    15% { transform: scale(1.18); } /* Latido doble más agresivo */
    30% { transform: scale(1); }
    45% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* Capa de iluminación reactiva */
#musica-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.4) 0%, transparent 80%);
    pointer-events: none;
    z-index: 15; /* Detrás del texto pero sobre el fondo */
    opacity: 0;
    mix-blend-mode: screen;
    will-change: opacity;
}

.svg-vector-custom {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Vibración de pantalla sincronizada */
body.latido-fuerte #escenario-experiencia {
    animation: sacudida-sutil 0.2s ease-in-out;
}

body.ritual-inicio #escenario-experiencia {
    animation: ritual-sacudida 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

body.momento-lyric #musica-flash {
    opacity: 0.45 !important;
}

body.momento-lyric #escenario-experiencia {
    animation: momento-profundidad 1.4s ease-out;
}

body.secreto-alx #nombre-alx {
    animation: secreto-alx 2.8s ease-out;
}

body.volviendo-inicio::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.34), rgba(5, 0, 0, 0.92) 65%, #000 100%);
    z-index: 25000;
    pointer-events: none;
    animation: fade-retorno 1.4s ease-out forwards;
}

@keyframes sacudida-sutil {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.005); filter: contrast(1.1); }
}

@keyframes ritual-sacudida {
    0% { transform: scale(1); filter: brightness(1); }
    35% { transform: scale(1.035); filter: brightness(1.35) contrast(1.18); }
    100% { transform: scale(0.96); filter: brightness(0.72) blur(4px); }
}

@keyframes momento-profundidad {
    0%, 100% { filter: brightness(1); }
    45% { filter: brightness(0.72) contrast(1.25); }
}

@keyframes secreto-alx {
    0%, 100% {
        color: rgba(255,255,255,0.28);
        text-shadow: 0 0 10px rgba(139, 0, 0, 0.18);
    }

    35%, 68% {
        color: #fff;
        letter-spacing: 20px;
        text-shadow:
            0 0 22px rgba(255, 255, 255, 0.7),
            0 0 44px rgba(255, 0, 0, 0.8),
            0 0 70px rgba(139, 0, 0, 0.55);
    }
}

@keyframes fade-retorno {
    0% { opacity: 0; }
    45% { opacity: 1; }
    100% { opacity: 0; }
}
/* Onda de choque al hacer clic */
.onda-pulso {
    position: absolute;
    border: 2px solid #8B0000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 90;
    animation: expandir-onda 0.8s ease-out forwards;
}

@keyframes expandir-onda {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 250px; height: 250px; opacity: 0; }
}

@keyframes viñeta-latido {
    0%, 100% { opacity: 0.85; filter: brightness(1); }
    10% { opacity: 1; filter: brightness(0.8) contrast(1.2); }
}

@keyframes flicker-vampirico {
    0%, 100% {
        filter:
            drop-shadow(0 0 24px rgba(255, 0, 0, 0.32))
            drop-shadow(0 0 42px rgba(139, 0, 0, 0.38))
            contrast(1.12);
    }
    33% {
        filter:
            drop-shadow(0 0 38px rgba(255, 0, 0, 0.52))
            drop-shadow(0 0 62px rgba(180, 0, 0, 0.45))
            contrast(1.32);
    }
    66% {
        filter:
            drop-shadow(0 0 20px rgba(255, 0, 0, 0.25))
            drop-shadow(0 0 34px rgba(139, 0, 0, 0.28))
            contrast(1.05);
    }
}

/* Gotas de sangre */
.gota-sangre {
    position: absolute;
    width: 3px;
    height: 8px;
    background: #8B0000;
    border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
    pointer-events: none;
    z-index: 150;
    filter: drop-shadow(0 0 2px #4a0000);
}

@keyframes caer-sangre {
    0% { transform: translateY(0) scaleY(1); opacity: 0.9; }
    100% { transform: translateY(150px) scaleY(2); opacity: 0; }
}

@keyframes aura-pulso {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

#click-hint {
    margin-top: 30px;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 7px;
    animation: respiracion-letras 4s infinite ease-in-out;
    position: relative;
    padding: 18px 26px;
    cursor: none;
    transition: color 0.3s ease;
    z-index: 5;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: min(92vw, 720px);
    line-height: 1.6;
}

#click-hint::before,
#click-hint::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-sangre) 50%, transparent);
    transition: all 0.8s ease;
}

#click-hint::before { top: 0; }
#click-hint::after { bottom: 0; }

#click-hint:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.8);
}

@keyframes respiracion-letras {

    0%,100% {
        letter-spacing: 7px;
        opacity: 0.48;
        text-shadow: 0 0 0px transparent;
    }

    50% {
        letter-spacing: 10px;
        opacity: 1;
        color: var(--color-sangre-brillante);
        text-shadow: 0 0 15px var(--color-sangre);
    }
}

#lyrics-container {
    width: 85%;
    display: none;
    opacity: 0;
    transition: opacity 1.35s ease, filter 1.35s ease;
    transform-origin: center;
    animation: respiracion-lyric-escena 5.8s ease-in-out infinite;
}

#texto-lyric {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 3.5rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
    text-shadow:
        0 0 30px rgba(255, 0, 0, 0.8),
        0 0 50px rgba(0, 0, 0, 1);
    --lyric-glow: 0;
    --lyric-high: 0;
    opacity: 0;
    filter: blur(0px); /* Sin desenfoque para mejor legibilidad */
    transform: translateY(0px); /* No hay movimiento vertical */
    will-change: opacity, transform, filter;
    /* Transición de salida: Desaceleración suave y lenta para efecto de "hundimiento" */
    transition: opacity 0.8s ease-out, filter 0.8s ease-out; /* Solo opacidad y filtro para la salida */
    margin: 0;
    width: 100%;
    overflow-wrap: break-word;
    position: relative;
    isolation: isolate;
}

#texto-lyric.visible {
    filter: drop-shadow(0 0 calc(10px + var(--lyric-glow) * 20px) rgba(255, 0, 0, 0.5));
    text-shadow:
        0 2px 0 rgba(40, 0, 0, 0.72),
        0 10px 28px rgba(0, 0, 0, 0.92),
        0 0 calc(24px + (var(--lyric-glow) * 20px)) rgba(255, 0, 0, 0.72),
        0 0 calc(44px + (var(--lyric-glow) * 24px)) rgba(139, 0, 0, 0.34),
        0 0 54px rgba(0, 0, 0, 1);
}

#texto-lyric::before {
    content: attr(data-ghost);
    position: absolute;
    inset: 0;
    z-index: -1;
    color: transparent;
    pointer-events: none;
    transform: translateY(10px) scale(1.018);
    filter: blur(9px);
    opacity: 0;
    text-shadow:
        0 0 24px rgba(139, 0, 0, 0.58),
        0 18px 42px rgba(0, 0, 0, 0.95);
}

#texto-lyric.visible::before {
    opacity: calc(0.36 + (var(--lyric-glow) * 0.22));
    animation: profundidad-lyric 4.6s ease-in-out infinite;
}

#texto-lyric.pulso-romantico {
    animation: pulso-romantico 1.1s ease-out;
}

.lyric-word {
    display: inline-block;
    position: relative;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    will-change: opacity, transform, text-shadow, filter;
    animation:
        aparecer-palabra var(--word-duration, 0.55s) ease-out var(--word-delay, 0s) forwards,
        brillo-palabra 0.62s ease-out var(--word-glow-delay, 0s) both;
}

@keyframes aparecer-palabra {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes brillo-palabra {
    0% {
        text-shadow: 0 0 0 rgba(255, 0, 0, 0);
        filter: brightness(0.86);
    }

    45% {
        text-shadow:
            0 0 22px rgba(255, 255, 255, 0.62),
            0 0 calc(30px + (var(--lyric-high) * 34px)) rgba(255, 0, 0, 0.92);
        filter: brightness(calc(1.12 + (var(--lyric-high) * 0.48)));
    }

    100% {
        text-shadow: 0 0 calc(12px + (var(--lyric-glow) * 16px)) rgba(139, 0, 0, 0.62);
        filter: brightness(1);
    }
}

@keyframes pulso-romantico {
    0%, 100% { transform: scale(1); }
    45% {
        transform: scale(1.035);
        text-shadow:
            0 0 38px rgba(255, 0, 0, 0.92),
            0 0 70px rgba(139, 0, 0, 0.5),
            0 0 60px rgba(0, 0, 0, 1);
    }
}

@keyframes respiracion-lyric-escena {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: saturate(1);
    }

    50% {
        transform: translateY(-3px) scale(1.006);
        filter: saturate(1.08);
    }
}

@keyframes profundidad-lyric {
    0%, 100% {
        transform: translateY(10px) scale(1.018);
        filter: blur(9px);
    }

    50% {
        transform: translateY(13px) scale(1.026);
        filter: blur(12px);
    }
}

#texto-lyric.pico-alto {
    animation: pico-texto-alto 0.48s ease-out;
}

body.pico-alto-audio #musica-flash,
body.audio-pico-alto #musica-flash {
    opacity: 0.62 !important;
}

body.audio-pico-alto #escenario-experiencia {
    animation: sacudida-agudos 0.34s ease-out;
}

@keyframes pico-texto-alto {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }

    42% {
        transform: scale(1.026);
        filter: brightness(1.42) contrast(1.16);
        text-shadow:
            0 0 30px rgba(255, 255, 255, 0.84),
            0 0 58px rgba(255, 0, 0, 0.95),
            0 0 92px rgba(139, 0, 0, 0.58);
    }
}

@keyframes sacudida-agudos {
    0%, 100% { filter: brightness(1); }
    40% { filter: brightness(1.22) contrast(1.12); }
}

#traduccion-lyric {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: rgba(255,255,255,0.4);
    margin-top: 15px;
    display: block;
    letter-spacing: 2px;
    opacity: 0;
    width: 100%;
    overflow-wrap: break-word;
    filter: blur(0px); /* Sin desenfoque para mejor legibilidad */
    will-change: opacity, filter;
    transition: opacity 0.8s ease-out, filter 0.8s ease-out; /* Solo opacidad y filtro para la salida */
}

.visible {
    opacity: 1 !important;
    transform: translateY(0) !important; /* Asegura que no haya movimiento vertical, pero permite el glitch */
    filter: blur(0) !important;
    /* Transición de entrada: elegante y decelerada suavemente */
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, filter 0.4s ease-out !important; /* Entrada más rápida para legibilidad */
}

/* Animación Glitch para las letras */
.glitch-effect {
    animation: glitch 0.4s cubic-bezier(.25,.46,.45,.94) both;
}

@keyframes glitch {
    0% { transform: translate(0); text-shadow: 2px 2px #8B0000; }
    20% { transform: translate(-3px, 3px); text-shadow: -2px -2px #ff0000; }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

/* Optimización para pantallas táctiles */
@media (pointer: coarse) {
    #custom-cursor { display: none !important; }
    body { cursor: auto; }
    button,
    #click-hint,
    #nombre-alx,
    #btn-fullscreen,
    #btn-saltar-final {
        cursor: pointer;
    }
}

/* Aviso de Rotación */
#aviso-rotacion {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 0, 0, 0.58);
    backdrop-filter: blur(4px);
    z-index: 10000; /* Por encima de todo */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.58);
    padding: 20px;
    pointer-events: none;
}

@media (max-width: 1024px) and (orientation: portrait) {
    #aviso-rotacion {
        display: none;
    }
}

#aviso-rotacion.mostrar {
    display: flex;
    animation: aviso-aparecer 1s ease-out forwards;
}

@media (pointer: coarse) and (orientation: portrait) {
    #aviso-rotacion {
        display: flex;
        backdrop-filter: blur(2px);
        animation: aviso-aparecer 1s ease-out forwards;
    }
}

@keyframes aviso-aparecer {
    from { opacity: 0; }
    to { opacity: 1; }
}

.indicador-giro {
    position: relative;
    width: 104px;
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.86;
    filter: drop-shadow(0 0 16px rgba(139, 0, 0, 0.34));
}

.icono-rotacion-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.rotacion-flecha,
.rotacion-celular {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform-box: fill-box;
    transform-origin: center;
}

.rotacion-flecha {
    stroke: rgba(255, 255, 255, 0.44);
    stroke-width: 3;
    animation: flecha-indicador-pulso 2.3s infinite ease-in-out;
}

.rotacion-celular {
    stroke: rgba(255, 255, 255, 0.58);
    stroke-width: 3;
    animation: celular-gira-izquierda 2.3s infinite ease-in-out;
}

.rotacion-celular circle {
    fill: rgba(255, 255, 255, 0.5);
    stroke: none;
}

@keyframes celular-gira-izquierda {
    0%, 100% { transform: rotate(0deg); }
    48%, 68% { transform: rotate(-90deg); }
}

@keyframes flecha-indicador-pulso {
    0%, 100% { opacity: 0.32; transform: scale(0.94); }
    50% { opacity: 0.92; transform: scale(1.04); }
}

#nombre-alx {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 15px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.28);
    font-weight: 700;
    z-index: 5000; /* Prioridad máxima sobre el escenario */
    pointer-events: auto; /* Asegura que reciba clics */
    display: none;
    cursor: none;
    opacity: 0;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.18);
    transition: opacity 1.8s ease, color 1.2s ease, text-shadow 1.2s ease, letter-spacing 1.2s ease, transform 1.8s ease;
}

#nombre-alx.alx-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    animation: aparecer-alx 1.8s ease-out both;
}

@keyframes aparecer-alx {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

#nombre-alx.iluminacion-nombre {
    animation: pulso-iluminar 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pulso-iluminar {
    0% {
        color: rgba(255,255,255,0.28);
        letter-spacing: 15px;
        text-shadow: 0 0 10px rgba(139, 0, 0, 0.18);
    }

    45% {
        color: rgba(255,255,255,0.95);
        letter-spacing: 17px;
        text-shadow:
            0 0 14px rgba(255, 255, 255, 0.45),
            0 0 26px rgba(139, 0, 0, 0.75),
            0 0 44px rgba(255, 0, 0, 0.28);
    }

    100% {
        color: rgba(255,255,255,0.28);
        letter-spacing: 15px;
        text-shadow: 0 0 10px rgba(139, 0, 0, 0.18);
    }
}

@media (max-width: 1024px) and (orientation: portrait) {
    #escenario-experiencia {
        padding: 20px;
    }

    .corazon-container {
        width: 190px;
        height: 190px;
    }

    .corazon-latido {
        width: 130px;
        height: 130px;
    }

    #texto-lyric {
        font-size: 1.5rem;
        width: 100%;
        line-height: 1.2;
    }

    #traduccion-lyric {
        font-size: 0.8rem;
        margin-top: 10px;
    }

    #nombre-alx {
        bottom: 35px;
    }
}

/* Estilos para la Propuesta Final */
#propuesta-container {
    display: none;
    opacity: 0;
    transition: opacity 2s ease;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    z-index: 300;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: clamp(28px, 6vw, 76px);
    isolation: isolate;
    overflow: hidden;
}

#propuesta-container::before {
    content: "";
    position: absolute;
    inset: 10vh 8vw;
    z-index: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(139, 0, 0, 0.18), transparent 58%),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.045), transparent 44%);
    filter: blur(18px);
    opacity: 0.78;
    pointer-events: none;
}

#propuesta-container > * {
    position: relative;
    z-index: 1;
}

#texto-transicion-propuesta {
    display: none;
    width: 90%;
    max-width: 820px;
    font-size: clamp(0.86rem, 1.8vw, 1.15rem);
    line-height: 1.5;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 0 18px rgba(139, 0, 0, 0.75);
    font-family: 'Cinzel', serif;
    font-weight: 400;
    margin-bottom: 34px;
    opacity: 0;
}

#texto-transicion-propuesta.transicion-visible {
    animation: frase-previa-propuesta 3.4s ease-in-out forwards;
}

@keyframes frase-previa-propuesta {
    0% { opacity: 0; transform: translateY(12px); filter: blur(6px); }
    25%, 72% { opacity: 1; transform: translateY(0); filter: blur(0); }
    100% { opacity: 0; transform: translateY(-8px); filter: blur(4px); }
}

#texto-propuesta {
    font-size: clamp(1.55rem, 4vw, 2.75rem);
    width: 90%;
    max-width: 920px;
    line-height: 1.18;
    text-shadow:
        0 0 18px rgba(139, 0, 0, 0.9),
        0 0 38px rgba(0, 0, 0, 1);
    margin-bottom: 18px;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

#texto-guia-propuesta {
    display: none;
    width: 90%;
    max-width: 780px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.36);
    font-family: 'Cinzel', serif;
    font-size: clamp(0.62rem, 1.2vw, 0.76rem);
    letter-spacing: 3.8px;
    line-height: 1.6;
    text-shadow: 0 0 12px rgba(139, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 1.1s ease;
}

#texto-guia-propuesta.guia-visible {
    opacity: 1;
}

.botones-propuesta {
    display: flex;
    gap: clamp(14px, 2vw, 22px);
    position: relative;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1.1s ease, transform 1.1s ease;
}

.botones-propuesta.botones-visibles {
    opacity: 1;
    transform: translateY(0);
}

#btn-si, #btn-no {
    min-width: 226px;
    min-height: 60px;
    padding: 16px 34px;
    background:
        linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.08), transparent),
        linear-gradient(135deg, rgba(26, 0, 0, 0.96) 0%, rgba(5, 0, 0, 0.98) 100%);
    border: 1px solid rgba(180, 0, 0, 0.46);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: none;
    transition: transform 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease, letter-spacing 0.35s ease, filter 0.35s ease;
    letter-spacing: 3.4px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.035),
        inset 0 -18px 28px rgba(0, 0, 0, 0.72),
        0 12px 30px rgba(0, 0, 0, 0.48),
        0 0 18px rgba(139, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

#btn-si::before,
#btn-no::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, 0.16), rgba(255, 0, 0, 0.12), transparent 82%);
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 0.35s ease, transform 0.55s ease;
}

#btn-si::after,
#btn-no::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(139, 0, 0, 0.34);
    border-radius: 4px;
    pointer-events: none;
}

#btn-si:hover {
    color: #fff;
    border-color: rgba(255, 0, 0, 0.78);
    background:
        linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(255, 50, 50, 0.18), rgba(255, 0, 0, 0.05)),
        linear-gradient(135deg, rgba(96, 0, 0, 0.96) 0%, rgba(18, 0, 0, 0.98) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.07),
        inset 0 -14px 24px rgba(0, 0, 0, 0.58),
        0 14px 36px rgba(0, 0, 0, 0.55),
        0 0 32px rgba(255, 0, 0, 0.34);
    letter-spacing: 4px;
    filter: brightness(1.08);
    transform: translateY(-3px) scale(1.025);
}

#btn-no {
    color: rgba(255, 255, 255, 0.42);
    border-color: rgba(139, 0, 0, 0.26);
    background:
        linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.04), transparent),
        linear-gradient(135deg, rgba(12, 0, 0, 0.9) 0%, rgba(3, 0, 0, 0.96) 100%);
}

#btn-no:hover {
    color: rgba(255, 255, 255, 0.74);
    border-color: rgba(180, 0, 0, 0.58);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 -14px 24px rgba(0, 0, 0, 0.72),
        0 12px 30px rgba(0, 0, 0, 0.46),
        0 0 22px rgba(139, 0, 0, 0.24);
    letter-spacing: 3.8px;
    transform: translateY(-2px);
}

#btn-si:hover::before,
#btn-no:hover::before {
    opacity: 1;
    transform: translateX(80%);
}

#btn-retornar {
    margin-top: 46px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(139, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.36);
    padding: 11px 28px;
    font-family: 'Cinzel', serif;
    cursor: none;
    letter-spacing: 4px;
    transition: all 0.4s ease, opacity 3s ease;
    opacity: 0;
    pointer-events: none;
    border-radius: 6px;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.62);
}

#btn-retornar:hover {
    color: #ff0000;
    border-color: #ff0000;
    text-shadow: 0 0 10px #ff0000;
}

#btn-si {
    animation: pulso-discreto-btn 3.2s infinite ease-in-out;
}

@keyframes pulso-discreto-btn {
    0%, 100% { box-shadow: 0 0 14px rgba(139, 0, 0, 0.22); border-color: rgba(139, 0, 0, 0.52); }
    50% { box-shadow: 0 0 26px rgba(255, 0, 0, 0.38); border-color: rgba(255, 0, 0, 0.72); }
}

#mensaje-final {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    text-shadow: 0 0 25px rgba(255, 0, 0, 0.9);
    margin: 0;
    text-align: center; 
    width: 100%;
    max-width: 980px;
    padding: 0 20px;
    animation: entrada-gloriosa 3.2s cubic-bezier(0.22, 1, 0.36, 1), pulso-final-texto 4s infinite ease-in-out 3s;
    line-height: 1.16;
}

#mensaje-no {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    text-shadow:
        0 0 22px rgba(139, 0, 0, 0.85),
        0 0 46px rgba(0, 0, 0, 1);
    margin: 0;
    text-align: center;
    width: 100%;
    max-width: 860px;
    padding: 0 24px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.86);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    animation: entrada-serena 2.8s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 720px) {
    body {
        align-items: center;
    }

    .niebla-capa {
        filter: blur(28px);
        animation-duration: 30s;
    }

    .niebla-capa:nth-child(2) {
        animation-duration: 46s;
    }

    #btn-fullscreen {
        top: 14px;
        right: 14px;
        padding: 9px 12px;
        font-size: 1.18rem;
        color: rgba(255, 255, 255, 0.86);
        border-color: rgba(255, 0, 0, 0.52);
        background: rgba(8, 0, 0, 0.68);
    }

    #btn-saltar-final {
        top: 56px;
        right: 15px;
        font-size: 0.52rem;
        letter-spacing: 3.6px;
    }

    #mensaje-top-autor,
    #mensaje-top-autor-2,
    #mensaje-top-autor-3,
    #mensaje-top-autor-4,
    #mensaje-top-autor-5 {
        top: 16px;
        width: min(88vw, 420px);
        font-size: 0.54rem;
        line-height: 1.55;
        letter-spacing: 2.6px;
    }

    #escenario-experiencia {
        padding: 18px;
    }

    #pantalla-inicio {
        width: 100%;
    }

    .aura-eclipse {
        width: 230px;
        height: 230px;
    }

    .corazon-container {
        width: 174px;
        height: 174px;
    }

    .corazon-latido {
        width: 122px;
        height: 122px;
    }

    #click-hint {
        max-width: 92vw;
        margin-top: 22px;
        padding: 15px 16px;
        min-height: 48px;
        font-size: 0.56rem;
        letter-spacing: 3.2px;
        line-height: 1.7;
    }

    #click-hint::before,
    #click-hint::after {
        width: min(180px, 72vw);
    }

    .source-tag {
        font-size: 0.48rem;
        letter-spacing: 2px;
    }

    #lyrics-container {
        width: 94%;
    }

    #texto-lyric {
        font-size: clamp(0.95rem, 4.8vw, 1.38rem);
        line-height: 1.18;
        max-width: 92vw;
        margin-inline: auto;
    }

    #traduccion-lyric {
        font-size: 0.62rem;
        letter-spacing: 1.1px;
        line-height: 1.45;
    }

    #propuesta-container {
        padding: 22px 18px 30px;
    }

    #texto-transicion-propuesta {
        width: 100%;
        letter-spacing: 2.6px;
        line-height: 1.65;
    }

    #texto-propuesta {
        width: 100%;
        font-size: clamp(1.35rem, 8vw, 2rem);
        line-height: 1.18;
        margin-bottom: 16px;
    }

    #texto-guia-propuesta {
        width: 100%;
        margin-bottom: 24px;
        font-size: 0.6rem;
        letter-spacing: 2.2px;
    }

    .botones-propuesta {
        width: min(100%, 360px);
        gap: 12px;
    }

    #btn-si,
    #btn-no {
        width: 100%;
        min-width: 0;
        padding-inline: 22px;
        min-height: 54px;
        font-size: 0.76rem;
        letter-spacing: 2.6px;
    }

    #texto-propuesta,
    #mensaje-final,
    #mensaje-no {
        width: 100%;
    }

    #mensaje-final,
    #mensaje-no {
        padding-inline: 0;
    }

    #btn-retornar {
        margin-top: 34px;
        padding: 10px 22px;
        font-size: 0.72rem;
    }

    #nombre-alx {
        bottom: 22px;
        font-size: 0.72rem;
        letter-spacing: 10px;
    }
}

@media (max-height: 520px) {
    #propuesta-container {
        padding-block: 18px;
    }

    #texto-propuesta {
        font-size: clamp(1.25rem, 5vw, 1.8rem);
        margin-bottom: 12px;
    }

    #texto-guia-propuesta {
        margin-bottom: 18px;
    }

    #btn-si,
    #btn-no {
        min-height: 48px;
        padding-block: 12px;
    }

    #btn-retornar {
        margin-top: 22px;
    }

    #texto-lyric {
        font-size: clamp(0.95rem, 4.6vh, 1.3rem);
        line-height: 1.15;
    }

    #traduccion-lyric {
        font-size: 0.58rem;
    }
}

@keyframes entrada-serena {
    0% {
        opacity: 0;
        transform: translateY(12px);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

#propuesta-container.aceptado {
    animation: resplandor-aceptado 2.4s ease-out;
}

#propuesta-container.propuesta-revelada {
    animation: resplandor-propuesta 2.2s ease-out;
}

@keyframes resplandor-propuesta {
    0% { filter: brightness(0.82) blur(2px); }
    42% { filter: brightness(1.32) contrast(1.12); }
    100% { filter: brightness(1) blur(0); }
}

@keyframes resplandor-aceptado {
    0% { filter: brightness(1); }
    38% { filter: brightness(1.45) contrast(1.18); }
    100% { filter: brightness(1); }
}

@keyframes pulso-final-texto {
    0%, 100% {
        opacity: 0.9;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        text-shadow: 0 0 40px rgba(255, 0, 0, 1);
    }
}

@keyframes entrada-gloriosa {
    0% {
        opacity: 0;
        transform: scale(0.94);
        filter: blur(12px);
        text-shadow: 0 0 0 rgba(255, 0, 0, 0);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
        text-shadow: 0 0 25px rgba(255, 0, 0, 0.9);
    }
}

.petalo {
    position: absolute;
    background: #8B0000;
    border-radius: 100% 0% 100% 0%;
    z-index: 400;
    pointer-events: none;
}

.source-tag {
    display: block;
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.12);
    letter-spacing: 3px;
    margin-top: 15px;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
}
