:root {
    --color-maestro: #b39268; 
    --accent-color: #007bff; 
    --text-color: #444;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --shadow-soft: none; 
    --shadow-deep: none;

    /* 🎨 COLOR MAESTRO Y ESTILOS PARA LA VENTANA DE COMENTARIOS 🎨 */
    --color-comentario-maestro: #334155;                     /* Cambia este color para personalizar el botón principal y acentos */
    --color-comentario-bg: rgba(255, 255, 255, 0.85);        /* Fondo translúcido de la ventana */
    --color-comentario-border: rgba(255, 255, 255, 0.6);     /* Borde translúcido de la ventana */
    --color-comentario-titulo: #1e293b;                     /* Color del título principal */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@font-face {
    font-family: "Against Regular"; 
    src: url('fonts/against-regular.woff2') format('woff2'),
         url('fonts/against-regular.woff') format('woff'); 
    font-weight: 400; font-style: normal; font-display: swap;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.4;
    overflow-x: hidden;
}

.container {
    width: 92%;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 20px;
    box-shadow: none;
    border: 1px solid #f0f0f0;
}

/* HERO SECTION */
.main-header {
    position: relative;
    height: 75vh; 
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('boda.jpg');
    background-size: cover;
    background-position: center 20%; 
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    bottom: -2px; left: 0; width: 100%;
    height: 70%; 
    background: linear-gradient(to top, 
        var(--bg-color) 15%,         
        rgba(253,253,253,0.8) 40%,  
        rgba(253,253,253,0) 100%    
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-bottom: 40px; 
    text-align: center;
}

.badge-premium {
    background: rgba(138, 79, 255, 0.08);
    color: #000000;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-content h3 {
    font-family: "Against Regular", sans-serif;
    font-size: 1.4em;
    margin-top: 15px;
    color: #444;
}

.hero-content h1 {
    font-family: "Against Regular", sans-serif;
    font-size: 1.4em; 
    color: var(--color-maestro); 
    margin: 4px 0;
}

.event-date {
    color: #999;
    font-size: 0.9em;
    font-weight: 500;
}

/* STATS BAR (MINIMALISTA, TRES NIVELES: ICONO ARRIBA, NÚMERO Y TEXTO ETIQUETA) */
.stats-bar {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap !important;
    width: 100%;
    max-width: 480px;
    margin: -14px auto 18px !important;
    padding: 4px 6px !important;
    position: relative;
    z-index: 10;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #94a3b8;
    text-align: center;
    flex: 1 1 0px;
    min-width: 0;
}

.stat-item .icon { 
    width: 15px; 
    height: 15px; 
    fill: #94a3b8; 
    opacity: 0.85;
    margin-bottom: 2px;
}

.stat-number {
    font-size: 0.68em;
    font-weight: 600;
    color: #64748b;
    line-height: 1.1;
}

.stat-label { 
    font-size: 0.62em; 
    font-weight: 500; 
    color: #94a3b8; 
    letter-spacing: 0.1px;
    white-space: nowrap;
}

/* BARRA DE DESCARGA QR */
.qr-download-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 10px 0 30px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    text-decoration: none;
    color: #888;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.qr-download-bar:hover {
    background: #ffffff;
    border-color: var(--color-maestro);
    color: var(--color-maestro);
    transform: translateY(-2px);
    box-shadow: none;
}

.icon-qr { width: 20px; height: 20px; stroke: currentColor; }

/* TABS NAV */
.tabs-nav {
    display: flex;
    padding: 6px !important;
    background: #f0f0f0 !important;
    border-radius: 40px !important;
    margin-bottom: 25px;
}

.tab-button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 700;
    color: #888;
    transition: 0.3s;
}

.tab-button.active {
    background: #ffffff;
    color: var(--color-maestro); 
    box-shadow: none;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

/* BARRA CAMBIO DE VISTA */
.view-mode-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn svg { width: 14px; height: 14px; fill: currentColor; }

.view-btn.active {
    border-color: #cbd5e1;
    color: #334155;
    background: #e2e8f0;
    box-shadow: none;
}

.view-btn:hover:not(.active) {
    border-color: #e2e8f0;
    color: #64748b;
    background: #f1f5f9;
}

/* GALERÍA RESPONSIVA & VISTA TARJETAS (STORY) */
.gallery-grid.mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
}

@media (min-width: 768px) {
    .gallery-grid.mode-grid { grid-template-columns: repeat(4, 1fr); }
}

/* CONTENEDOR CON DEGRADADO Y DIFUMINADO EN BLANCO EN LOS BORDES LATERALES EN MODO STORY */
.gallery-container {
    position: relative;
    width: 100%;
}

.gallery-container.mode-single-active::before,
.gallery-container.mode-single-active::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-container.mode-single-active::before {
    left: 0;
    background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.gallery-container.mode-single-active::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

/* VISTA STORY (1 COLUMNA DESLIZABLE DE IZQUIERDA A DERECHA O VICEVERSA) */
.gallery-grid.mode-single {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 16px;
    padding: 10px 45px 25px !important;
    margin: 0 auto;
    max-width: 480px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.gallery-grid.mode-single::-webkit-scrollbar {
    display: none; /* Chrome / Safari / Edge */
}

.gallery-image-item {
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    border: none;
    cursor: pointer;
    position: relative;
    box-shadow: none;
}

.mode-grid .gallery-image-item { 
    aspect-ratio: 1/1; 
    transition: transform 0.2s ease;
}

.mode-single .gallery-image-item {
    flex: 0 0 85%;
    max-width: 360px;
    scroll-snap-align: center;
    aspect-ratio: 3/4;
    border-radius: 24px;
    opacity: 0.35;
    filter: brightness(1.1) contrast(0.85);
    transform: scale(0.92);
    transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}

/* FOTO CENTRADA ACTIVA EN STORY: 100% VISIBLE Y SIN DIFUMINADO */
.mode-single .gallery-image-item.active-story {
    opacity: 1;
    filter: brightness(1) contrast(1);
    transform: scale(1);
}

.gallery-image-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    image-orientation: from-image; 
    display: block;
}

/* Pie de foto e info de usuario en la tarjeta Story */
.mode-single .item-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 16px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mode-single .gallery-image-item.active-story .item-overlay-info {
    opacity: 1;
}

.mode-single .item-overlay-info .story-title {
    font-weight: 700;
    font-size: 0.95em;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    line-height: 1.25;
}

.mode-single .item-overlay-info .story-subtitle {
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

/* Indicadores de carrusel inferiores para Story (líneas horizontales) */
.story-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 15px 0 10px;
}

.story-dot {
    width: 20px;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.story-dot.active {
    width: 32px;
    background: #334155;
}

/* MODAL EMERGENTE */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1) !important;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 26px; color: #cbd5e1; cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #64748b;
}

/* TÍTULOS DE SECCIÓN Y FORMULARIOS (SUTILES Y ELEGANTES) */
.section-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.modal-subtitle {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 400;
}

/* FORMULARIOS Y SELECTOR DE COLORES MINIMALISTAS (TIPOGRAFÍA HOMOGÉNEA) */
input, textarea, button, select {
    font-family: inherit;
}

input[type="text"], textarea {
    font-family: inherit;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    margin-bottom: 10px;
    font-size: 0.86em;
    outline: none;
    color: #334155; 
    transition: all 0.2s ease;
}

input::placeholder, textarea::placeholder {
    font-family: inherit;
    color: #94a3b8;
    opacity: 0.9;
}

input[type="text"]:focus, textarea:focus {
    background: #ffffff;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
}

textarea {
    resize: none;
    min-height: 56px;
}

.color-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 10px 0 18px;
    width: 100%;
}

.color-option { cursor: pointer; position: relative; display: flex; justify-content: center; align-items: center; }
.color-option input[type="radio"] { display: none; }

.color-box {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 1px #eee;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.color-box.lightpink { background-color: #ffdae0; }
.color-box.lightgreen { background-color: #e2fbd7; }
.color-box.lightblue { background-color: #d7eefb; }
.color-box.black { background-color: #333333; }

.color-option input[type="radio"]:checked + .color-box {
    transform: scale(1.3);
    box-shadow: 0 0 0 2px var(--color-maestro); 
}

/* UPLOAD AREA */
.upload-area {
    border: 2px dashed #eee;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.icon-circle {
    width: 55px; height: 55px;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    border: 1px solid #f0f0f0;
}

#image-preview-container { display: flex; justify-content: center; margin: 10px 0 20px; }
#image-preview {
    width: 180px; height: 180px;
    border-radius: 15px;
    overflow: hidden;
    display: none;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
}
#image-preview img { width: 100%; height: 100%; object-fit: cover; image-orientation: from-image; }

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--color-maestro); 
    color: #fff;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.btn-primary:hover { filter: brightness(1.2); transform: translateY(-2px); }

/* BOTÓN FLOTANTE (FAB) */
.floating-action-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color); 
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center; gap: 10px;
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
    z-index: 1000;
    cursor: pointer;
    transition: 0.3s;
}
.floating-action-btn:hover { transform: translateX(-50%) translateY(-3px); }

/* POST-IT */
.note-item, .note-preview {
    padding: 25px !important;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: none !important;
    transition: transform 0.3s ease;
    position: relative;
    border-radius: 4px;
}
.note-item.lightpink, .note-preview.lightpink { background-color: #ffdae0 !important; border: none; }
.note-item.lightgreen, .note-preview.lightgreen { background-color: #e2fbd7 !important; border: none; }
.note-item.lightblue, .note-preview.lightblue { background-color: #d7eefb !important; border: none; }
.note-item.black, .note-preview.black { background-color: #333333 !important; color: white !important; border: none; }

.note-item .note-name, .note-preview .note-name { 
    font-weight: 800; 
    font-size: 0.8em; 
    text-transform: uppercase; 
    margin-bottom: 10px; 
    opacity: 0.8;
    color: #000000 !important; 
}

.note-item .note-text, .note-preview .note-text { 
    font-family: "Ink Free", cursive; 
    font-size: 1.4em; 
    line-height: 1.2;
    color: #000000 !important; 
}

.note-item.black .note-text, .note-preview.black .note-text,
.note-item.black .note-name, .note-preview.black .note-name {
    color: #ffffff !important;
}

.note-grid .note-item:nth-child(even) { transform: rotate(1.5deg); }
.note-grid .note-item:nth-child(odd) { transform: rotate(-1deg); }
.note-grid .note-item:hover { transform: rotate(0deg) scale(1.03); z-index: 5; }

#note-preview-section { display: flex; justify-content: center; margin: 20px 0; }

/* DESCARGA ALBUM, DEDICATORIAS Y AUDIOS */
.download-section { display: flex; justify-content: center; align-items: center; margin: 40px 0 20px; width: 100%; }
.download-section .btn-secondary,
.btn-secondary {
    background-color: transparent !important; color: #777 !important; border: 1px solid #eee !important;
    padding: 12px 30px; border-radius: 50px; font-size: 0.85em; font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.download-section .btn-secondary:hover,
.btn-secondary:hover { 
    border-color: var(--color-maestro) !important; 
    color: var(--color-maestro) !important; 
    transform: translateY(-1px); 
}

/* FOOTER */
.main-footer { 
    text-align: center; 
    padding: 40px 0 120px; 
    color: #bbb; 
    font-size: 0.8em; 
}
.main-footer a { color: #bbb; text-decoration: none; font-weight: 600; transition: 0.3s; }
.main-footer a:hover { color: var(--color-maestro); }

.social-icons { 
    display: flex; 
    justify-content: center; 
    gap: 25px; 
    margin-bottom: 15px; 
}

.social-icons img { 
    width: 22px; 
    filter: grayscale(1); 
    opacity: 0.4; 
    transition: 0.3s; 
}

.social-icons a:hover img { 
    opacity: 0.8; 
    filter: grayscale(0); 
}

/* MÚSICA */
.music-control-container { 
    position: fixed; 
    bottom: 30px; 
    right: 20px; 
    z-index: 1000; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.music-label {
    font-size: 0.55em; 
    text-transform: uppercase;
    letter-spacing: 1.5px; 
    font-weight: 900;
    color: var(--text-color) !important;
    background: transparent; 
    margin-bottom: 4px;
    pointer-events: none;
    opacity: 0.8;
    animation: fadeIn 0.8s ease;
}

.floating-music-button { 
    width: 44px; height: 44px; 
    border-radius: 50%; border: none;
    background: var(--color-maestro); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    cursor: pointer; 
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
.floating-music-button:hover { transform: scale(1.1); }
#music-icon { width: 22px; height: 22px; fill: #ffffff; } 

/* LIGHTBOX & STORY MODE MÓVIL */
#lightbox { 
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    z-index: 4000; 
    justify-content: center; align-items: center; 
    touch-action: pan-y;
}

.lightbox-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 90%;
    max-width: 420px;
    position: relative;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-img-box {
    position: relative;
    width: 100%;
    max-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.5);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transición suave hacia arriba solo cuando la imagen tiene comentarios */
.lightbox-wrapper.has-comments .lightbox-img-box {
    transform: translateY(-4px);
    max-height: 52vh;
}

#lightbox-image { 
    max-width: 100%; 
    max-height: 100%; 
    border-radius: 20px; 
    object-fit: contain;
    image-orientation: from-image;
    transition: transform 0.2s ease, opacity 0.3s ease;
}

#lightbox-uploader-display {
    color: #fff;
    font-weight: 600;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 18px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Transición de disolución (Dissolve) para la entrada de comentarios */
@keyframes commentDissolve {
    0% {
        opacity: 0;
        filter: blur(6px);
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
        transform: scale(1);
    }
}

.comments-list-box {
    width: 100%;
    max-height: 0px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0px 5px;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), padding 0.45s ease;
}

.lightbox-wrapper.has-comments .comments-list-box {
    max-height: 90px;
    opacity: 1;
    padding: 5px;
    pointer-events: auto;
}

.comment-bubble {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 7px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: commentDissolve 0.45s ease-in-out forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.comment-bubble strong {
    color: var(--color-maestro);
    margin-right: 6px;
}

/* BARRA DE REACCIONES TIPO "STORY" (INSPIRADO EN LA IMAGEN ADJUNTADA) */
.reaction-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 16px;
    border-radius: 40px;
    width: 100%;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.react-btn {
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.react-btn:active {
    transform: scale(1.4);
}

.comment-trigger {
    font-size: 1.2em;
    color: #fff;
    gap: 4px;
}

#comment-count-badge {
    font-size: 0.6em;
    background: var(--color-maestro);
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 800;
}

/* ANIMACIÓN DE EMOJIS FLOTANTES SOBRE LA IMAGEN */
#floating-emojis-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 100;
}

.floating-emoji {
    position: absolute;
    bottom: 20px;
    font-size: 2.2em;
    animation: floatUp 1.8s ease-out forwards;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.6) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(-280px) scale(1.4) rotate(20deg);
        opacity: 0;
    }
}

.close-lightbox {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 35px; color: #fff; cursor: pointer;
    z-index: 4020;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff; 
    font-size: 55px; 
    cursor: pointer;
    padding: 15px;
    z-index: 4010;
    opacity: 0.6;
    transition: 0.3s;
    font-weight: 100; 
}
.lightbox-nav:hover { opacity: 1; transform: translateY(-50%) scale(1.1); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

img { -webkit-touch-callout: none; user-select: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 480px) {
    .stats-bar { width: 85% !important; }
    .lightbox-nav { display: none; } /* En móvil se usa el swipe táctil */
    .qr-download-bar { font-size: 0.85em; padding: 15px; }
}

/* MODALES SOBREPUESTOS CON ALTO Z-INDEX Y DISEÑO MINIMALISTA TRANSLÚCIDO */
#commentModal {
    z-index: 10000 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#commentModal .modal-content {
    max-width: 360px;
    padding: 22px;
    border-radius: 20px;
    background: var(--color-comentario-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-comentario-border) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

#commentModal .section-title {
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    color: var(--color-comentario-titulo);
    margin-bottom: 3px;
}

#commentModal .modal-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 16px;
}

#commentModal input[type="text"],
#commentModal textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.82rem;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    outline: none;
    color: #334155;
    transition: all 0.2s ease;
}

#commentModal input[type="text"]:focus,
#commentModal textarea:focus {
    background: #ffffff;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

#commentModal .btn-primary {
    width: 100%;
    padding: 12px 16px;
    margin-top: 10px;
    background: var(--color-comentario-maestro) !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 10px !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, filter 0.2s ease;
}

#commentModal .btn-primary:hover {
    filter: brightness(0.85);
    transform: translateY(-1px);
}

/* MODAL COPYRIGHT SOBREPUESTO EN MÁXIMA PRIORIDAD */
#copyright-modal {
    z-index: 20000 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#copyright-modal .modal-content {
    max-width: 320px;
    padding: 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25) !important;
    text-align: center;
}

#copyright-modal .icon-circle {
    background: rgba(254, 226, 226, 0.7) !important;
    color: #ef4444 !important;
}

#copyright-modal .btn-primary {
    background: #334155 !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

#copyright-modal .btn-primary:hover {
    background: #1e293b !important;
}

/* --- COMPONENTES Y MODAL DE NOTAS DE VOZ --- */
.voice-card-cta {
    text-align: center;
    padding: 24px;
    margin-bottom: 25px;
}

.voice-cta-btn {
    margin-top: 15px;
    padding: 12px 26px;
    border-radius: 30px;
    font-size: 0.9em;
    font-weight: 600;
    background: #ef4444 !important;
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.voice-cta-btn:hover {
    background: #dc2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
}

/* MODAL DE GRABACIÓN DE VOZ */
.voice-modal-box {
    max-width: 420px !important;
    width: 90%;
    padding: 28px !important;
    border-radius: 20px !important;
}

.voice-recorder-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 15px;
}

#voiceUploaderName {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 0.88em;
    outline: none;
    background: rgba(255,255,255,0.8);
}

.voice-status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px;
    background: rgba(241, 245, 249, 0.7);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.mic-record-button {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #64748b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.3);
}

.mic-record-button .mic-icon-svg {
    width: 32px;
    height: 32px;
}

.mic-record-button.recording {
    background: #ef4444 !important;
    animation: micPulse 1.2s infinite alternate;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

@keyframes micPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.12); }
}

.voice-timer {
    font-size: 1.1em;
    font-weight: 700;
    color: #334155;
    letter-spacing: 1px;
}

.voice-status-label {
    font-size: 0.78em;
    color: #64748b;
    text-align: center;
}

.voice-preview-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    text-align: center;
}

.preview-title {
    font-size: 0.8em;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
}

#audioPreview {
    width: 100%;
    margin-bottom: 12px;
    height: 40px;
    border-radius: 20px;
}

.voice-action-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.voice-action-row button {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.82em;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: filter 0.2s ease;
}

/* GRILLA DE REPRODUCTORES DE AUDIO */
.audio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.audio-card {
    padding: 16px !important;
    border-radius: 16px !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.audio-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: #475569;
}

.audio-uploader strong {
    color: #1e293b;
}

.audio-date {
    font-size: 0.75em;
    color: #94a3b8;
}

.audio-player {
    width: 100%;
    height: 38px;
    border-radius: 20px;
    user-select: none;
    -webkit-user-select: none;
}