:root {
    --bg-color: #0b132b; /* Azul marino profundo */
    --accent-purple: #7b2cbf;
    --accent-pink: #ff70a6;
    --text-primary: #ffffff;
    --text-secondary: #e0e1dd;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    position: relative;
    background: radial-gradient(circle at top right, #1c0f42, var(--bg-color), #110926);
    min-height: 100vh;
}

/* Efecto de Globos y Cumpleaños de fondo */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    font-size: 2rem; /* Tamaño base para emojis */
    opacity: 0.6;
    animation: floatUp infinite linear;
    user-select: none;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-110vh) rotate(360deg) scale(1.2); opacity: 0; }
}

/* Galerías Laterales Estáticas */
.side-gallery {
    position: fixed;
    top: 5vh;
    height: 90vh;
    width: 12vw;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    z-index: 15;
    pointer-events: none;
}

.left-gallery {
    left: 2vw;
}

.right-gallery {
    right: 2vw;
}

.side-photo {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1 / 1;
    border: 2px solid #e5c07b;
    object-fit: cover;
    object-position: center 20%; /* Centra verticalmente más arriba para que los rostros queden en el encuadre */
    opacity: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 10px rgba(229, 192, 123, 0.2);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s ease, 
                border-radius 0.6s ease, 
                border-color 0.4s ease, 
                filter 0.4s ease;
    filter: grayscale(15%) contrast(102%);
    will-change: transform, opacity;
}

/* Formas Orgánicas y Elegantes */
.shape-leaf-1 {
    border-radius: 70% 0% 70% 0% / 70% 0% 70% 0%;
}
.shape-leaf-2 {
    border-radius: 0% 70% 0% 70% / 0% 70% 0% 70%;
}
.shape-arch {
    border-radius: 50% 50% 12px 12px / 45% 45% 12px 12px;
}
.shape-blob-1 {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}
.shape-blob-2 {
    border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
}
.shape-oval {
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
.shape-squircle {
    border-radius: 35%;
}

.side-photo:hover {
    transform: translate(calc(var(--offset-x, 0px) * 1.3), calc(var(--offset-y, 0px) * 1.3)) scale(1.35) rotate(0deg) !important;
    box-shadow: 0 15px 35px rgba(229, 192, 123, 0.8), 0 0 25px var(--accent-pink);
    border-color: var(--accent-pink);
    filter: grayscale(0%) contrast(110%);
    border-radius: 20px !important;
    z-index: 50;
}

@keyframes slide-in-left {
    from { 
        opacity: 0; 
        transform: translate(calc(-80px + var(--offset-x, 0px)), calc(0px + var(--offset-y, 0px))) rotate(calc(-20deg + var(--rotation, 0deg))) scale(0.6); 
    }
    to { 
        opacity: 1; 
        transform: translate(var(--offset-x, 0px), var(--offset-y, 0px)) rotate(var(--rotation, 0deg)) scale(1); 
    }
}

@keyframes slide-in-right {
    from { 
        opacity: 0; 
        transform: translate(calc(80px + var(--offset-x, 0px)), calc(0px + var(--offset-y, 0px))) rotate(calc(20deg + var(--rotation, 0deg))) scale(0.6); 
    }
    to { 
        opacity: 1; 
        transform: translate(var(--offset-x, 0px), var(--offset-y, 0px)) rotate(var(--rotation, 0deg)) scale(1); 
    }
}

@keyframes slide-in-top {
    from { 
        opacity: 0; 
        transform: translate(var(--offset-x, 0px), calc(-80px + var(--offset-y, 0px))) rotate(calc(-10deg + var(--rotation, 0deg))) scale(0.6); 
    }
    to { 
        opacity: 1; 
        transform: translate(var(--offset-x, 0px), var(--offset-y, 0px)) rotate(var(--rotation, 0deg)) scale(1); 
    }
}

@keyframes slide-in-bottom {
    from { 
        opacity: 0; 
        transform: translate(var(--offset-x, 0px), calc(80px + var(--offset-y, 0px))) rotate(calc(10deg + var(--rotation, 0deg))) scale(0.6); 
    }
    to { 
        opacity: 1; 
        transform: translate(var(--offset-x, 0px), var(--offset-y, 0px)) rotate(var(--rotation, 0deg)) scale(1); 
    }
}



/* Control de música flotante arriba a la derecha */
.music-control {
    position: fixed;
    top: 25px;
    right: 25px;
    background: rgba(20, 10, 40, 0.65);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.05);
}

.music-control:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-purple);
}

.music-control.playing .icon {
    animation: pulse 1.2s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); color: var(--accent-pink); }
    to { transform: scale(1.2); color: var(--accent-purple); }
}

/* Central Message Panel Animation */
#delayed-content {
    opacity: 0;
    transform: translateY(35px);
    filter: blur(8px);
    transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 2s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 2s cubic-bezier(0.16, 1, 0.3, 1);
}

#delayed-content.show {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

.glass-panel {
    background: rgba(20, 10, 40, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 750px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    animation: fadeInDown 1.5s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    background: linear-gradient(to right, #ff9a9e, #fecfef, #ff70a6, var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        filter: drop-shadow(0 0 5px rgba(255, 112, 166, 0.4));
    }
    to {
        filter: drop-shadow(0 0 20px rgba(255, 112, 166, 0.9)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
    }
}

.date {
    font-size: 1.1rem;
    color: var(--accent-pink);
    letter-spacing: 3px;
    margin-bottom: 35px;
    text-transform: uppercase;
}

.message {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: justify;
    text-align-last: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message .highlight {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--accent-pink);
    margin-top: 20px;
    font-style: italic;
    text-align: center;
}

.message .signature {
    font-weight: 600;
    font-size: 1.3rem;
    color: #fff;
    margin-top: 10px;
}

/* Corazón Interactivo Final */
.finale-trigger-container {
    margin-top: 50px;
    cursor: pointer;
    display: inline-block;
    position: relative;
    padding: 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.finale-trigger-container:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

.heart-pulse {
    font-size: 4rem;
    animation: heartbeat 1.5s infinite;
    text-shadow: 0 0 20px rgba(255, 112, 166, 0.6);
}

.balloons-around {
    font-size: 1.5rem;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    letter-spacing: 15px;
}

.click-me {
    margin-top: 15px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--accent-pink);
    font-weight: bold;
    letter-spacing: 2px;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.2); }
    30% { transform: scale(1); }
    45% { transform: scale(1.2); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* Overlay Final - Feliz Cumpleaños Amor Mio */
.finale-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 19, 43, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
    backdrop-filter: blur(10px);
}

.finale-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.giant-message-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
    z-index: 1005;
}

.giant-message {
    font-family: 'Cormorant Garamond', serif;
    font-size: 6rem;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    background: linear-gradient(45deg, #ff9a9e, #ff70a6, #7b2cbf, #ff9a9e);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite, explodeText 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0);
    text-shadow: 0 0 50px rgba(255, 112, 166, 0.5);
}

.giant-submessage {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    color: #ffffff;
    opacity: 0;
    margin-top: 10px;
    background: linear-gradient(to right, #ff9a9e, #fecfef, #ff70a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: explodeText 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s forwards;
    transform: scale(0);
    text-shadow: 0 0 30px rgba(255, 112, 166, 0.8);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes explodeText {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.explosion-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 19, 43, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.lightbox.show {
    opacity: 1;
    pointer-events: all;
}

.lightbox-img {
    max-width: 85%;
    max-height: 80vh;
    border-radius: 20px;
    border: 3px solid #e5c07b;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(229, 192, 123, 0.4);
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.show .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 3.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 2010;
}

.lightbox-close:hover {
    color: var(--accent-pink);
    transform: scale(1.2) rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-y: auto;
        padding-bottom: 50px;
    }
    .hero {
        order: 1;
        width: 100%;
        min-height: auto;
        padding: 90px 15px 30px 15px; /* Margen superior para el botón de música */
    }
    .glass-panel {
        padding: 25px 15px;
        margin: 0 auto;
        width: 100%;
    }
    .title { font-size: 2.2rem; }
    .message { font-size: 0.95rem; line-height: 1.6; gap: 12px; }
    .message .highlight { font-size: 1.6rem; margin-top: 15px; }
    .message .signature { font-size: 1.1rem; }
    .finale-trigger-container { margin-top: 30px; padding: 15px; }
    .heart-pulse { font-size: 3rem; }
    
    /* Reordenar las galerías abajo del hero */
    .left-gallery {
        order: 2;
        margin-top: 30px;
    }
    .right-gallery {
        order: 3;
        margin-top: 15px;
    }
    .side-gallery {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        height: auto;
        width: 92%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        z-index: 15;
        padding: 10px 0;
    }
    .side-photo {
        width: 22vw;
        max-width: 85px;
        aspect-ratio: 1 / 1;
    }
    
    .music-control {
        top: 15px;
        right: 15px;
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .giant-message { font-size: 2.8rem; }
    .giant-submessage { font-size: 1.4rem; }
    .lightbox-close { top: 20px; right: 20px; font-size: 2.5rem; }
}
