/* ==========================================
   1. FUNDAMENTOS Y ESTRUCTURA
   ========================================== */
:root {
    /* Variables Base (Tema Default) */
    --text-main: #4a5a42;
    --bg-app: #fdfbf7;
    --bg-card: #ffffff;
    --primary: #064e3b;
    --secondary: #f0fdf4;
    --accent: #dcfce7;
    --color-title: #047857;
    --color-button: #059669;
    --color-border: #e5f3d8;

    /* Mapeo de variables legacy */
    --primary-green: var(--text-main);
    --accent-green: var(--primary);
    --light-green: var(--secondary);
    --border-green: var(--accent);
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.05);
}

/* Tema Midnight Gold */
[data-theme="midnight-gold"] {
    --text-main: #f1f5f9;
    --bg-app: #121212;
    --bg-card: #1e1e1e;
    --primary: #C5A059;
    --secondary: #262626;
    --accent: #D4AF37;
    --color-title: #C5A059;
    --color-button: #C5A059;
    --color-border: #333333;
    --white: #1e1e1e;
    /* Reemplaza fondos blancos duros */
    --shadow: rgba(0, 0, 0, 0.5);
}

/* Paleta Rosa (Sweet Rose - Referencia Rosas) */
[data-theme="pink-white"] {
    --text-main: #884A5E;
    /* Malva profundo para texto */
    --bg-app: #FFF0F5;
    /* Lavender Blush muy suave */
    --bg-card: #FFFFFF;
    /* Blanco puro para resaltar la frescura */
    --primary: #F08CAE;
    /* Rosa suave (pétalo medio) */
    --secondary: #FFF5F8;
    /* Blanco rosado */
    --accent: #FBCFE8;
    /* Rosa pastel claro */
    --color-title: #BE4D78;
    /* Rosa oscuro elegante */
    --color-button: #F08CAE;
    /* Mismo tono que primary para botones */
    --color-border: #FCE7F3;
    /* Borde muy sutil */
    --white: #ffffff;
    --shadow: rgba(240, 140, 174, 0.2);
}

/* Paleta Azul (Sweet Blue Cake - Referencia Tarta) */
[data-theme="blue-white"] {
    --text-main: #2563EB;
    /* Azul Real vibrante para texto */
    --bg-app: #F0F9FF;
    /* Azure Mist muy claro, casi blanco */
    --bg-card: #FFFFFF;
    /* Blanco puro (el merengue de la tarta) */
    --primary: #60A5FA;
    /* Azul cielo pastel brillante */
    --secondary: #EFF6FF;
    /* Blanco azulado muy suave */
    --accent: #BFDBFE;
    /* Azul bebé (glaseado claro) */
    --color-title: #3B82F6;
    /* Azul intermedio con fuerza */
    --color-button: #60A5FA;
    /* Azul pastel brillante */
    --color-border: #DBEAFE;
    /* Borde azulado sutil */
    --white: #ffffff;
    --shadow: rgba(96, 165, 250, 0.2);
}

/* Cambio de logo para modo oscuro: Gestionado por JS ahora */

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    scroll-behavior: smooth;
    padding-bottom: 120px;
    margin: 0;
    transition: all 0.3s ease;
}

/* --- SOBREESCRITURA DE TAILWIND PARA TEMAS --- */
/* Forzamos que los colores de Tailwind usen nuestras variables */
.text-emerald-700,
.text-emerald-800,
.text-emerald-900,
.text-orange-700 {
    color: var(--color-title) !important;
}

.text-emerald-600,
.text-emerald-500,
.text-orange-600 {
    color: var(--primary) !important;
}

.text-emerald-300 {
    color: var(--accent) !important;
}

.bg-emerald-50,
.bg-orange-50\/20 {
    background-color: var(--secondary) !important;
}

.bg-emerald-900 {
    background-color: var(--bg-card) !important;
}

.bg-emerald-600,
.bg-orange-500 {
    background-color: var(--color-button) !important;
}

.border-emerald-50,
.border-orange-200,
.border-orange-100 {
    border-color: var(--color-border) !important;
}

.text-gray-700,
.text-gray-600,
.text-gray-500 {
    color: var(--text-main) !important;
    opacity: 0.8;
}

/* INTEGRACIÓN DEL CORAZÓN EN MODO MIDNIGHT */
[data-theme="midnight-gold"] .heart-container {
    background: transparent !important;
    box-shadow: none !important;
}

[data-theme="midnight-gold"] .heart-container #header-icon {
    text-shadow: 0 0 20px var(--accent);
}

/* Bloqueo de scroll antes de pulsar el corazón */
body.locked {
    overflow: hidden;
    height: 100vh;
}

.font-cursive {
    font-family: 'Pacifico', cursive;
}

/* Efecto de aparición del contenido */
#main-content {
    transition: opacity 2s ease-in-out;
    opacity: 0;
    /* Empieza invisible hasta que carguen los módulos */
}

body.unlocked #main-content {
    opacity: 1;
}

/* ==========================================
   2. EL CORAZÓN DE DESBLOQUEO Y REPRODUCTOR
   ========================================== */

/* Contenedor del botón: se mueve de estar centrado a la esquina inferior derecha */
#music-container {
    position: fixed;
    z-index: 1000;
    transition: top 0.8s ease, left 0.8s ease, bottom 0.8s ease, right 0.8s ease;
}

/* Estado inicial: contenedor ocupa toda la pantalla para centrar el botón */
body.locked #music-container {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estado desbloqueado: contenedor OCULTO (eliminado vúmetro) */
body.unlocked #music-container {
    display: none !important;
    /* Ocultar completamente el botón de música */
}

/* El botón en sí mismo */
.music-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: var(--bg-card);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: width 0.5s ease, height 0.5s ease;
}

/* Botón grande y redondo en el estado inicial */
body.locked .music-btn {
    width: 135px;
    height: 135px;
    border: 4px solid #ef4444;
}

/* Botón más pequeño en la esquina */
body.unlocked .music-btn {
    width: 70px;
    height: 70px;
}

/* Animación Heartbeat (Latido constante) */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.15);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

.animate-heartbeat {
    animation: heartbeat 1.5s infinite ease-in-out;
}

/* Estilos del Vúmetro (5 barras) */
.vu-meter {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 25px;
    width: 40px;
}

.vu-bar {
    width: 4px;
    background: #ef4444;
    border-radius: 2px;
    animation: vu-rise 0.5s ease-in-out infinite alternate;
}

.vu-bar:nth-child(1) {
    animation-delay: 0.0s;
}

.vu-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.vu-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.vu-bar:nth-child(4) {
    animation-delay: 0.3s;
}

.vu-bar:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes vu-rise {
    0% {
        height: 5px;
    }

    100% {
        height: 100%;
    }
}

/* Estilos para el símbolo de pausa parpadeante */
.pause-symbol {
    width: 16px;
    /* Ancho total del símbolo */
    height: 22px;
    /* Altura del símbolo */
    position: relative;
    animation: blink-red 1.5s infinite;
}

.pause-symbol::before,
.pause-symbol::after {
    content: '';
    position: absolute;
    top: 0;
    width: 5px;
    /* Ancho de cada barra de pausa */
    height: 100%;
    background-color: #ef4444;
    /* Rojo */
    border-radius: 2px;
}

.pause-symbol::before {
    left: 0;
}

.pause-symbol::after {
    right: 0;
}

@keyframes blink-red {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ==========================================
   3. COMPONENTES GENERALES (CARDS Y BOTONES)
   ========================================== */
.card {
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 8px 20px -5px var(--shadow);
    border: 1px solid var(--color-border);
}

.btn-custom {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    user-select: none;
}

.btn-custom:active {
    transform: scale(0.92);
}

/* Alertas personalizadas */
#custom-alert-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-alert-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 28px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Forzar color oscuro del texto para contraste con fondo claro */
#alert-text {
    color: #064e3b !important;
    /* Verde oscuro para máximo contraste */
}

/* ==========================================
   5. MÓDULO GALERÍA (PAGINACIÓN 3x3)
   ========================================== */
.gallery-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-container {
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
    /* Permite scroll vertical pero captura el horizontal */
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

.slide-page {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    box-sizing: border-box;
}

.img-container {
    position: relative;
    /* Para posicionar iconos de comentario/borrado */
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 15px;
    background-color: var(--secondary);
    /* Color de fondo mientras carga */
}

.img-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.img-item:hover {
    transform: scale(1.08);
}

.btn-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    /* Fondo claro en modo claro, oscuro en modo oscuro */
    color: var(--text-main);
    /* Flecha oscura en modo claro, clara en modo oscuro */
    border: 2px solid var(--color-border);
    /* Borde sutil para mejor definición */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 1.2rem;
}

.delete-btn-trash {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--bg-card);
    color: #ef4444;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Estilos para la selección de fotos en modo borrado */
.img-container.selected {
    outline: 4px solid #ef4444;
    /* Borde rojo */
    outline-offset: -4px;
    transition: outline 0.2s ease-in-out;
}

.img-container.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: rgba(239, 68, 68, 0.7);
    /* #ef4444 con opacidad */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

/* Estilos para los comentarios en las fotos de la galería */
.comment-indicator {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--bg-card);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.comment-bubble {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 120%;
    /* Posicionado encima del icono */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.9);
    /* Fondo oscuro casi opaco para alto contraste */
    color: #FFFFFF;
    /* Texto siempre blanco */
    padding: 10px 14px;
    /* Más espaciado */
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    /* width: max-content; */
    /* Se elimina para un ajuste de texto más natural y robusto */
    max-width: 280px;
    /* Aumentado para que el texto largo tenga más espacio */
    font-size: 14px;
    /* Texto más grande para legibilidad */
    text-align: left;
    transition: opacity 0.3s, visibility 0.3s;
    -webkit-backdrop-filter: blur(2px);
    /* Desenfoque sutil para separar del fondo */
    backdrop-filter: blur(2px);
    white-space: normal;
    /* Asegura que el texto se ajuste a la siguiente línea */
    overflow-wrap: break-word;
    /* Estándar actual para romper palabras largas y evitar desbordamiento */
}

.comment-indicator:hover .comment-bubble {
    visibility: visible;
    opacity: 1;
}

/* Mejora de contraste para el placeholder del comentario de la foto */
#photo-comment::placeholder {
    color: var(--primary);
    opacity: 0.7;
}

/* Forzar color de texto en el input de comentario de foto para asegurar contraste */
#photo-comment {
    color: var(--text-main) !important;
    -webkit-text-fill-color: var(--text-main);
    /* Asegurar visibilidad en iOS */
}

/* Estilos para el textarea de comentarios en el lightbox */
#lightbox-comment-input {
    resize: none;
    /* Evita que el usuario pueda redimensionarlo manualmente */
    overflow-y: hidden;
    /* Oculta la barra de scroll vertical mientras crece */
    line-height: 1.6;
    /* Mejora la legibilidad en multilínea */
    transition: height 0.2s ease;
    /* Transición suave al crecer */
    box-sizing: border-box;
}

.btn-prev {
    left: -15px;
}

.btn-next {
    right: -15px;
}

@media (max-width: 600px) {
    .btn-nav {
        display: none;
    }

    /* En móvil se prefiere el gesto de dedo */
}

/* ==========================================
   6. PANEL ADMINISTRADOR Y MODALES
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.4s ease;
}

/* Transición suave para el filtro de desenfoque del contenido principal */
#main-content {
    transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 2s ease-in-out;
}

/* Estilos específicos para texto legal */
.texto-legal {
    text-align: left;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 15px;
}

.texto-legal h2 {
    color: var(--color-title);
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.texto-legal h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--primary);
}

.texto-legal p {
    margin-bottom: 15px;
}

.texto-legal ul {
    margin-bottom: 15px;
}

.texto-legal b {
    color: var(--primary);
}

.toggle-switch {
    width: 50px;
    height: 26px;
    background: #374151;
    border-radius: 13px;
    position: relative;
    cursor: pointer;
}

.toggle-switch.active {
    background: #10b981;
}

.toggle-switch.active .toggle-dot {
    transform: translateX(24px);
}

.toggle-dot {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

#initial-legal-check {
    transition: opacity 0.8s ease, transform 0.5s ease;
}

.shake-anim {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* ==========================================
   7. OVERLAY DE INTRODUCCIÓN (FOTOS FLASH)
   ========================================== */
.intro-photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    /* Fondo transparente para ver la app */
    z-index: 40;
    /* Por debajo del texto (que tendrá 50) */
    display: none;
    /* Se controla con JS */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.photo-flash {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border: 6px solid var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.photo-flash.active {
    transform: scale(1);
    opacity: 1;
}

/* Estilos para el nuevo contador divertido */
.fun-countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fun-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 15px;
    padding: 10px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.fun-countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #dcfce7, #f0fdf4);
    z-index: -1;
    opacity: 0.7;
}

.fun-countdown-number {
    font-family: 'Pacifico', cursive;
    font-size: 2.5rem;
    font-weight: normal;
    color: var(--primary);
    line-height: 1;
}

.fun-countdown-label {
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-main);
    text-transform: uppercase;
}

/* Título fijo para la intro que queda por encima de las fotos */
.intro-static-header {
    position: fixed;
    top: 10%;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 50;
    /* Por encima de las fotos */
    transition: opacity 0.5s;
    pointer-events: none;
    /* Para que no bloquee clics si fuera necesario */
}

/* Estilos extraídos de index copia 3 */
.btn-regalo {
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-regalo:active {
    transform: scale(0.95);
}

/* Estilos para el carrusel de reseñas */
.review-box {
    position: relative;
    min-height: 220px;
    /* Altura fija para que no se mueva al cambiar de reseña */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.review-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    visibility: hidden;
}

.review-item.active {
    opacity: 1;
    visibility: visible;
}

/* Animaciones para el botón "Me encanta" y el formulario de regalo */
.floating-heart {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
    animation: heart-explode 2s ease-out forwards;
    color: #ef4444;
}

@keyframes heart-explode {
    0% {
        transform: translate(-50%, -50%) scale(0.1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(1.2) rotate(var(--rot));
        opacity: 0;
    }
}

@keyframes giftJump {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) scale(1);
    }

    40% {
        transform: translateY(-15px) scale(1.05);
    }

    60% {
        transform: translateY(-7px) scale(1.02);
    }
}

.animate-gift {
    animation: giftJump 2.5s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@keyframes fadeInPop {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.reveal-animation {
    animation: fadeInPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Animación para el descuento en el formulario de regalo */
@keyframes pulse-gold {
    0% {
        text-shadow: 0 0 4px rgba(251, 191, 36, 0.4);
    }

    50% {
        text-shadow: 0 0 16px rgba(251, 191, 36, 1), 0 0 24px rgba(251, 191, 36, 0.6);
    }

    100% {
        text-shadow: 0 0 4px rgba(251, 191, 36, 0.4);
    }
}

.discount-pulse {
    animation: pulse-gold 2.5s infinite ease-in-out;
}

/* Logo blanco para el formulario de regalo */
#marketing-gift-form .logo-white {
    filter: brightness(0) invert(1);
}

/* Mejora de contraste en inputs del formulario de regalo */
#marketing-gift-form input {
    color: #1a202c !important;
    /* Tailwind's gray-900 */
}

#marketing-gift-form input::placeholder {
    color: #718096;
    /* Tailwind's gray-500 */
    opacity: 1;
}

/* Mejora de contraste en el texto del formulario de regalo */
#marketing-gift-form .text-gray-700,
#marketing-gift-form .text-gray-600,
#marketing-gift-form .text-gray-500 {
    color: var(--primary) !important;
    /* Un verde más oscuro y sólido */
    opacity: 0.9 !important;
    /* Aumentamos opacidad para legibilidad */
}

/* Animación para el modal de éxito del regalo */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#gift-confirmation-modal.visible .card {
    animation: slideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ==========================================
   PIE DE PÁGINA
   ========================================== */
footer {
    border-top: 1px solid var(--color-border);
}

/* ==========================================
   BARRA DE NAVEGACIÓN INFERIOR
   ========================================== */

/* Estilos para integrar la barra de navegación en el tema oscuro */
[data-theme="midnight-gold"] #mod-nav>* {
    /* El selector #mod-nav > * apunta al contenedor principal de la barra, sea cual sea */
    background-color: var(--bg-card) !important;
    /* Fondo de tarjeta oscuro */
    border-top-color: var(--color-border) !important;
    /* Borde superior sutil */
    box-shadow: 0 -5px 20px var(--shadow) !important;
    /* Sombra superior pronunciada */
}

/* Cambiar color de los iconos en modo oscuro para que sean visibles */
[data-theme="midnight-gold"] #mod-nav a {
    color: var(--text-main);
    opacity: 0.6;
    /* Un poco atenuados si no están activos */
}

/* Cambiar color del icono activo en modo oscuro */
[data-theme="midnight-gold"] #mod-nav a.active {
    color: var(--primary);
    /* Color de acento dorado */
    opacity: 1;
}

/* ==========================================
   8. NUEVO FORMULARIO RSVP
   ========================================== */

/* --- CONTENEDOR PRINCIPAL (LA TARJETA) --- */
.card-rsvp {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 30px;
    padding: 40px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    box-sizing: border-box;
}

.titulo {
    font-family: 'Pacifico', cursive;
    color: var(--color-title);
    font-size: 3.2rem;
    margin: 0 0 30px 0;
}

/* --- INPUTS Y SECCIONES --- */
.input-nombre {
    width: 100%;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: var(--bg-app);
    color: var(--text-main);
    margin-bottom: 15px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.contador-section {
    background-color: var(--light-green);
    border-radius: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contador-label {
    font-family: 'Pacifico', cursive;
    color: var(--color-title);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.controles {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-circular {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--bg-card);
    color: var(--accent-green);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.valor {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent-green);
    min-width: 20px;
}

/* --- DESPLEGABLE DE MENÚ --- */
.dropdown-menu {
    border: 2px solid var(--accent);
    border-radius: 20px;
    margin: 20px 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.dropdown-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--bg-card);
    font-weight: 500;
    color: var(--text-main);
}

.flecha {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.dropdown-header.activo .flecha {
    transform: rotate(180deg);
}

.menu-opciones {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px;
    background-color: var(--bg-app);
}

.menu-opciones.open {
    display: grid;
}

.opcion-item {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: 15px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
}

.opcion-header {
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.controles-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-circular-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--bg-card);
    color: var(--accent-green);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.valor-mini {
    font-weight: 600;
}

/* --- TEXTAREA --- */
.textarea-alergias {
    width: 100%;
    height: 100px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: var(--bg-app);
    padding: 15px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    color: var(--text-main);
    box-sizing: border-box;
    margin-bottom: 25px;
    resize: none;
}

/* --- BOTÓN DE CONFIRMACIÓN --- */
.btn-confirmar {
    width: 100%;
    background-color: var(--color-button);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.3s;
}

.btn-confirmar:active {
    transform: scale(0.98);
}

.btn-confirmar:disabled {
    background-color: #5f9571;
    opacity: 0.7;
    cursor: not-allowed;
}

.card-rsvp.is-confirmed #rsvp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.card-rsvp.is-confirmed #rsvp-header:hover {
    background-color: var(--light-green);
}

.card-rsvp.is-confirmed .titulo {
    margin-bottom: 0;
    font-size: 2.5rem;
}

.flecha-confirmado {
    font-size: 1.2rem;
    color: var(--accent-green);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#rsvp-form-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease-in-out, margin-top 0.6s ease-in-out;
}

#rsvp-form-content.open {
    max-height: 1200px;
    margin-top: 20px;
}

.keypad-btn {
    width: 80px;
    /* Aumentado de 70px */
    height: 80px;
    /* Aumentado de 70px */
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    /* Aumentado de 1.8rem */
    font-weight: 700;
    color: var(--primary);
    transition: all 0.2s;
    cursor: pointer;
}

.btn-submit:active {
    transform: scale(0.98);
}

/* ==========================================
   9. FOTOS INTRODUCCIÓN (INICIO)
   ========================================== */
.intro-scroll-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 10px;
    flex-wrap: wrap;
}

.intro-photo-card {
    width: calc(33.33% - 10px);
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid var(--color-button) !important;
    box-shadow: none;
    cursor: zoom-in;
    aspect-ratio: 1/1;
    /* Eliminada animación de entrada para evitar parpadeo */
    opacity: 1;
    transform: scale(1);
    transition: transform 0.3s ease;
    /* Solo transición suave para hover si se añade */
}

/* Estado visible eliminado ya que es el default ahora */
.intro-photo-card:active {
    transform: scale(0.98);
    /* Pequeño feedback al pulsar */
}

/* Animación de entrada: Foto a pantalla completa */
.photo-fullscreen {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    width: 90vw !important;
    height: auto !important;
    max-height: 85vh !important;
    transform: translate(-50%, -50%) scale(1) !important;
    z-index: 5000 !important;
    border-radius: 30px !important;
    background: var(--bg-card);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.intro-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
}

/* Estilo para el logo del pie de página */
.footer-logo-style {
    /* Estilos para el logo si fueran necesarios en el futuro */
}

@media (min-width: 768px) {
    .intro-photo-card {
        width: 180px;
        height: 180px;
    }
}

/* ==========================================
   10. MÓDULO REGALO (DISEÑO 2024)
   ========================================== */
.card-regalo {
    /* Contenedor principal de la sección de regalo */
}

.texto-cortesia {
    font-style: italic;
    color: var(--text-main);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding: 0 10px;
}

.botones-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-regalo-nuevo {
    /* Estilo base para los botones de Hucha y Bizum */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    border-radius: 50px;
    border: none;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-hucha {
    /* Estilo específico para el botón de Hucha */
    background-color: var(--bg-card);
    color: var(--accent-green);
    border: 1px solid #e0e0e0;
}

.btn-bizum {
    /* Estilo específico para el botón de Bizum */
    background-color: #00aae4;
    color: #ffffff;
}

.overlay-gracias {
    /* Overlay para el mensaje "Muchas Gracias" (solo para Hucha) */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-green);
    color: white;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: scale(0.95);
    z-index: 10;
}

.overlay-gracias.visible {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.panel-info {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, margin-top 0.5s ease;
    background-color: var(--light-green);
    border-radius: 15px;
}

.panel-info.abierto {
    max-height: 140px;
    margin-top: 15px;
    padding: 20px;
}

.concepto {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
    display: block;
    line-height: 1.4;
}

.concepto b {
    font-weight: 800;
    text-transform: uppercase;
}

.concepto i {
    font-style: italic;
    color: var(--accent-green);
}

.telefono {
    font-size: 1.2rem;
    font-weight: 400;
    color: #555;
    letter-spacing: 1px;
    margin-top: 5px;
    display: block;
}

/* Nuevo Toast Notification */
.toast-new {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-button);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.4s ease, bottom 0.4s ease;
    z-index: 10001;
    /* Por encima del overlay del modal */
    pointer-events: none;
}

.toast-new.visible {
    opacity: 1;
    bottom: 90px;
    /* Por encima de la barra de navegación */
}

/* Nuevo diseño para el Modal del Banco */
.bank-modal-card {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 30px;
    border-radius: 28px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.bank-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--accent);
}

.info-box {
    background: var(--bg-app);
    border: 1px solid var(--color-border);
    padding: 12px 16px;
    border-radius: 16px;
}

.info-box-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    opacity: 0.8;
}

.info-box-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.bizum-card {
    /* Estilos para el modal de Bizum */
    background-color: #00aae4;
    /* Color corporativo de Bizum */
    color: white;
    padding: 30px;
    border-radius: 28px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Animación de latido para el botón de Bizum */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.animate-heartbeat {
    animation: heartbeat 1s infinite ease-in-out;
}

/* ==========================================
   11. MODAL POLÍTICA DE PRIVACIDAD
   ========================================== */

/* Contenedor del texto (reemplaza a .privacy-policy-card) */
.modal-contenido {
    background-color: #064e3b !important;
    /* Verde oscuro fijo para asegurar contraste */
    color: white !important;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 20px;
    position: relative;
    padding: 40px 30px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    font-family: 'Quicksand', sans-serif;
}

/* Botón de cerrar */
.boton-cerrar {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    line-height: 1;
}

/* --- ESTILOS DEL TEXTO LEGAL --- */
.texto-legal,
.texto-legal h2,
.texto-legal h3,
.texto-legal p,
.texto-legal li,
.texto-legal b,
.texto-legal strong,
.texto-legal span {
    color: #ffffff !important;
    line-height: 1.6;
    text-align: left;
}

.texto-legal h2 {
    font-family: 'Pacifico', cursive;
    /* Usar la fuente cursiva del proyecto */
    font-size: 1.8rem;
    /* Ajustar tamaño */
    margin-top: 0;
    text-align: center;
    margin-bottom: 20px;
}

.texto-legal h3 {
    font-size: 1.1rem;
    margin-top: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
    font-weight: 700;
}

.texto-legal p,
.texto-legal li {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.texto-legal ul {
    padding-left: 20px;
    list-style-type: disc;
}

.texto-legal .gracias-final {
    text-align: center;
    margin-top: 30px;
    color: white;
    font-weight: 600;
}

/* Personalización del scrollbar */
.modal-contenido::-webkit-scrollbar {
    width: 8px;
}

.modal-contenido::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
}

/* Estilos para las tarjetas colapsables */
.card.is-confirmed #rsvp-header,
/* Selector actualizado para el nuevo estilo */
.card.is-collapsible #regalo-header {
    /* Selector actualizado para el nuevo estilo */
    cursor: pointer;
    border-radius: 25px;
    padding: 10px;
    transition: background-color 0.3s;
}

.card.is-confirmed #rsvp-header:hover,
/* Selector actualizado para el nuevo estilo */
.card.is-collapsible #regalo-header:hover {
    /* Selector actualizado para el nuevo estilo */
    background-color: #f8fafc;
}

/* ==========================================
   12. ESTILOS ESPECÍFICOS ADMIN
   ========================================== */

/* Animación para el botón de email */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px #2563eb, 0 0 10px #3b82f6;
    }

    50% {
        box-shadow: 0 0 20px #3b82f6, 0 0 30px #60a5fa;
    }

    100% {
        box-shadow: 0 0 5px #2563eb, 0 0 10px #3b82f6;
    }
}

.animate-email {
    animation: glow 2.5s infinite ease-in-out;
}

/* Estilos para la lista de invitados en modo borrado */
.guest-item {
    transition: background-color 0.3s, border-color 0.3s;
    cursor: pointer;
    position: relative;
    /* Necesario para el z-index */
}

.guest-item.delete-mode {
    cursor: pointer;
}

.guest-detail-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-app) 100%);
    /* Fondo con gradiente sutil */
    color: var(--text-main);
    padding: 30px;
    border-radius: 28px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 40px var(--shadow);
    /* Usar variable de sombra */
    border: 1px solid var(--color-border);
    /* Añadir borde para definición */
}

/* Estilos para el modo oscuro del modal de invitado */
[data-theme="midnight-gold"] .guest-detail-card {
    background: rgba(30, 30, 30, 0.75);
    /* Fondo oscuro translúcido */
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="midnight-gold"] .guest-detail-card>button {
    color: var(--text-main);
    opacity: 0.6;
}

#guest-detail-menu .menu-item {
    background: var(--bg-app);
    border: 1px solid var(--color-border);
    padding: 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.guest-item.selected {
    background-color: rgba(239, 68, 68, 0.15) !important;
    /* bg-red-500/15 */
    border-color: rgba(239, 68, 68, 0.4) !important;
    /* border-red-400/40 */
}

/* Flechas para indicar scroll en la lista de invitados */
.guest-list-container::before,
.guest-list-container::after {
    content: '╲╱';
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scale(1.5, 0.8);
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
    animation: pulse-arrows 1.5s infinite;
    pointer-events: none;
}

.guest-list-container::before {
    top: -8px;
    transform: translateX(-50%) rotate(180deg) scale(1.5, 0.8);
}

.guest-list-container::after {
    bottom: -8px;
}

@keyframes pulse-arrows {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Texto encima del icono de email */
.admin-email-title {
    font-size: 0.9rem;
    /* Un poco más grande que text-[10px] */
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    /* Más opaco para que se vea más */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================
   9. INTERRUPTOR DE TEMA PÚBLICO (FLOTANTE)
   ========================================== */
#music-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* Separación entre el reproductor y el tema */
}

.theme-btn-public {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--color-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    /* Estado inicial oculto para no estorbar en la intro */
    opacity: 0;
    transform: translateY(-20px) scale(0.8);
    pointer-events: none;
}

body.unlocked .theme-btn-public {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition-delay: 2s;
    /* Aparece suavemente después de desbloquear */
}

/* Efecto hover */
.theme-btn-public:hover {
    transform: scale(1.1) !important;
    background: var(--secondary);
}

.theme-btn-public:active {
    transform: scale(0.95) !important;
}

/* En modo locked, aseguramos que ni ocupe espacio ni se vea */
body.locked .theme-btn-public {
    display: none;
}

/* ==========================================
   10. CUENTA REGRESIVA Y SONIDO
   ========================================== */
#countdown-container {
    transition: opacity 0.5s ease;
    pointer-events: none;
    /* Que no bloquee clics */
}

body.unlocked #countdown-container {
    opacity: 0;
    /* Desaparece al desbloquear */
}

#sound-status-icon {
    animation: sound-pulse 1s infinite alternate;
}

@keyframes sound-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

#countdown-display {
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#countdown-display.active {
    transform: scale(1);
}

#countdown-display.pop-out {
    transform: scale(1.5);
    opacity: 0;
}

/* ==========================================
   11. ATENCIÓN FORMULARIO (PULSO)
   ========================================== */
@keyframes attention-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7);
        /* Yellow/Gold-500 */
        border-color: rgba(234, 179, 8, 1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(234, 179, 8, 0);
        border-color: rgba(234, 179, 8, 1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0);
        border-color: rgba(255, 255, 255, 0.2);
        /* Default border color approx */
    }
}

.attention-pulse {
    animation: attention-pulse 2s infinite;
    position: relative;
    z-index: 10;
}

/* Detener animación al enfocar o interactuar */
.attention-pulse:focus,
.attention-pulse:active,
.attention-pulse:hover {
    animation: none;
    border-color: rgba(234, 179, 8, 1);
    /* Mantener borde dorado activo */
}

/* ==========================================
   MODO OSCURO: Texto visible en sección Momentos
   ========================================== */
[data-theme="midnight-gold"] #slider-track p {
    color: var(--text-main) !important;
}

[data-theme="midnight-gold"] #photo-comment {
    color: var(--text-main) !important;
    background-color: rgba(255, 251, 235, 0.1) !important;
    border-color: var(--primary) !important;
}

[data-theme="midnight-gold"] #photo-comment::placeholder {
    color: var(--text-main);
    opacity: 0.5;
}

/* ==========================================
   SELECTOR DE PALETAS DE COLORES
   ========================================== */
.palette-selector {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.palette-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.palette-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.palette-option.active {
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.4);
    transform: scale(1.05);
}

/* Círculos con reflejos y texturas */
.palette-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--palette-bg);
    background-size: cover;
    background-position: center;
    transition: all 0.5s ease;
}

.palette-option::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 100%);
    border-radius: 50%;
    pointer-events: none;
}

/* Colores específicos para cada paleta */
.palette-green {
    --palette-bg: url('../images/texture_green_pastel.png'), linear-gradient(to bottom, #10b981 50%, #fff 50%);
}

.palette-pink {
    --palette-bg: url('../images/texture_pink_pastel.png'), linear-gradient(to bottom, #F472B6 50%, #fff 50%);
}

.palette-blue {
    --palette-bg: url('../images/texture_blue_pastel.png'), linear-gradient(to bottom, #60A5FA 50%, #fff 50%);
}