/* Configuración Base Cósmica */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Quita el cuadro azul feo al tocar en celulares */
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #1a0018 0%, #030008 100%);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Contenedor del Espacio */
.espacio-galaxia {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* El Brillo Central en Forma de Corazón (Efecto Nebulosa) */
.corazon-galactico {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 260px;
    background-color: #ff1a75;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-radius: 50% 50% 0 0;
    filter: blur(65px);
    opacity: 0.4;
    animation: pulsarGalaxia 4s infinite ease-in-out alternate;
}

.corazon-galactico::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    background-color: #ff1a75;
    top: 0;
    left: 130px;
    border-radius: 50%;
}

@keyframes pulsarGalaxia {
    0% { transform: translate(-50%, -50%) rotate(-45deg) scale(0.9); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) rotate(-45deg) scale(1.1); opacity: 0.55; }
}

/* Polvo Estelar */
.polvo-estelar {
    position: absolute;
    top: var(--top);
    left: var(--left);
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 15px #ff4d8d, 0 0 30px #ff1a75;
    animation: flotarEstrellas 3s infinite ease-in-out alternate;
    animation-delay: var(--delay);
}

@keyframes flotarEstrellas {
    0% { transform: translateY(0px) scale(0.5); opacity: 0.2; }
    100% { transform: translateY(-20px) scale(1.3); opacity: 1; }
}

/* Fotos Flotantes Base */
.foto-flotante {
    position: absolute;
    top: var(--top);
    left: var(--left);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: rotate(var(--rotacion));
    animation: flotarCuadros 5s infinite ease-in-out alternate;
    animation-delay: var(--delay);
    z-index: 5;
}

/* Cuadro que sostiene la foto y EFECTO INTERACTIVO */
.cuadro-foto {
    width: 75px;
    height: 75px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ff4d8d;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(255, 77, 141, 0.4);
    -webkit-backdrop-filter:blur(4px);
    backdrop-filter:blur(4px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
}

/* Interacción: Cuando ella toca la foto en el celular */
.foto-flotante:hover .cuadro-foto,
.foto-flotante:active .cuadro-foto {
    transform: scale(1.8);
    box-shadow: 0 0 30px #ff1a75, 0 0 60px #fff;
    border-color: #fff;
    z-index: 20;
}

/* Ajuste de la imagen real para que quepa en el cuadro */
.cuadro-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.foto-flotante span {
    margin-top: 6px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 8px #ff1a75;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

/* Ocultar el texto momentáneamente cuando se agranda la foto para que no estorbe */
.foto-flotante:hover span,
.foto-flotante:active span {
    opacity: 0.2;
}

@keyframes flotarCuadros {
    0% { transform: translateY(0px) rotate(var(--rotacion)) scale(0.95); }
    100% { transform: translateY(-15px) rotate(calc(var(--rotacion) + 5deg)) scale(1.05); }
}

/* Letrero de Amor Central */
.letrero-amor {
    position: relative;
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

.letrero-amor h1 {
    color: #fff;
    font-size: 2.2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #ff1a75, 0 0 20px #ff1a75, 0 0 40px #ff0000;
    margin-bottom: 5px;
    animation: latirTexto 1.5s infinite alternate ease-in-out;
}

.letrero-amor p {
    color: #ffb3d1;
    font-size: 0.95rem;
    font-style: italic;
    text-shadow: 0 0 5px rgba(255, 26, 117, 0.8);
}

@keyframes latirTexto {
    from { transform: scale(1); }
    to { transform: scale(1.04); }
}