/* =====================================================
   ESTILOS GENERALES Y SPA RESET
===================================================== */

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: Georgia, "Times New Roman", serif;
    color: #fff;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-select: none;
    -ms-user-select: none;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Control de visibilidad SPA */
.vista-oculta {
    display: none !important;
}


/* =====================================================
   1. VISTA BIENVENIDA (PANTALLA COMPLETA)
===================================================== */

#vista-bienvenida {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #050505;
    z-index: 10;
}

#vista-bienvenida .video-fondo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}

#vista-bienvenida .overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.82));
    pointer-events: none;
}

#vista-bienvenida::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(circle at center, transparent 5%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.88) 100%);
    pointer-events: none;
}

#vista-bienvenida .marca {
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 6;
    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 5px;
    color: rgba(255,255,255,.65);
    text-transform: uppercase;
}

#vista-bienvenida .marca span {
    display: inline-block;
    width: 2px;
    height: 12px;
    margin-right: 10px;
    background: #c8102e;
    vertical-align: middle;
}

#vista-bienvenida .contenido {
    position: relative;
    z-index: 5;
    width: 90%;
    max-width: 900px;
    text-align: center;
    animation: aparecer 1.4s ease forwards;
}

#vista-bienvenida .pequeno {
    font-family: Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 6px;
    color: rgba(255,255,255,.55);
    margin-bottom: 28px;
    text-transform: uppercase;
}

#vista-bienvenida .titulo {
    font-size: clamp(42px, 6vw, 82px);
    line-height: 1.02;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-shadow: 0 4px 25px rgba(0,0,0,.9);
}

#vista-bienvenida .titulo .rojo {
    color: #d7193f;
    text-shadow: 0 0 25px rgba(215,25,63,.18);
}

#vista-bienvenida .subtitulo {
    margin-top: 28px;
    font-family: Arial, sans-serif;
    font-size: clamp(13px, 1.4vw, 17px);
    letter-spacing: 4px;
    color: rgba(255,255,255,.72);
    text-transform: uppercase;
}

#vista-bienvenida .audio-aviso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 5px;
    color: rgba(255,255,255,.60);
    text-transform: uppercase;
}

#vista-bienvenida .audio-icono {
    width: 23px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(120,0,15,.45);
    border: 1px solid #d7193f;
    color: #ff294d;
    font-size: 11px;
    box-shadow: 0 0 10px rgba(215,25,63,.35);
    animation: pulsoAudio 1.8s ease-in-out infinite;
}

#vista-bienvenida .boton {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-top: 32px;
    min-width: 350px;
    padding: 21px 35px;
    overflow: hidden;
    background: linear-gradient(90deg, #a90920, #d7193f, #a90920);
    background-size: 200% 100%;
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(215,25,63,.35), 0 8px 30px rgba(0,0,0,.45);
    animation: brilloBoton 2.2s ease-in-out infinite;
    transition: transform .3s ease, box-shadow .3s ease;
}

#vista-bienvenida .boton::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg);
    animation: pasarLuz 2.8s ease-in-out infinite;
}

#vista-bienvenida .boton:hover {
    transform: translateY(-4px) scale(1.025);
    box-shadow: 0 0 35px rgba(215,25,63,.65), 0 15px 45px rgba(0,0,0,.55);
}

#vista-bienvenida .flecha {
    position: relative;
    z-index: 2;
    font-size: 19px;
    transition: transform .3s ease;
}

#vista-bienvenida .boton:hover .flecha {
    transform: translateX(7px);
}

#vista-bienvenida .continuar {
    display: block;
    width: fit-content;
    margin: 22px auto 0;
    padding-bottom: 5px;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 3px;
    color: rgba(255,255,255,.42);
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.20);
    transition: color .3s ease, border-color .3s ease, transform .3s ease;
}

#vista-bienvenida .continuar:hover {
    color: #fff;
    border-color: #d7193f;
    transform: translateY(-2px);
}

#vista-bienvenida .linea {
    position: absolute;
    z-index: 5;
    width: 1px;
    height: 100px;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.4), transparent);
}


/* =====================================================
   2. VISTA LLAMADA (VISTA VERTICAL DE CELULAR 9:16)
===================================================== */

#vista-llamada {
    position: relative;
    width: min(100vw, 56.25vh);
    height: min(100vh, 177.7778vw);
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #000;
}

#vista-llamada #videoEscena {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
    z-index: 100;
}

#vista-llamada #activarAudio {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 300;
    display: none;
    padding: 18px 28px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 4px;
    background: rgba(0,0,0,.85);
    color: white;
    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    cursor: pointer;
}

#vista-llamada #pantallaLlamada {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow: hidden;
    background: #000;
    z-index: 50;
}

#vista-llamada .fondoLlamada {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.88)), url("../img/fondo-llamada.jpg") center center / cover no-repeat;
    z-index: 1;
}

#vista-llamada .fondoLlamada::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,.02), rgba(0,0,0,.65));
}

#vista-llamada .marca {
    position: absolute;
    top: 24px;
    left: 20px;
    z-index: 10;
    font-family: Arial, sans-serif;
    font-size: 7px;
    letter-spacing: 4px;
    color: rgba(255,255,255,.55);
    text-transform: uppercase;
}

#vista-llamada .marca span {
    display: inline-block;
    width: 2px;
    height: 10px;
    margin-right: 8px;
    background: #c8102e;
    vertical-align: middle;
}

#vista-llamada .contenido {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px;
}

#vista-llamada .avatar {
    position: relative;
    width: 105px;
    height: 105px;
    margin-bottom: 28px;
}

#vista-llamada .avatar img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #008c45;
    z-index: 3;
}

#vista-llamada .avatar::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(0,140,69,.45);
    animation: pulsoAvatar 1.8s infinite;
}

#vista-llamada .avatar::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border-top: 3px solid #00c853;
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 3px solid transparent;
    animation: girar 2s linear infinite;
}

#vista-llamada .nombre {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 31px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1px;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 3px 20px rgba(0,0,0,.9);
}

#vista-llamada .pais {
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 4px;
    color: rgba(255,255,255,.62);
    margin-bottom: 27px;
    text-transform: uppercase;
}

#vista-llamada .estado {
    font-family: Arial, sans-serif;
    font-size: 8px;
    letter-spacing: 4px;
    color: #00c853;
    text-transform: uppercase;
    margin-bottom: 42px;
    animation: parpadear 1.5s infinite;
}

#vista-llamada .contestar {
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    background: #00c853;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(0,200,83,.50), 0 10px 40px rgba(0,0,0,.65);
    animation: pulsoBoton 1.7s infinite;
}

#vista-llamada .contestar:active {
    transform: scale(.93);
}

#vista-llamada .telefono {
    width: 28px;
    height: 28px;
    fill: #fff;
}

#vista-llamada .textoContestar {
    margin-top: 15px;
    font-family: Arial, sans-serif;
    font-size: 7px;
    letter-spacing: 3px;
    color: rgba(255,255,255,.42);
    text-transform: uppercase;
}


/* =====================================================
   3. VISTA AUDIO (REPRODUCTOR MENSAJE DE VOZ)
===================================================== */

#vista-audio {
    position: relative;
    width: min(100vw, 56.25vh);
    height: min(100vh, 177.7778vw);
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #000;
}

#vista-audio .fondoAudio {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.88)), url("../img/fondo-llamada.jpg") center center / cover no-repeat;
    z-index: 1;
}

#vista-audio .fondoAudio::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,.02), rgba(0,0,0,.65));
}

#vista-audio .marca {
    position: absolute;
    top: 24px;
    left: 20px;
    z-index: 10;
    font-family: Arial, sans-serif;
    font-size: 7px;
    letter-spacing: 4px;
    color: rgba(255,255,255,.55);
    text-transform: uppercase;
}

#vista-audio .marca span {
    display: inline-block;
    width: 2px;
    height: 10px;
    margin-right: 8px;
    background: #c8102e;
    vertical-align: middle;
}

#vista-audio .contenido {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px;
}

#vista-audio .avatar {
    position: relative;
    width: 105px;
    height: 105px;
    margin-bottom: 28px;
}

#vista-audio .avatar img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #008c45;
    z-index: 3;
}

#vista-audio .avatar::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(0,140,69,.45);
    animation: pulsoAvatar 1.8s infinite;
}

#vista-audio .avatar::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border-top: 3px solid #00c853;
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 3px solid transparent;
    animation: girar 2s linear infinite;
}

#vista-audio .nombre {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 31px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1px;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 3px 20px rgba(0,0,0,.9);
}

#vista-audio .subtitulo {
    font-family: Arial, sans-serif;
    font-size: 8px;
    letter-spacing: 4px;
    color: rgba(255,255,255,.60);
    margin-bottom: 28px;
    text-transform: uppercase;
}

#vista-audio .tiempo {
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 3px;
    color: #00c853;
    margin-bottom: 18px;
}

#vista-audio .onda {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 30px;
}

#vista-audio .onda span {
    width: 3px;
    height: 18px;
    background: #00c853;
    border-radius: 3px;
    animation: onda 1s ease-in-out infinite;
}

#vista-audio .onda span:nth-child(1) { height: 15px; animation-delay: .00s; }
#vista-audio .onda span:nth-child(2) { height: 28px; animation-delay: .08s; }
#vista-audio .onda span:nth-child(3) { height: 20px; animation-delay: .16s; }
#vista-audio .onda span:nth-child(4) { height: 35px; animation-delay: .24s; }
#vista-audio .onda span:nth-child(5) { height: 23px; animation-delay: .32s; }
#vista-audio .onda span:nth-child(6) { height: 40px; animation-delay: .40s; }
#vista-audio .onda span:nth-child(7) { height: 25px; animation-delay: .48s; }
#vista-audio .onda span:nth-child(8) { height: 34px; animation-delay: .56s; }
#vista-audio .onda span:nth-child(9) { height: 20px; animation-delay: .64s; }
#vista-audio .onda span:nth-child(10) { height: 38px; animation-delay: .72s; }
#vista-audio .onda span:nth-child(11) { height: 27px; animation-delay: .80s; }
#vista-audio .onda span:nth-child(12) { height: 35px; animation-delay: .88s; }
#vista-audio .onda span:nth-child(13) { height: 22px; animation-delay: .96s; }
#vista-audio .onda span:nth-child(14) { height: 31px; animation-delay: 1.04s; }
#vista-audio .onda span:nth-child(15) { height: 18px; animation-delay: 1.12s; }

#vista-audio .estado {
    font-family: Arial, sans-serif;
    font-size: 7px;
    letter-spacing: 4px;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
}

#vista-audio.fadeOut {
    animation: desaparecer .8s ease forwards;
}


/* =====================================================
   4. VISTA INVITACION (TARJETA CUMPLE DE MATEO)
===================================================== */

#vista-invitacion {
    position: relative;
    width: min(100vw, 56.25vh);
    height: min(100vh, 177.777vw);
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    background-image: linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.35) 45%, rgba(0,0,0,.85) 100%), url("../img/fondo-invitacion.jpg");
    background-size: cover;
    background-position: center center;
    color: white;
}

#vista-invitacion::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,70,35,.18), transparent 35%, transparent 65%, rgba(150,0,0,.18));
    pointer-events: none;
    z-index: 1;
}

#vista-invitacion .detalle-verde {
    position: absolute;
    width: 80px;
    height: 80px;
    left: -40px;
    bottom: 30px;
    border-radius: 50%;
    background: rgba(0,90,50,.18);
    filter: blur(25px);
    z-index: 2;
}

#vista-invitacion .contenido {
    position: absolute;
    z-index: 3;
    width: 100%;
    left: 0;
    top: 50%;
    transform: translateY(-42%);
    text-align: center;
    padding: 20px;
}

#vista-invitacion .pre-titulo {
    font-family: Arial, sans-serif;
    font-size: 8px;
    letter-spacing: 5px;
    color: rgba(255,255,255,.8);
    margin-bottom: 8px;
    text-transform: uppercase;
    animation: aparecer 1.2s ease forwards, flotar 5s ease-in-out infinite 1.5s;
}

#vista-invitacion .nombre {
    font-size: clamp(45px, 12vw, 72px);
    line-height: .95;
    font-weight: normal;
    letter-spacing: 1px;
    color: #fff;
    animation: aparecer 1.4s ease forwards, movimiento 6s ease-in-out infinite 2s, brilloParpadeo 4s infinite;
}

#vista-invitacion .cumple {
    margin-top: 10px;
    font-size: clamp(28px, 7vw, 45px);
    line-height: 1;
    font-weight: bold;
    color: #c91525;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,.8);
    animation: aparecer 1.6s ease forwards, flotar 5s ease-in-out infinite 2.2s;
}

#vista-invitacion .linea {
    width: 62px;
    height: 1px;
    background: rgba(255,255,255,.75);
    margin: 22px auto 20px;
    animation: expandir 1.5s ease forwards;
}

#vista-invitacion .fecha {
    font-size: clamp(25px, 6vw, 38px);
    font-weight: bold;
    letter-spacing: 1px;
    color: #fff;
    animation: aparecer 1.7s ease forwards, movimiento 6s ease-in-out infinite 2.5s, brilloParpadeo 4s infinite 1.5s;
}

#vista-invitacion .hora {
    margin-top: 8px;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 5px;
    color: rgba(255,255,255,.8);
    text-transform: uppercase;
    animation: aparecer 1.8s ease forwards;
}

#vista-invitacion .direccion {
    margin-top: 24px;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,.9);
    text-transform: uppercase;
    animation: aparecer 2s ease forwards;
}

#vista-invitacion .direccion span {
    color: #c91525;
    margin-right: 5px;
}

#vista-invitacion .faltan {
    margin-top: 20px;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 5px;
    color: rgba(255,255,255,.85);
    text-transform: uppercase;
    animation: aparecer 2s ease forwards, flotar 5s ease-in-out infinite 2.5s;
}

#vista-invitacion .contador {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 7px;
    animation: aparecer 2.1s ease forwards;
}

#vista-invitacion .caja-contador {
    min-width: 48px;
    padding: 7px 5px;
    background: rgba(0,0,0,.38);
    border-top: 1px solid rgba(255,255,255,.25);
    border-bottom: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(4px);
}

#vista-invitacion .numero {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 19px;
    font-weight: bold;
    color: #fff;
}

#vista-invitacion .etiqueta {
    display: block;
    margin-top: 3px;
    font-family: Arial, sans-serif;
    font-size: 6px;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
}

#vista-invitacion .botones {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    animation: aparecer 2.2s ease forwards;
}

#vista-invitacion .boton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 210px;
    min-height: 43px;
    padding: 12px 20px;
    border: 1px solid rgba(255,255,255,.65);
    color: #fff;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform .3s ease, background .3s ease, border-color .3s ease;
}

#vista-invitacion .boton:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,.08);
    border-color: #d4af37;
}

#vista-invitacion .boton:active {
    transform: scale(.96);
}

#vista-invitacion .despedida {
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: rgba(255,255,255,.8);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 15px;
}

#vista-invitacion .despedida strong {
    display: block;
    color: #d4af37;
    margin-top: 5px;
}

#vista-invitacion .boton-musica {
    position: absolute;
    z-index: 10;
    right: 16px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.85);
    background: linear-gradient(145deg, rgba(150,0,20,.95), rgba(35,0,5,.95));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,.6);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

#vista-invitacion .boton-musica span {
    font-family: Arial, sans-serif;
    font-size: 22px;
    line-height: 1;
    color: #fff;
}

#vista-invitacion .boton-musica.activa {
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212,175,55,.10), 0 4px 18px rgba(0,0,0,.6);
    animation: pulsarMusica 2s ease-in-out infinite;
}

#vista-invitacion .boton-musica:hover {
    transform: scale(1.08);
    border-color: #d4af37;
}

#vista-invitacion .boton-musica:active {
    transform: scale(.94);
}

/* =====================================================
   4.5. PLAYLIST VIDEO INVITACION
===================================================== */

#videoInvitacion {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reducimos el tamaño del video cuando está la clase con-botones en vista-invitacion */
#vista-invitacion.con-botones #videoInvitacion {
    height: calc(100% - 140px) !important;
}

#activarAudioInvitacion {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: none;
    padding: 18px 28px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 4px;
    background: rgba(0,0,0,.85);
    color: white;
    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    cursor: pointer;
    text-transform: uppercase;
    animation: parpadear 1.5s infinite;
}

#activarAudioInvitacion:hover {
    background: rgba(255,255,255,.1);
    border-color: #fff;
}

.contenedor-botones-invitacion {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 5;
    background: #050505;
    border-top: 1px solid rgba(212, 175, 55, 0.35);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contenedor-botones-invitacion.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.contenedor-botones-invitacion .boton-confirmar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 85%;
    max-width: 285px;
    height: 46px;
    background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
    background-size: 200% auto;
    border: none;
    border-radius: 25px;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
    transition: all 0.3s ease;
    animation: brilloOro 3s infinite linear;
}

.contenedor-botones-invitacion .boton-confirmar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.7);
    filter: brightness(1.15);
}

.contenedor-botones-invitacion .boton-confirmar:active {
    transform: scale(0.97);
}

.contenedor-botones-invitacion .boton-ubicacion {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 85%;
    max-width: 285px;
    height: 46px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid #d4af37;
    border-radius: 25px;
    color: #d4af37;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.contenedor-botones-invitacion .boton-ubicacion:hover {
    transform: translateY(-2px);
    background: rgba(212, 175, 55, 0.18);
    color: #fff;
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.3);
}


.loader-invitacion {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loader-invitacion.visible {
    opacity: 1;
    pointer-events: auto;
}

.spinner-oro {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(212, 175, 55, 0.15);
    border-top: 3px solid #d4af37;
    border-radius: 50%;
    animation: rotarSpinner 1s linear infinite;
}

.texto-cargando {
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 3px;
    text-transform: uppercase;
}

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

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


/* =====================================================
   5. KEYFRAMES Y ANIMACIONES COMUNES
===================================================== */

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

@keyframes brilloBoton {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 12px rgba(215,25,63,.25), 0 8px 30px rgba(0,0,0,.45);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 38px rgba(215,25,63,.70), 0 0 70px rgba(215,25,63,.25), 0 12px 35px rgba(0,0,0,.50);
    }
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 12px rgba(215,25,63,.25), 0 8px 30px rgba(0,0,0,.45);
    }
}

@keyframes pasarLuz {
    0% { left: -120%; }
    40% { left: 140%; }
    100% { left: 140%; }
}

@keyframes pulsoAudio {
    0%, 100% { box-shadow: 0 0 5px rgba(215,25,63,.25); }
    50% { box-shadow: 0 0 18px rgba(215,25,63,.75); }
}

@keyframes pulsoAvatar {
    0% { transform: scale(1); opacity: .7; }
    70% { transform: scale(1.12); opacity: 0; }
    100% { transform: scale(1.12); opacity: 0; }
}

@keyframes girar {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulsoBoton {
    0% { box-shadow: 0 0 0 0 rgba(0,200,83,.60), 0 10px 40px rgba(0,0,0,.65); }
    70% { box-shadow: 0 0 0 20px rgba(0,200,83,0), 0 10px 40px rgba(0,0,0,.65); }
    100% { box-shadow: 0 0 0 0 rgba(0,200,83,0), 0 10px 40px rgba(0,0,0,.65); }
}

@keyframes parpadear {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

@keyframes onda {
    0%, 100% { transform: scaleY(.45); opacity: .55; }
    50% { transform: scaleY(1); opacity: 1; }
}

@keyframes expandir {
    from { opacity: 0; width: 0; }
    to { opacity: 1; width: 62px; }
}

@keyframes flotar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes movimiento {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.012); }
}

@keyframes pulsarMusica {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,.15), 0 4px 18px rgba(0,0,0,.6); }
    50% { box-shadow: 0 0 0 6px rgba(212,175,55,.04), 0 4px 18px rgba(0,0,0,.6); }
}

@keyframes brilloParpadeo {
    0%, 79%, 81%, 83%, 85%, 100% {
        text-shadow: 
            0 0 4px rgba(255, 255, 255, 0.65),
            0 0 10px rgba(255, 255, 255, 0.35);
    }
    80%, 82%, 84% {
        text-shadow: none;
    }
}


/* =====================================================
   6. RESPONSIVE / MEDIA QUERIES UNIFICADOS
===================================================== */

/* Adaptabilidad Móvil para Bienvenida */
@media (max-width: 600px) {
    #vista-bienvenida .marca {
        top: 22px;
        left: 20px;
        font-size: 8px;
        letter-spacing: 4px;
    }
    #vista-bienvenida .contenido {
        width: 88%;
    }
    #vista-bienvenida .pequeno {
        font-size: 9px;
        letter-spacing: 4px;
        margin-bottom: 20px;
    }
    #vista-bienvenida .titulo {
        font-size: 42px;
        line-height: 1.05;
    }
    #vista-bienvenida .subtitulo {
        font-size: 10px;
        line-height: 1.8;
        letter-spacing: 2px;
    }
    #vista-bienvenida .audio-aviso {
        margin-top: 22px;
        font-size: 7px;
        letter-spacing: 4px;
    }
    #vista-bienvenida .audio-icono {
        width: 21px;
        height: 21px;
        font-size: 10px;
    }
    #vista-bienvenida .boton {
        width: 100%;
        min-width: 0;
        padding: 19px 15px;
        margin-top: 25px;
        font-size: 10px;
        letter-spacing: 3px;
        gap: 15px;
    }
    #vista-bienvenida .continuar {
        margin-top: 20px;
        font-size: 8px;
        letter-spacing: 2px;
    }
}

/* Adaptabilidad Móvil General 9:16 (Llamada, Audio y Tarjeta) */
@media (max-width: 600px) {
    #vista-llamada, #vista-audio, #vista-invitacion {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }
    #vista-llamada .nombre, #vista-audio .nombre {
        font-size: 29px;
    }
}

/* Detalles de Invitación en Móviles Pequeños */
@media (max-width: 500px) {
    #vista-invitacion .contenido {
        transform: translateY(-43%);
        padding: 15px;
    }
    #vista-invitacion .direccion {
        margin-top: 18px;
        font-size: 8px;
    }
    #vista-invitacion .faltan {
        margin-top: 16px;
        margin-bottom: 7px;
        font-size: 8px;
        letter-spacing: 4px;
    }
    #vista-invitacion .contador {
        gap: 5px;
    }
    #vista-invitacion .caja-contador {
        min-width: 45px;
        padding: 6px 4px;
    }
    #vista-invitacion .numero {
        font-size: 18px;
    }
    #vista-invitacion .botones {
        margin-top: 17px;
    }
    #vista-invitacion .despedida {
        margin-top: 14px;
        font-size: 19px;
    }
    #vista-invitacion .despedida strong {
        font-size: 17px;
        letter-spacing: 0;
    }
    #vista-invitacion .boton {
        width: 190px;
        min-height: 40px;
        font-size: 8px;
    }
    #vista-invitacion .boton-musica {
        width: 44px;
        height: 44px;
        right: 12px;
        bottom: 12px;
    }
    #vista-invitacion .boton-musica span {
        font-size: 20px;
    }
}

/* Pantallas de Altura Reducida */
@media (max-height: 650px) {
    #vista-invitacion .contenido {
        transform: translateY(-48%);
    }
    #vista-invitacion .linea {
        margin: 12px auto;
    }
    #vista-invitacion .direccion {
        margin-top: 12px;
    }
    #vista-invitacion .faltan {
        margin-top: 12px;
        margin-bottom: 5px;
    }
    #vista-invitacion .contador {
        margin-top: 0;
    }
    #vista-invitacion .botones {
        margin-top: 10px;
    }
    #vista-invitacion .despedida {
        margin-top: 9px;
        font-size: 16px;
    }
    #vista-invitacion .despedida strong {
        font-size: 14px;
        letter-spacing: 0;
    }
}
