/* ===========================
   GLOBAL SETTINGS
=========================== */

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

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4, #fad0c4, #fbc2eb);
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
    user-select: none;
}

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


/* ===========================
   PAGE SECTIONS
=========================== */

.page {
    display: none;
    position: relative;
    z-index: 15;
    width: 100%;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.page.active {
    display: flex;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(.9); }
    to   { opacity: 1; transform: scale(1); }
}


/* ===========================
   GLASS CARD
=========================== */

.glass {
    width: min(90%, 700px);
    padding: 40px;
    text-align: center;
    background: rgba(255, 255, 255, .25);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, .4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .15);
}

.title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(35px, 6vw, 40px);
    color: #fff;
    text-shadow: 0 5px 20px rgba(255, 0, 100, .5);
}

.subtitle {
    color: white;
    margin: 20px 0;
    font-size: 18px;
}

.question {
    color: white;
    margin: 30px 0;
}


/* ===========================
   BUTTONS
=========================== */

.buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
}

button {
    border: none;
    cursor: pointer;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    transition: .3s ease;
}

.yes {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: white;
    box-shadow: 0 10px 30px rgba(255, 0, 80, .4);
}

.no {
    background: white;
    color: #ff416c;
}

button:hover {
    transform: translateY(-5px) scale(1.05);
}

.next {
    margin-top: 30px;
    background: linear-gradient(45deg, #8e2de2, #4a00e0);
    color: white;
}


/* ===========================
   FLOATING HEARTS
=========================== */

#hearts {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.heart {
    position: absolute;
    color: #ff3366;
    font-size: 25px;
    animation: floatHeart 8s linear infinite;
}

@keyframes floatHeart {
    from { transform: translateY(100vh) rotate(0deg); opacity: 1; }
    to   { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}


/* ===========================
   SPARKLES
=========================== */

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%   { transform: scale(0); opacity: 0; }
    50%  { transform: scale(2); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}


/* ===========================
   BALLOON SECTION
=========================== */

.balloon-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.balloon {
    width: 90px;
    height: 110px;
    border-radius: 50% 50% 45% 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 55px;
    cursor: pointer;
    animation: balloonFloat 3s ease-in-out infinite;
    transition: .5s ease;
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, .2));
}

.balloon:hover {
    transform: scale(1.15);
}

.red    { animation-delay: .2s; }
.blue   { animation-delay: .6s; }
.yellow { animation-delay: 1s; }
.green  { animation-delay: 1.4s; }

@keyframes balloonFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-25px); }
}

.balloon.pop {
    animation: popBalloon .5s forwards;
}

@keyframes popBalloon {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.5); }
    100% { transform: scale(0); opacity: 0; }
}

#specialMessage {
    display: none;
    margin-top: 30px;
    font-size: 35px;
    color: #fff;
    font-family: 'Pacifico', cursive;
    animation: messageGlow 1.5s infinite alternate;
}

#nextCake {
    display: none;
}

#wishDone {
    display: none;
}

#showLetter {
    display: none;
}

#celebrate {
    display: none;
}

@keyframes messageGlow {
    from { text-shadow: 0 0 10px #fff; }
    to   { text-shadow: 0 0 35px #ff4b91; }
}


/* ===========================
   CAKE & CANDLE
=========================== */

.cake {
    width: 220px;
    height: 120px;
    background: linear-gradient(#ffb6c1, #ff69b4);
    margin: 150px auto 30px;
    border-radius: 20px 20px 10px 10px;
    position: relative;
    box-shadow: inset 0 -20px 0 rgba(255, 255, 255, .2);
}

.cake:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 25px;
    top: -10px;
    left: 0px;
    background: white;
    border-radius: 20px 20px 0 0;
}

.candle {
    position: absolute;
    width: 18px;
    height: 80px;
    background: repeating-linear-gradient(45deg, #fff, #fff 8px, #ff4b91 8px, #ff4b91 16px);
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
}

.flame {
    position: absolute;
    width: 25px;
    height: 35px;
    background: radial-gradient(circle, #fff, #ffd700, #ff4500);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    top: -35px;
    left: -4px;
    animation: flameMove .5s infinite alternate;
}

.flame.off {
    display: none;
}

@keyframes flameMove {
    from { transform: rotate(-45deg) scale(1); }
    to   { transform: rotate(-35deg) scale(1.2); }
}


/* ===========================
   ROSE BOUQUET
=========================== */

.bouquet {
    font-size: 55px;
    line-height: 1.4;
    margin: 40px 0;
    animation: bloom 3s ease infinite;
}

@keyframes bloom {
    0%   { transform: scale(.8); }
    50%  { transform: scale(1.1); }
    100% { transform: scale(.8); }
}


/* ===========================
   LETTER SECTION
=========================== */

.letter {
    min-height: 450px;
}

#typing {
    margin-top: 30px;
    color: white;
    font-size: 20px;
    line-height: 1.8;
    text-align: left;
    min-height: 180px;
    white-space: pre-wrap;
}

.quote {
    margin-top: 30px;
    font-style: italic;
    font-size: 22px;
    color: #ffe4ec;
}


/* ===========================
   FINAL CELEBRATION SCREEN
=========================== */

.big {
    font-family: 'Pacifico', cursive;
    font-size: clamp(20px, 5vw, 30px);
    color: white;
    animation: celebrationGlow 1.5s infinite alternate;
}

@keyframes celebrationGlow {
    from { text-shadow: 0 0 10px #fff, 0 0 20px #ff69b4; }
    to   { text-shadow: 0 0 30px #fff, 0 0 60px #ff1493, 0 0 80px #8a2be2; }
}

#final h2 {
    margin-top: 30px;
    color: white;
}

#final p {
    margin-top: 25px;
    color: white;
    font-size: 20px;
    line-height: 1.7;
}

#final h3 {
    margin-top: 35px;
    color: #fff;
    font-size: 28px;
}


/* ===========================
   CONFETTI CANVAS
=========================== */

#confettiCanvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}


/* ===========================
   FIREWORKS CANVAS
=========================== */

#fireworksCanvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9;
}


/* ===========================
   EXTRA GLOW EFFECTS
=========================== */

.glow {
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0%   { box-shadow: 0 0 10px #fff; }
    50%  { box-shadow: 0 0 40px #ff69b4; }
    100% { box-shadow: 0 0 10px #fff; }
}


/* ===========================
   FLOATING EMOJIS
=========================== */

.floating {
    position: absolute;
    animation: floatEmoji 6s linear infinite;
}

@keyframes floatEmoji {
    from { transform: translateY(100vh) rotate(0deg); }
    to   { transform: translateY(-20vh) rotate(360deg); }
}


/* ===========================
   MOBILE RESPONSIVE DESIGN
=========================== */

@media (max-width: 600px) {

    .glass {
        padding: 25px;
        border-radius: 20px;
    }

    .buttons {
        flex-direction: column;
        gap: 15px;
    }

    button {
        width: 100%;
        font-size: 16px;
    }

    .balloon {
        width: 70px;
        height: 90px;
        font-size: 45px;
    }

    .cake {
        width: 180px;
        height: 100px;
    }

    #typing {
        font-size: 16px;
    }

    .bouquet {
        font-size: 40px;
    }

}


/* ===========================
   SMOOTH SCROLL & SELECTION
=========================== */

::selection {
    background: #ff69b4;
    color: white;
}
