/* Reset y configuración global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', serif;
    overflow-x: hidden;
    background: #0a0a0a;
    color: #ffffff;
}

/* Utilidades */
.full-screen {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

.hidden {
    display: none;
}

.content-section {
    min-height: 100vh;
    padding: 80px 20px;
    position: relative;
}

/* =================
   FASE 1: BIENVENIDA Y MISTERIO
   ================= */

#mystery-section {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #16213e 50%, #0f0f0f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 3s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.2); }
}

.main-star {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    margin-bottom: 40px;
    transition: transform 0.3s ease;
}

.main-star:hover {
    transform: scale(1.1);
}

.main-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffd700 0%, #ffed4e 50%, #ffffff 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px #ffd700, 0 0 60px #ffd700;
    animation: mainStarPulse 2s infinite ease-in-out;
}

@keyframes mainStarPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
}

.star-shine {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    animation: shimmer 3s infinite;
}

.star-shine::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.welcome-message {
    text-align: center;
    z-index: 5;
    animation: fadeInMessage 3s ease-in-out;
}

.welcome-message p {
    font-size: 1.5rem;
    color: #e6e6e6;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.catch-phrase {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

@keyframes fadeInMessage {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* =================
   FASE 2: GRAN REVELACIÓN
   ================= */

#revelation-section {
    background: radial-gradient(ellipse at center, #2d1b69 0%, #11052c 50%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.nebula-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: nebulaFloat 20s infinite ease-in-out;
}

.nebula-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #ff69b4, transparent);
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.nebula-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ffd700, transparent);
    bottom: 20%;
    right: 15%;
    animation-delay: 10s;
}

@keyframes nebulaFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.1); }
    50% { transform: translate(-15px, 20px) scale(0.9); }
    75% { transform: translate(30px, 10px) scale(1.05); }
}

.shooting-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px #ffffff;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, #ffffff, transparent);
    transform-origin: left;
}

.shooting-star-1 {
    top: 20%;
    left: -100px;
    animation: shootingStar1 4s infinite ease-out;
    animation-delay: 2s;
}

.shooting-star-2 {
    top: 70%;
    left: -100px;
    animation: shootingStar2 5s infinite ease-out;
    animation-delay: 6s;
}

@keyframes shootingStar1 {
    0% { transform: translateX(0) translateY(0); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(calc(100vw + 100px)) translateY(-200px); opacity: 0; }
}

@keyframes shootingStar2 {
    0% { transform: translateX(0) translateY(0); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(calc(100vw + 100px)) translateY(-150px); opacity: 0; }
}

.love-message {
    text-align: center;
    z-index: 10;
    opacity: 0;
    transform: scale(0.5);
    animation: revealLove 3s ease-out forwards;
    animation-delay: 1s;
}

.love-message h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.5),
        0 0 60px rgba(255, 215, 0, 0.3);
    letter-spacing: 3px;
}

@keyframes revealLove {
    0% { 
        opacity: 0; 
        transform: scale(0.5) translateY(50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) translateY(0);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    animation: showIndicator 1s ease-out forwards;
    animation-delay: 4s;
}

.chevron {
    width: 20px;
    height: 20px;
    border-right: 2px solid #ffd700;
    border-bottom: 2px solid #ffd700;
    transform: rotate(45deg);
    margin: -10px 0;
    animation: bounce 2s infinite;
}

.chevron:nth-child(2) {
    animation-delay: 0.2s;
}

.chevron:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes showIndicator {
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* =================
   FASE 3: RECUERDOS
   ================= */

#memories-section {
    background: linear-gradient(180deg, #2d1b69 0%, #1a1a2e 50%, #0f0f0f 100%);
    position: relative;
}

.constellation-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
        radial-gradient(2px 2px at 40px 70px, #ffffff, transparent),
        radial-gradient(1px 1px at 90px 40px, #ffffff, transparent),
        radial-gradient(1px 1px at 130px 80px, #ffffff, transparent),
        radial-gradient(2px 2px at 160px 30px, #ffffff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    opacity: 0.3;
    animation: starField 100s linear infinite;
}

@keyframes starField {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    color: #ffd700;
    margin-bottom: 60px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Galería de Fotos */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto 120px;
    position: relative;
    z-index: 5;
}

.photo-constellation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 80px;
}

.polaroid {
    background: #ffffff;
    padding: 20px 20px 60px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 215, 0, 0.1);
    transform: rotate(0deg);
    transition: all 0.3s ease;
    max-width: 280px;
    opacity: 0;
    transform: translateY(50px) rotate(-5deg);
}

.polaroid:nth-child(even) {
    transform: translateY(50px) rotate(5deg);
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.photo-placeholder {
    width: 240px;
    height: 180px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.photo-caption {
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
    color: #333;
    text-align: center;
    font-weight: 600;
}

/* Posicionamiento especial para crear constelación */
.photo-1 { transform: translateY(50px) rotate(-8deg); }
.photo-2 { transform: translateY(50px) rotate(5deg); }
.photo-3 { transform: translateY(50px) rotate(-3deg); }
.photo-4 { transform: translateY(50px) rotate(7deg); }
.photo-5 { transform: translateY(50px) rotate(-6deg); }

/* Carta Personal */
.letter-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    padding: 60px;
    position: relative;
    z-index: 5;
}

.letter-content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #e6e6e6;
    text-align: justify;
}

.letter-content p {
    margin-bottom: 25px;
}

.letter-content p:first-child {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    color: #ffd700;
    text-align: left;
    margin-bottom: 30px;
}

.letter-signature {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    color: #ffd700;
    text-align: right;
    margin-top: 40px;
    font-weight: 600;
}

/* =================
   ANIMACIONES AOS (Animate On Scroll)
   ================= */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* =================
   RESPONSIVE DESIGN
   ================= */

@media (max-width: 768px) {
    .welcome-message p {
        font-size: 1.2rem;
    }
    
    .catch-phrase {
        font-size: 1.6rem;
    }
    
    .love-message h1 {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .photo-constellation {
        gap: 30px;
    }
    
    .polaroid {
        max-width: 240px;
    }
    
    .photo-placeholder {
        width: 200px;
        height: 150px;
    }
    
    .letter-container {
        padding: 40px 30px;
        margin: 0 20px;
    }
    
    .letter-content {
        font-size: 1.1rem;
    }
    
    .nebula-1, .nebula-2 {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .main-star {
        width: 30px;
        height: 30px;
    }
    
    .main-star::before {
        width: 16px;
        height: 16px;
    }
    
    .star-shine,
    .star-shine::after {
        width: 40px;
    }
    
    .welcome-message p {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .catch-phrase {
        font-size: 1.4rem;
    }
    
    .love-message h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .photo-constellation {
        flex-direction: column;
        align-items: center;
    }
    
    .letter-container {
        padding: 30px 20px;
    }
    
    .content-section {
        padding: 60px 10px;
    }
}

/* =================
   EFECTOS ESPECIALES
   ================= */

/* Efecto de destello al hacer clic en la estrella principal */
.flash-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    animation: flashAnimation 1s ease-out;
}

@keyframes flashAnimation {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0; }
}

/* Efecto de partículas doradas */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 3s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}