html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', Arial, sans-serif;
}

body {
    min-height: 100vh;
    min-width: 100vw;
    background-image: url('img/las-hermosas-estrellas-brillantes-en-el-cielo-nocturno.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Ajuste para móviles */
@media (max-width: 600px) {
    body {
        background-attachment: scroll;
    }
    .luna {
        width: 90vw;
        height: 90vw;
        min-width: 120px;
        min-height: 120px;
        max-width: 98vw;
        max-height: 98vw;
    }
    .mensaje {
        font-size: 2.8rem;
        padding: 0 1rem;
        text-align: center;
    }
    .texto-carrusel {
       font-size: 2.8rem;
        
    }
    .luna-texto {
        font-size: 2.2rem;
        top: 8%;
    }
    .carrusel img {
        max-width: 95vw;
        max-height: 40vh;
    }
    .collage-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        width: 98vw;
        padding: 0.5rem;
    }
    .collage-grid img,
    .collage-grid video {
        height: 100px;
    }
}

/* Ajuste para tablets */
@media (min-width: 601px) and (max-width: 900px) {
    .mensaje {
        font-size: 2.2rem;
    }
    .texto-carrusel {
        font-size: 3rem;
    }
    .luna-texto {
        font-size: 2rem;
    }
    .carrusel img {
        max-width: 90vw;
        max-height: 50vh;
    }
    .collage-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        width: 95vw;
    }
    .collage-grid img,
    .collage-grid video {
        height: 140px;
    }
}

.luna {
    position: absolute;
    left: 50%;
    top: -20vw; /* Empieza fuera de la pantalla, relativo al ancho */
    transform: translate(-50%, 0);
    width: 20vw;
    height: 20vw;
    max-width: 200px;
    max-height: 200px;
    min-width: 80px;
    min-height: 80px;
    background: radial-gradient(circle at 30% 30%, #fffbe6 70%, #f5e9c6 100%);
    border-radius: 50%;
    box-shadow: 0 0 40px 10px #fffbe6;
    z-index: 10;
    animation: caer 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes caer {
    to {
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

.brillo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,200,0.5) 60%, transparent 100%);
    opacity: 0.7;
    animation: parpadeo 1.2s infinite alternate;
    pointer-events: none;
}

@keyframes parpadeo {
    0% { opacity: 0.7; }
    50% { opacity: 0.15; }
    100% { opacity: 0.7; }
}
/* Ajuste para pantallas pequeñas */
@media (max-width: 600px) {
    .luna {
        width: 90vw;
        height: 90vw;
        min-width: 120px;
        min-height: 120px;
        max-width: 98vw;
        max-height: 98vw;
    }
}



.mensaje {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 0);
    color: #fffbe6;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 1s;
    z-index: 20;
    pointer-events: none;
    text-shadow: 0 2px 8px #222;
}

.mensaje.visible {
    opacity: 1;
}

.luna.salida {
    animation: desvanecer 1s forwards;
}

@keyframes desvanecer {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

.corazon {
    display: inline-block;
    animation: latido 0.8s infinite;
    font-size: 2.5rem;
}

@keyframes latido {
    0%, 100% { transform: scale(1); }
    20% { transform: scale(1.2); }
    40% { transform: scale(0.95); }
    60% { transform: scale(1.15); }
    80% { transform: scale(1); }
}


.corazon-flotante {
    position: fixed;
    pointer-events: none;
    font-size: 2.5rem;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%) scale(1);
    animation: flotar-corazon 1.2s ease-out forwards;
    z-index: 9999;
    user-select: none;
}

@keyframes flotar-corazon {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -120px) scale(1.3) rotate(-10deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -180px) scale(0.8) rotate(10deg);
    }
}

.carrusel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
}
.carrusel img {
    max-width: 80vw;
    max-height: 60vh;
    border-radius: 20px;
    box-shadow: 0 4px 24px #0008;
    transition: opacity 0.5s;
}

.texto-carrusel {
    margin-top: 1rem;
    color: #fffbe6;
    font-size: 4rem;
    text-align: center;
    text-shadow: 0 2px 8px #222;
    width: 100%;
    display: block;
}



.collage {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20,20,30,0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.collage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    background: rgba(30,30,40,0.7);
    border-radius: 20px;
}

.collage-grid img,
.collage-grid video {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 12px #0008;
    background: #222;
}

.luna-texto {
    position: absolute;
    top: 12%;
    bottom: 15%;
    left: 50%;
    transform: translate(-50%, -100%);
    color: #fffbe6;
    font-size: 2rem;
    font-family: 'Montserrat', Arial, sans-serif;
    text-shadow: 0 2px 8px #222;
    z-index: 20;
    pointer-events: none;
}