
/* =================================
   GLOBAL STYLING
================================= */

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

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #ffb6d5, #ff6fab, #ffc0cb);
    color: white;
}

.hidden {
    display: none !important;
}


/* =================================
   BIRTHDAY SCREEN
================================= */

.birthday-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.top-message {
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 22px;
}

.countdown {
    font-size: clamp(6rem, 20vw, 10rem);
    font-weight: bold;
    text-shadow: 0 0 25px #ff1684;
    animation: pop 1s ease-in-out;
}

h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-top: 15px;
    text-shadow: 2px 3px 10px #d63384;
}

#birthday-message {
    font-size: 1.1rem;
    margin-top: 18px;
    line-height: 1.7;
}

.heart-decoration {
    margin-top: 24px;
    font-size: 2rem;
    animation: heartbeat 1.2s infinite;
}


/* =================================
   BIRTHDAY CAKE
================================= */

.cake-area {
    margin: 35px 0 20px;
    animation: pop 0.8s ease-out;
}

.cake {
    width: 190px;
    margin: 0 auto;
    position: relative;
    padding-top: 55px;
}

.candle {
    width: 12px;
    height: 48px;
    background: repeating-linear-gradient(
        45deg,
        white, white 5px,
        #ff4081 5px, #ff4081 10px
    );
    position: absolute;
    top: 7px;
    left: calc(50% - 6px);
    border-radius: 4px 4px 0 0;
    z-index: 2;
}

.flame {
    width: 17px;
    height: 25px;
    background: radial-gradient(
        ellipse at bottom,
        #fff8a5 10%,
        #ff9800 60%,
        #ff5722 100%
    );
    border-radius: 50% 50% 45% 45%;
    position: absolute;
    top: -26px;
    left: -2px;
    transform: rotate(5deg);
    box-shadow: 0 0 20px #ffcc33;
    animation: flicker 0.3s infinite alternate;
    transform-origin: bottom center;
}

.flame.blown-out {
    animation: blowOut 0.5s forwards;
}

.cake-top {
    height: 28px;
    background: #fff0f5;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    border: 3px solid #ff83b5;
}

.cake-middle {
    height: 35px;
    margin-top: -12px;
    background: #ff4f91;
    border-radius: 0 0 12px 12px;
}

.cake-bottom {
    height: 35px;
    margin-top: -3px;
    background: #d63384;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 0 #a61d62;
}

#candle-message {
    margin-top: 24px;
    font-size: 1.1rem;
}

#celebration-message {
    margin-top: 25px;
    animation: pop 0.8s ease-out;
}

#celebration-message h2 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: #fff;
    text-shadow: 0 0 15px #ff006e, 2px 3px 8px #c2185b;
}

#celebration-message p {
    margin-top: 15px;
    font-size: 1.1rem;
    line-height: 1.6;
}

#continue-button {
    margin-top: 25px;
    border: 2px solid white;
    border-radius: 30px;
    padding: 14px 26px;
    background: #e91e63;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 20px #c2185b66;
    transition: transform 0.2s, background 0.2s;
}

#continue-button:hover {
    background: #c2185b;
    transform: scale(1.05);
}


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

.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    bottom: -50px;
    display: block;
    color: #ff1744;
    opacity: 0.9;
    animation: floatUp linear forwards;
}


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

.fireworks-container {
    z-index: 3;
}

.spark {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff6a5;
    box-shadow: 0 0 10px #fff, 0 0 20px #ff69b4;
    animation: burst 1.2s ease-out forwards;
}


/* =================================
   ANIMATIONS
================================= */

@keyframes floatUp {
    from {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }

    to {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes pop {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }

    70% {
        transform: scale(1.15);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

@keyframes flicker {
    from {
        transform: rotate(-5deg) scale(1);
    }

    to {
        transform: rotate(5deg) scale(1.08);
    }
}

@keyframes blowOut {
    to {
        opacity: 0;
        transform: translate(25px, -35px) scale(0.1);
    }
}

@keyframes burst {
    from {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    to {
        transform: translate(var(--dx), var(--dy)) scale(0.1);
        opacity: 0;
    }
}


/* =================================
   ROMANTIC LOVE LETTER PAGE
================================= */

.letter-page {
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    background: linear-gradient(
        135deg,
        #ffe4ec,
        #ffc1d6,
        #ffb3cc,
        #ffe6f0
    );
    color: #8b174b;
}


/* =================================
   LETTER HEADING
================================= */

.letter-header {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 70px 20px 40px;
}

.little-heading {
    font-size: 1rem;
    letter-spacing: 2px;
    color: #c2185b;
    margin-bottom: 15px;
}

.letter-header h1 {
    font-family: "Georgia", serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    color: #b01656;
    text-shadow: 0 3px 15px #ff80ab66;
}

.subtitle {
    margin-top: 20px;
    font-size: 1.1rem;
    color: #9c2757;
}


/* =================================
   LOVE LETTER PAPER
================================= */

.love-letter {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.letter-paper {
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.82);
    padding: clamp(20px, 5vw, 60px);
    border-radius: 20px;
    box-shadow: 0 10px 35px #c2185b22;
    border: 1px solid #ffb6d5;
    line-height: 2;
    font-family: "Georgia", serif;
    font-size: 1.08rem;
    overflow: hidden;
}

.letter-paper p {
    margin-bottom: 24px;
}

.letter-greeting {
    font-size: 1.5rem;
    font-weight: bold;
    color: #c2185b;
}

.letter-ending {
    font-weight: bold;
    color: #c2185b;
}

.signature {
    text-align: right;
    font-style: italic;
    color: #b01656;
}


/* =================================
   LOVE LETTER PHOTOS
================================= */

.letter-photo {
    width: 150%;
    max-width: 250px;
    margin: 20px auto;
    text-align: center;
    overflow: hidden;
}

.letter-photo img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: contain;
    border-radius: 100px;
    border: 5px solid white;
    box-shadow: 0 5px 15px #c2185b30;
    transform: rotate(-1deg);
    transition: transform 0.3s ease;
}

.letter-photo img:hover {
    transform: rotate(0deg) scale(1.02);
}

.letter-photo p {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #c2185b;
    font-style: italic;
}


/* =================================
   MEMORIES GALLERY
================================= */

.memories-section {
    position: relative;
    z-index: 2;
    padding: 60px 20px;
    text-align: center;
}

.memories-section h2 {
    font-family: "Georgia", serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: #b01656;
}

.memories-intro {
    margin: 15px 0 35px;
    font-size: 1.05rem;
}

.gallery {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(220px, 1fr)
    );
    gap: 25px;
}

.memory-card {
    min-width: 0;
    background: white;
    padding: 12px 12px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px #c2185b20;
    transition: transform 0.3s;
}

.memory-card:hover {
    transform: translateY(-8px) rotate(1deg);
}

.memory-card img {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
}

.memory-card p {
    margin-top: 15px;
    font-family: "Georgia", serif;
    color: #b01656;
    font-size: 1rem;
}


/* =================================
   FINAL ROMANTIC MESSAGE
================================= */

.letter-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 50px 20px 70px;
}

.letter-footer h2 {
    font-family: "Georgia", serif;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    color: #b01656;
}

.letter-footer p {
    max-width: 600px;
    margin: 20px auto;
    line-height: 1.8;
    font-size: 1.05rem;
}

.footer-hearts {
    margin-top: 25px;
    font-size: 2rem;
    animation: heartbeat 1.2s infinite;
}


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

@media (max-width: 600px) {

    .birthday-screen {
        padding: 18px;
    }

    .top-message {
        font-size: 0.95rem;
    }

    .letter-header {
        padding-top: 45px;
    }

    .love-letter {
        padding: 12px;
    }

    .letter-paper {
        padding: 20px 15px;
        font-size: 1rem;
    }

    .letter-photo {
        max-width: 250px;
        margin: 15px auto;
    }

    .letter-photo img {
        height: 140px;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .memory-card {
        padding: 8px 8px 15px;
    }

    .memory-card img {
        height: 180px;
    }

    .memory-card p {
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {

    .gallery {
        grid-template-columns: 1fr;
    }

}
.music-player {
    width: 90%;
    max-width: 500px;
    margin: 35px auto;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ffb6d5;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(200, 50, 100, 0.2);
}

.music-icon {
    font-size: 35px;
}

.music-details {
    flex: 1;
    text-align: left;
}

.music-details h3 {
    color: #e91e63;
    margin: 0 0 5px;
}

.music-details p {
    color: #a64d79;
    font-size: 14px;
    margin: 0;
}

#musicButton {
    background: #ff4081;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: bold;
}

#musicButton:hover {
    background: #e91e63;
}