/* ===================================================
   MODELO INVITACIÓN: PRINCESAS DE ENSUEÑO
   =================================================== */

/* 1. VARIABLES Y RESET */
:root {
    /* PALETA PRINCESAS */
    --color-primary: #ff69b4;       /* Rosa Princesa */
    --color-secondary: #dda0dd;     /* Plum / Lila Suave */
    --color-accent: #ffd700;        /* Dorado Real */
    --color-bg-light: #fff0f5;      /* LavenderBlush */
    --color-white: #ffffff;
    --color-text: #6a0dad;          /* Púrpura Real Oscuro */
    
    /* FUENTES */
    --font-body: 'Poppins', sans-serif;
    --font-title: 'Great Vibes', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-bg-light);
    /* Degradado mágico pastel */
    background-image: linear-gradient(135deg, #fff0f5 0%, #e6e6fa 50%, #fff0f5 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 150px; /* Espacio para el castillo final */
}

/* 2. TIPOGRAFÍA */
.font-cursive { font-family: var(--font-title); font-weight: 400; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }

/* 3. ESTRUCTURA */
.container {
    max-width: 650px; 
    margin: 0 auto;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.9); /* Cristalino */
    min-height: 100vh;
    box-shadow: 0 0 35px rgba(255, 105, 180, 0.2); /* Resplandor rosa */
    border-left: 2px solid white;
    border-right: 2px solid white;
    position: relative;
    z-index: 10;
    margin-bottom: -100px; /* Fusión con footer */
    border-radius: 30px;
}

.section {
    padding: 50px 0;
    position: relative;
}

.section-title {
    font-size: 2.8em;
    color: var(--color-primary);
    margin-bottom: 15px;
    font-family: var(--font-title);
    text-shadow: 2px 2px 0px rgba(255, 215, 0, 0.3); /* Sombra dorada */
}

/* Decorador de título (Corona) */
.section-title::before {
    content: '👑';
    display: block;
    font-size: 0.6em;
    margin-bottom: 5px;
    animation: floatCrown 3s ease-in-out infinite;
}

@keyframes floatCrown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 4. DECORACIONES FLOTANTES Y FIJAS */

/* Corona Superior (Fija o absoluta en top) */
.crown-top-decoration {
    display: block;
    margin: 20px auto 10px;
    width: 80px; /* Ajustar tamaño */
    z-index: 20;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

/* Contenedor de Estrellas Flotantes (GIFs) */
.floating-stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50; 
    overflow: hidden;
}

.floating-star {
    position: absolute;
    width: 30px; 
    opacity: 0.8;
    animation: twinkleFloat 5s ease-in-out infinite alternate;
}

@keyframes twinkleFloat {
    0% { transform: scale(0.8) rotate(0deg); opacity: 0.5; }
    100% { transform: scale(1.2) rotate(45deg); opacity: 1; }
}

/* Decoración Estratégica (Princesas Contorno) */
.princess-decoration {
    display: block;
    margin: 20px auto;
    max-width: 250px;
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 5px 15px rgba(255, 105, 180, 0.2));
}

/* Pie de Página (Castillo) */
.footer-castle-decoration {
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    margin-top: -120px; /* Superposición para integrar */
    pointer-events: none;
    text-align: center;
}
.footer-castle-decoration img { 
    width: 100%; 
    max-width: 800px; 
    display: block; 
    margin: 0 auto; 
    /* Efecto para que parezca salir de la niebla */
    -webkit-mask-image: linear-gradient(to top, black 80%, transparent 100%);
    mask-image: linear-gradient(to top, black 80%, transparent 100%);
}

/* 5. HERO / ENCABEZADO */
.hero {
    position: relative;
    height: auto;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-white);
    margin: 0 -20px;
    overflow: hidden;
    background-color: var(--color-secondary); 
    border-radius: 30px 30px 0 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-bottom: 5px solid var(--color-accent);
}

/* Overlay de texto mágico */
.hero-text-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 5;
    text-shadow: 0 0 15px rgba(106, 13, 173, 0.8);
}

.hero-text-overlay h1 {
    font-size: 4.5em;
    line-height: 1;
    color: #fff;
    font-family: var(--font-title);
    margin: 10px 0;
}

.hero-text-overlay h2 {
    font-size: 1.3em;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 5px;
    font-weight: 600;
}

/* 6. CUENTA REGRESIVA REAL */
.countdown-box {
    margin-top: -30px;
    background: white;
    padding: 15px;
    border-radius: 50px; /* Muy redondeado */
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.3);
    position: relative;
    z-index: 15;
    border: 2px solid var(--color-accent);
    width: 95%;
    margin-left: auto;
    margin-right: auto;
}

#timer {
    display: flex;
    justify-content: space-around;
    font-size: 1.3em;
    color: var(--color-primary);
    font-weight: 700;
}

#timer div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#timer span.label {
    font-size: 0.45em;
    text-transform: uppercase;
    color: #999;
    font-weight: 400;
    margin-top: -3px;
}

/* 7. CONTENIDO GENERAL */
.mensaje-bienvenida {
    font-style: italic;
    color: #555;
    margin: 25px 0;
    font-size: 1.1em;
    padding: 20px;
    background-color: #fffaf0; /* Fondo crema muy suave */
    border-radius: 15px;
    border: 1px solid var(--color-accent);
    position: relative;
}

/* Comillas decorativas */
.mensaje-bienvenida::before {
    content: '“';
    font-family: serif;
    font-size: 3em;
    color: var(--color-secondary);
    position: absolute;
    top: -20px;
    left: 10px;
}

.invitado-badge {
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 10px 30px;
    border-radius: 15px 50px 15px 50px; /* Forma fantasía */
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-size: 1em;
    border: 2px solid white;
}

.info-card {
    background: white;
    padding: 30px;
    border-radius: 25px;
    margin: 25px 10px;
    text-align: center;
    border: 2px solid #fff0f5;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: var(--color-accent);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 105, 180, 0.15);
}

.info-card i {
    font-size: 2.5em;
    color: var(--color-secondary);
    margin-bottom: 15px;
    display: block;
    text-shadow: 2px 2px 0px #eee;
}

/* 8. BOTONES ESTILO REALES */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 15px 0;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(to right, #ff69b4, #da70d6);
    color: white;
    box-shadow: 0 5px 20px rgba(218, 112, 214, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(218, 112, 214, 0.6);
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
}

/* 9. GALERÍA */
.collage-container {
    padding: 15px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border: 4px solid var(--color-bg-light);
    transform: rotate(1deg);
}
.collage-img {
    width: 100%;
    border-radius: 15px;
    display: block;
}

/* 10. MODALES */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(106, 13, 173, 0.9); /* Fondo púrpura oscuro */
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    padding: 40px 20px;
    border-radius: 25px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Rebote */
    border: 3px solid var(--color-accent);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--color-secondary);
}

/* 11. REPRODUCTOR */
.music-control {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, var(--color-accent), #f0e68c);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    cursor: pointer;
    z-index: 200;
    border: 3px solid white;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.9); }
    100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}