/* ========================================================
   MOSAIC ANIMATED WALL & SCREENSAVER (FONDO DE PANTALLA)
   ======================================================== */

:root {
    --mosaic-bg: #07090e;
    --mosaic-accent-1: #8b5cf6;
    --mosaic-accent-2: #ec4899;
    --mosaic-accent-3: #3b82f6;
    --mosaic-card-bg: rgba(18, 24, 38, 0.82);
    --mosaic-card-border: rgba(255, 255, 255, 0.16);
    --mosaic-card-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    --mosaic-radius: 16px;
}

/* Contenedor Principal del Fondo de Pantalla Mosaico */
.mosaic-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--mosaic-bg);
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    color: #f8fafc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

/* Oculto por defecto si está en el index */
.mosaic-stage.hidden {
    display: none !important;
}

/* Fondo Atmosférico con Malla de Gradientes Vivos */
.mosaic-ambient-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.mosaic-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.45;
    animation: mosaicOrbFloat 18s ease-in-out infinite alternate;
}

.mosaic-orb-1 {
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.5) 0%, transparent 70%);
    top: -15%;
    left: -10%;
    animation-duration: 22s;
}

.mosaic-orb-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.45) 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation-duration: 26s;
    animation-direction: alternate-reverse;
}

.mosaic-orb-3 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 70%);
    top: 35%;
    left: 40%;
    animation-duration: 20s;
}

@keyframes mosaicOrbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(4vw, 5vh) scale(1.12); }
    100% { transform: translate(-3vw, -4vh) scale(0.92); }
}

/* Barra Superior Flotante del Mosaico */
.mosaic-header-overlay {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

.mosaic-brand-pill {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.25rem;
    background: rgba(13, 17, 27, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s ease;
}

.mosaic-brand-pill:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.45);
}

.mosaic-live-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    border-radius: 9999px;
}

.mosaic-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.7); opacity: 0.4; }
}

.mosaic-event-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
}

.mosaic-event-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-left: 0.25rem;
}

.mosaic-header-actions {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.mosaic-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    background: rgba(13, 17, 27, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    text-decoration: none;
}

.mosaic-btn-icon:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Área de Columnas de Mosaico */
.mosaic-wall-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 10;
    padding: 2.5rem 1rem 3.5rem;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* Gradientes sutiles arriba y abajo para desvanecer suavemente */
.mosaic-wall-viewport::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: linear-gradient(to bottom, #07090e 0%, transparent 100%);
    pointer-events: none;
    z-index: 15;
}

.mosaic-wall-viewport::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #07090e 0%, transparent 100%);
    pointer-events: none;
    z-index: 15;
}

.mosaic-columns-container {
    display: flex;
    width: 100%;
    max-width: 1920px;
    height: 100%;
    gap: 1.25rem;
    justify-content: center;
}

/* Columna individual con animación de flujo infinito */
.mosaic-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.mosaic-track {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
}

/* Flujo vertical continuo alternado por columna */
.mosaic-col-up .mosaic-track {
    animation: mosaicScrollUp 38s linear infinite;
}

.mosaic-col-down .mosaic-track {
    animation: mosaicScrollDown 44s linear infinite;
}

.mosaic-col-up-slow .mosaic-track {
    animation: mosaicScrollUp 50s linear infinite;
}

.mosaic-col-down-slow .mosaic-track {
    animation: mosaicScrollDown 56s linear infinite;
}

@keyframes mosaicScrollUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes mosaicScrollDown {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}

/* Tarjeta de Fotografía en el Mosaico */
.mosaic-card {
    position: relative;
    background: var(--mosaic-card-bg);
    border: 1px solid var(--mosaic-card-border);
    border-radius: var(--mosaic-radius);
    overflow: hidden;
    box-shadow: var(--mosaic-card-shadow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    flex-shrink: 0;
    width: 100%;
}

.mosaic-card:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(139, 92, 246, 0.35);
    border-color: rgba(139, 92, 246, 0.6);
    z-index: 50;
}

.mosaic-card-img-wrap {
    width: 100%;
    position: relative;
    background: #0d111b;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.mosaic-card.is-strip .mosaic-card-img-wrap {
    min-height: 220px;
    aspect-ratio: 9 / 16;
}

.mosaic-card.is-individual .mosaic-card-img-wrap {
    min-height: 140px;
    aspect-ratio: 4 / 3;
}

.mosaic-card-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.mosaic-card:hover .mosaic-card-img {
    transform: scale(1.03);
}

.mosaic-card-badge {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    padding: 0.25rem 0.55rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #e2e8f0;
    pointer-events: none;
}

/* Tarjeta Tipo Tira vs Tipo Foto */
.mosaic-card.is-strip {
    border-top: 3px solid #8b5cf6;
}

.mosaic-card.is-individual {
    border-top: 3px solid #ec4899;
}

/* Tarjeta en Modo Spotlight (Rotación destacada) */
.mosaic-card.is-spotlight {
    animation: spotlightPulse 4.5s ease-in-out infinite;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.55), 0 25px 50px rgba(0,0,0,0.85) !important;
    z-index: 60;
}

@keyframes spotlightPulse {
    0%, 100% { transform: scale(1.02); }
    50% { transform: scale(1.08) translateY(-6px); }
}

/* Botón Gigante Flotante de Llamado a la Acción (Kiosk Attractor) */
.mosaic-cta-overlay {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    pointer-events: auto;
}

.mosaic-start-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.15rem 2.5rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f43f5e 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(236, 72, 153, 0.55), 0 0 25px rgba(139, 92, 246, 0.45);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
}

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

.mosaic-start-btn:hover, .mosaic-start-btn:active {
    transform: scale(1.06) translateY(-3px);
    box-shadow: 0 18px 45px rgba(236, 72, 153, 0.7), 0 0 35px rgba(139, 92, 246, 0.7);
}

.mosaic-pulse-ring {
    position: absolute;
    inset: -6px;
    border-radius: 9999px;
    border: 2px solid rgba(236, 72, 153, 0.7);
    animation: pulseRingAnim 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

@keyframes pulseRingAnim {
    0% { transform: scale(0.96); opacity: 0.9; }
    50% { transform: scale(1.1); opacity: 0.3; }
    100% { transform: scale(1.25); opacity: 0; }
}

.mosaic-cta-subtext {
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(13, 17, 27, 0.8);
    backdrop-filter: blur(12px);
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Modal / Escenario de ¡NUEVA FOTO EN VIVO! */
.mosaic-new-photo-stage {
    position: absolute;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 9, 14, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mosaic-new-photo-stage.active {
    opacity: 1;
    pointer-events: auto;
}

/* Destello de Flash */
.mosaic-flash-overlay {
    position: absolute;
    inset: 0;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 600;
}

.mosaic-flash-overlay.trigger-flash {
    animation: flashBurst 0.55s ease-out forwards;
}

@keyframes flashBurst {
    0% { opacity: 0.95; }
    100% { opacity: 0; }
}

.mosaic-new-card-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    max-width: 90vw;
    max-height: 85vh;
    transform: scale(0.7) translateY(40px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mosaic-new-photo-stage.active .mosaic-new-card-box {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.mosaic-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.6rem;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    border-radius: 9999px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #ffffff;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
    animation: pulseBadge 1.5s infinite;
}

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

.mosaic-new-card-frame {
    position: relative;
    max-height: 65vh;
    border-radius: 20px;
    overflow: hidden;
    padding: 6px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899, #f59e0b, #10b981);
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(236, 72, 153, 0.4);
}

.mosaic-new-card-img {
    display: block;
    max-height: calc(65vh - 12px);
    max-width: 80vw;
    border-radius: 16px;
    object-fit: contain;
    background: #000;
}

.mosaic-new-toast-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #cbd5e1;
}

/* Estado de Mosaico Vacío (Cuando aún no hay fotos tomadas) */
.mosaic-empty-notice {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    background: rgba(18, 24, 38, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 2.5rem 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    z-index: 20;
    max-width: 480px;
}

.mosaic-empty-icon {
    font-size: 3.5rem;
    animation: floatIcon 3s ease-in-out infinite;
}

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

.mosaic-empty-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f8fafc;
}

.mosaic-empty-desc {
    font-size: 0.92rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* Adaptación Responsiva para Pantallas de Tótem Vertical (9:16) y Móviles */
@media (max-width: 768px), (orientation: portrait) {
    .mosaic-columns-container {
        gap: 0.65rem;
    }
    
    .mosaic-wall-viewport {
        padding: 2rem 0.5rem 3rem;
    }

    .mosaic-header-overlay {
        top: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
    }
    
    .mosaic-brand-pill {
        padding: 0.4rem 0.85rem;
    }
    
    .mosaic-event-title {
        font-size: 0.95rem;
    }
    
    .mosaic-start-btn {
        padding: 1rem 1.75rem;
        font-size: 1.05rem;
    }
    
    .mosaic-cta-overlay {
        bottom: 1.25rem;
    }
}
