/* live-wall.css */
.live-wall-body {
    background-color: #050505;
    overflow: hidden;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Dynamic Ambient Background (Orbs) */
.ambient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.6;
    animation: drift 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 60vw;
    height: 60vw;
    background: #ff007f;
    top: -20%;
    left: -10%;
    animation-duration: 25s;
}

.orb-2 {
    width: 50vw;
    height: 50vw;
    background: #00f0ff;
    bottom: -10%;
    right: -10%;
    animation-duration: 22s;
    animation-delay: -5s;
}

.orb-3 {
    width: 40vw;
    height: 40vw;
    background: #7000ff;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 30s;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5%, 10%) scale(1.1);
    }

    66% {
        transform: translate(-5%, 5%) scale(0.9);
    }

    100% {
        transform: translate(10%, -5%) scale(1.05);
    }
}

#collage-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Encima de los orbes */
    perspective: 1000px;
}

/* Header interactions */
.live-wall-body .header {
    z-index: 10;
    pointer-events: none;
    position: relative;
    /* Change from fixed to relative to avoid fixed context issues */
    padding-bottom: 0;
}

.live-wall-body .header-right {
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.live-wall-body .header-right:hover {
    opacity: 1;
}

/* Watermark */
.wall-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10vw;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    /* Entre orbes y collage */
}

/* Animación y Contenedor de Fotos */
.collage-wrapper {
    position: absolute;
    opacity: 0;
    transform: scale(0.5) translateZ(-500px);
    animation: zoomInCollage 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Estilo Premium de Foto (Glass effect en borde) */
.collage-photo {
    width: 320px;
    height: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 12px 45px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2);

    /* Configuración de la animación flotante sutil */
    animation: floatSubtle var(--float-duration, 6s) ease-in-out infinite alternate;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
}

.collage-photo img {
    width: 100%;
    height: auto;
    display: block;
    /* Corrección de color ligera para que destaquen más vibrantes contra el fondo oscuro/neon */
    filter: contrast(1.05) saturate(1.1);
    border-radius: 4px;
    /* Un toque menos rígido */
}

/* Animación Clave Entrada (Wrapper) */
@keyframes zoomInCollage {
    0% {
        opacity: 0;
        transform: scale(0.2) translateZ(-800px) translateY(50px) rotate(var(--rot-start, -20deg));
    }

    100% {
        opacity: 1;
        transform: scale(1) translateZ(0) translateY(0) rotate(var(--rot-final, 0deg));
    }
}

/* Animación Flotante Sutil Infinita (Interior) */
@keyframes floatSubtle {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(var(--float-x, 0px), var(--float-y, -12px)) rotate(var(--float-r, 1.5deg));
    }
}

/* Interacción Hover */
.collage-wrapper:hover {
    z-index: 9999 !important;
}

.collage-wrapper:hover .collage-photo {
    transform: scale(1.15) rotate(0deg) !important;
    box-shadow: 0 20px 50px rgba(0, 240, 255, 0.3), 0 0 20px rgba(255, 0, 127, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Clear Wall Button Style */
.clear-wall-btn {
    background: transparent;
    color: #ff3333;
    border: 1px solid #ff3333;
    padding: 0.5rem 1rem;
    font-size: 14px;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.5);
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.2);
    position: relative;
    z-index: 10;
    /* Changed from 10000 to keep it inside header's context */
    pointer-events: auto;
}

.clear-wall-btn:hover {
    background: rgba(255, 51, 51, 0.15);
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.5);
    color: #fff;
    border-color: #ff4d4d;
}

.clear-wall-btn:active {
    transform: scale(0.95);
}

/* Custom Modal Styles */
.custom-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    /* Above everything else */
    justify-content: center;
    align-items: center;
}

.custom-modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1A1636 0%, #0A0815 100%);
    border: 1px solid rgba(255, 51, 51, 0.3);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 90%;
    width: 450px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(255, 51, 51, 0.1);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    transform: translateY(20px);
    opacity: 0;
    animation: modalIn 0.3s forwards ease-out;
}

@keyframes modalIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #ff3333;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-content p {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.modal-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.modal-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-btn.confirm:hover {
    background: #ff4d4d;
    box-shadow: 0 0 25px rgba(255, 51, 51, 0.6);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .live-wall-body .header {
        position: relative;
        padding: 1rem;
        align-items: center;
        text-align: center;
    }

    .live-wall-body .header-right {
        opacity: 1;
        /* Always visible on mobile to avoid hover issues */
        flex-direction: column;
        /* Stack buttons vertically to avoid overlap */
        width: 100%;
        gap: 0.8rem;
        justify-content: center;
    }

    .clear-wall-btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .modal-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-btn {
        width: 100%;
        padding: 1rem;
    }

    .wall-watermark {
        font-size: 15vw;
        z-index: 0;
    }

    .collage-photo {
        width: 200px;
        /* Resize images slightly for mobile view performance/spacing */
    }
}