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

:root {
    --color-pink: #14101d;
    --color-white: #fff;
    --color-black: #07050c;
    --color-text-pink: #FFC531;
    --color-heart: #FFC531;
    --color-bg-letter: #fff8e4;
    --color-border: #DACCBF;
}

body {
    position: relative;
    font-size: 16px;
    margin: 0;
    padding: 0;
    height: 100vh;
    background-image: linear-gradient(var(--color-pink), var(--color-pink));
}

#wrapper {
    position: relative;
    background-color: transparent;
    background-image: linear-gradient(0deg, transparent 24%, rgba(255, 220, 120, 0.05) 25%, rgba(255, 220, 120, 0.05) 26%, transparent 27%, transparent 74%, rgba(255, 220, 120, 0.05) 75%, rgba(255, 220, 120, 0.05) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(255, 220, 120, 0.05) 25%, rgba(255, 220, 120, 0.05) 26%, transparent 27%, transparent 74%, rgba(255, 220, 120, 0.05) 75%, rgba(255, 220, 120, 0.05) 76%, transparent 77%, transparent);
    height: 100vh;
    background-size: 80px 80px;
    overflow: hidden;
    z-index: 1;
}

.flag__birthday {
    display: flex;
    justify-content: space-between;
    transform: translateY(-200px);
    animation: translateYFlag 1.5s 2s forwards;
}

@keyframes translateYFlag {
    to {
        transform: translateY(-10px);
    }
}

.flag__birthday .flag__left {
    transform: rotate(-10deg) translate(-20px, 30px);
}

.flag__birthday .flag__right {
    transform: rotate(10deg) translate(20px, 30px) scaleX(-1);
}

.content {
    width: 100%;
    position: relative;
    display: flex;
    padding-top: 3rem;
}

.content .left,
.content .right {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.content .left {
    width: 40%;
}

.content .right {
    width: 60%;
}

.left .btn {
    transform: scale(0);
    animation: scaleCricle 2s 16s forwards ease-in-out;
}

#btn__letter {
    margin-top: 30px;
    background-color: var(--color-text-pink);
    outline: none;
    padding: 5px 15px;
    border-radius: 50px;
    border: 3px solid var(--color-black);
    font-family: "Sriracha", cursive;
    cursor: pointer;
    z-index: 2;
    transform: scale(1);
    transition: all .5s ease-in-out;
}

#btn__letter:active {
    transform: scale(0.7);
}

#btn__letter i {
    margin-left: 5px;
}

#btn__letter:hover {
    border-color: var(--color-heart);
    background-color: var(--color-heart);
    color: #fff;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

#btn__letter:hover svg {
    animation: rotateHeart 1s infinite linear;
}

@keyframes rotateHeart {

    0%,
    50%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(12deg);
    }

    75% {
        transform: rotate(-12deg);
    }
}

.title {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    font-family: "Titan One", sans-serif;
    font-size: 6rem;
    flex-direction: column;
    line-height: 120%;
    perspective: 1000px;
}

.title .happy,
.title .birthday {
    position: relative;
    text-shadow: 4px 4px var(--color-black),
        -4px 4px var(--color-black),
        4px -4px var(--color-black),
        -4px -4px var(--color-black),
        4px 8px 0 var(--color-black);
    font-weight: bold;
    display: flex;
    justify-content: center;
}

.title .happy {
    color: var(--color-white);
}

.title .happy span,
.title .birthday span {
    transform: translateY(50px);
    opacity: 0;
    visibility: hidden;
    animation: txtTranslateY .5s var(--t) forwards;
}

@keyframes txtTranslateY {
    100% {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

.title .birthday {
    color: var(--color-text-pink);
}

.title .hat {
    position: absolute;
    right: 45px;
    top: -350px;
    transform: rotate(-40deg);
    z-index: -1;
    animation: topHat 4s 7s forwards ease;
}

@keyframes topHat {

    20%,
    30% {
        top: -30px;
        transform-origin: left;
        transform: rotate(-40deg);
    }

    35%,
    100% {
        top: -30px;
        transform: rotate(0deg);
    }
}

.date__of__birth,
.name {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--color-text-pink);
    border-radius: 50px;
    margin-top: 20px;
    font-family: "Sriracha", cursive;

}

.date__of__birth {
    border: 3px solid var(--color-black);
    position: relative;
    transform: translateY(-100px);
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    width: 0px;
    animation: dateOfBirth 5s 9s forwards;
}

@keyframes dateOfBirth {

    20%,
    40% {
        width: 0px;
        height: 0;
        transform: translateY(0px);
        opacity: 1;
        visibility: visible;
    }

    45% {
        transform: translateY(0px);
        opacity: 1;
        visibility: visible;
        width: 300px;
        height: 0px;
    }

    50%,
    100% {
        transform: translateY(0px);
        opacity: 1;
        visibility: visible;
        width: 300px;
        height: 50px;
    }
}

.name {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 0px 20px;
    bottom: -20px;
    border: 3px solid var(--color-black);
    font-family: 'Dancing Script', cursive;
    white-space: nowrap;
}

.date__of__birth span,
.name span {
    font-weight: bold;
}

.date__of__birth span {
    font-size: 1.2rem;
    margin: 0px 40px;
}

.name span {
    font-size: 1.7rem;
    margin: 0px;
}

.right .box__account {
    position: relative;
    transform: translateY(700px);
    animation: topBoxImage 8s 7s forwards ease-in;
}

@keyframes topBoxImage {
    to {
        transform: translateY(0);
    }
}

.content .right .image {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    border: 6px solid var(--color-black);
}

.content .right .image img {
    width: 100%;
    object-fit: cover;

}

@keyframes scaleCricle {
    0% {
        transform: scale(0);
    }

    10% {
        transform: scale(1.3);
    }

    20% {
        transform: scale(0.7);
    }

    30%,
    100% {
        transform: scale(1);
    }

}

.fa-heart {
    color: var(--color-heart);
    filter: drop-shadow(0 0 3px var(--color-heart));
    animation: scaleHeart 1s infinite linear;
}

@keyframes scaleHeart {
    50% {
        transform: scale(1.2);
    }
}

.right .balloon_one {
    position: absolute;
    top: -70px;
    left: -70px;
    animation: balloon1 2s infinite linear;
}

@keyframes balloon1 {

    0%,
    50%,
    100% {
        transform-origin: bottom right;
        transform: rotate(0deg);
    }

    25% {
        transform-origin: bottom right;
        transform: rotate(3deg);
    }

    75% {
        transform-origin: bottom right;
        transform: rotate(-3deg);
    }
}

.right .balloon_two {
    position: absolute;
    top: 170px;
    right: -65px;
    z-index: -1;
    transform: rotate(10deg);
    animation: balloon2 2s infinite linear;
}

@keyframes balloon2 {

    0%,
    50%,
    100% {
        transform-origin: bottom left;
        transform: rotate(10deg);
    }

    25% {
        transform-origin: bottom left;
        transform: rotate(7deg);
    }

    75% {
        transform-origin: bottom left;
        transform: rotate(13deg);
    }
}

.decorate_star {
    position: absolute;
    transform: scale(0);
    background-color: var(--color-black);
    clip-path: polygon(0 50%, 35% 35%, 50% 0, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%);
    animation: scaleCricle 3s var(--t) forwards,
        scaleStar 2s 16s infinite ease-in-out;
}

.decorate_star.star1 {
    width: 20px;
    height: 20px;
    top: 75px;
    left: 300px;
}

.decorate_star.star2 {
    width: 15px;
    height: 20px;
    top: 35px;
    right: 360px;
}

.decorate_star.star3 {
    width: 14px;
    height: 14px;
    top: 290px;
    left: 630px;
}

.decorate_star.star4 {
    width: 18px;
    height: 18px;
    bottom: 60px;
    left: 35px;
}

.decorate_star.star5 {
    width: 16px;
    height: 18px;
    bottom: 140px;
    left: 500px;
}

@keyframes scaleStar {
    25% {
        transform: scale(0.8);
    }

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

.decorate_bottom {
    position: absolute;
    right: 0;
    bottom: -10px;
}

.decorate_flower--one {
    position: absolute;
    top: 250px;
    left: 50px;
    transform: scale(0);
    animation: scaleCricle 3s var(--t) forwards ease-in-out;
}

.decorate_flower--two {
    position: absolute;
    top: 225px;
    left: 540px;
    transform: scale(0);
    animation: scaleCricle 3s var(--t) forwards ease-in-out;
}

.decorate_flower--three {
    position: absolute;
    top: 150px;
    right: 235px;
    transform: scale(0);
    animation: scaleCricle 3s var(--t) forwards ease-in-out;
}

.smiley__icon {
    position: absolute;
    bottom: 180px;
    left: 600px;
    transform: scale(0);
    animation: scaleCricle 3s 15s forwards ease-in-out;
}


.box__letter {
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, .5);
    width: 100%;
    height: 100%;
    z-index: 10;
    display: none;
}

.box__letter .letter__border {
    position: absolute;
    width: 55vw;
    height: 450px;
    background-color: var(--color-white);
    border-radius: 27px;
    padding: 17px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.letter__border .close {
    position: absolute;
    right: -10px;
    top: -10px;
    width: 30px;
    height: 30px;
    background-color: var(--color-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    cursor: pointer;
}

.letter__border .letter {
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-letter);
    border-radius: 10px;
    padding-top: 15px;
}

.letter__border .letter .title__letter {
    text-align: center;
    font-family: 'Dancing Script', cursive;
    font-weight: bold;
    font-size: 2.4rem;
}

.letter__border .letter .content__letter {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    padding-top: 1.5rem;
    padding-bottom: 70px;
}

.letter__border .letter .content__letter .left {
    position: relative;
    width: 50%;
    height: 100%;
    padding: 1.7rem;
    border-right: 3px solid var(--color-border);
}

.content__letter .left #heart__letter {
    opacity: 0;
    width: 100%;
}

#heart__letter.animationOp {
    animation: opacityHeart 1s 1s forwards;
}

@keyframes opacityHeart {
    to {
        opacity: 1;
    }
}

.content__letter .left .heart {
    position: absolute;
    opacity: 0;
}

.content__letter .left .heart.animation {
    animation: scaleHeartLetter 1s var(--t) infinite ease-in-out;
}

@keyframes scaleHeartLetter {
    0% {
        opacity: 1;
        transform: scale(0);
    }

    10% {
        opacity: 1;
        transform: scale(1.3);
    }

    20% {
        opacity: 1;
        transform: scale(0.7);
    }

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

}

.content__letter .left .heart_1 {
    top: 90px;
    left: 30px;
}

.content__letter .left .heart_2 {
    top: 20px;
    right: 70px;
}

.content__letter .left .heart_3 {
    bottom: 50px;
    left: 145px;
}

.content__letter .left .heart_4 {
    top: 140px;
    right: 35px;
}

.content__letter .right {
    position: relative;
    width: 50%;
}

.content__letter .right .love__img {
    opacity: 0;
    position: absolute;
    right: 20px;
    top: -100px;
}

.love__img.animationOp {
    animation: opacityHeart 1s 1s forwards;
}

.content__letter .right .text__letter {
    margin-top: 60px;
    padding: 20px 15px 10px 15px;
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
}

.content__letter .right #mewmew {
    position: absolute;
    bottom: 0;
    right: 0;
    opacity: 0;
}

#mewmew.animationOp {
    animation: opacityHeart 1s 1s forwards;
}


#copy {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
}

#copy a {
    text-decoration: none;
    color: #191919d7;
}

#copy p {
    color: #4275ff;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
}



@media screen and (max-width: 658px) {

    .flag__birthday .flag__left {
        transform: rotate(-10deg) translate(-119px, 3px);
    }

    .flag__birthday .flag__right {
        transform: rotate(10deg) translate(-106px, 39px) scaleX(-1);
    }

    .content {
        width: 100%;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 25px;
        align-items: center;
        padding-top: 2rem;
    }

    .title {
        position: relative;
        width: 100%;
        display: flex;
        justify-content: center;
        font-family: "Titan One", sans-serif;
        font-size: 3rem;
        letter-spacing: 8px;
        flex-direction: column;
        perspective: 1000px;
    }

    .title .hat {
        position: absolute;
        right: -98px;
        top: -51px !important;
        transform: rotate(-40deg);
        z-index: -1;
        animation: topHat 4s 7s forwards ease;
    }

    .box__letter .letter__border {
        position: absolute;
        width: 90vw;
        height: 315px;
        background-color: var(--color-white);
        border-radius: 27px;
        padding: 17px;
        box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: none;
    }

    .letter__border .letter {
        width: 100%;
        height: 100%;
        background-color: var(--color-bg-letter);
        border-radius: 10px;
        padding-top: 15px;
    }

    .letter__border .letter .title__letter {
        text-align: center;
        font-family: 'Dancing Script', cursive;
        font-weight: bold;
        font-size: 1.4rem;
    }

    .letter__border .letter .content__letter {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        padding-top: .7rem;
        padding-bottom: 70px;
    }

    .content__letter .right .text__letter {
        margin-top: -14px;
        padding: 20px 15px 10px 15px;
        font-family: 'Dancing Script', cursive;
        font-size: .8rem;
    }

    .content__letter .right .love__img {
        opacity: 0;
        position: absolute;
        right: 126px;
        top: 167px;
    }

    .love__img img {

        width: 84px;

    }

    .content .right .image {
        position: relative;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        border: 6px solid var(--color-black);
    }

    .name {
        position: absolute;
        padding: 0px 3px;
        bottom: -6px;
        border: 3px solid var(--color-black);
    }

    .name span {
        font-size: 1rem;
    }

    .right .balloon_one {
        position: absolute;
        top: 10px;
        left: -77px;
        animation: balloon1 2s infinite linear;
    }

    .right .balloon_one img {
        width: 76px !important;
    }

    .decorate_flower--one {
        top: 100px;
        left: 50px;
    }

    .decorate_flower--two {
        top: 585px;
        left: 20px;
    }

    .decorate_flower--three {
        top: 320px;
        right: 25px;
    }

    .decorate_star.star1 {
        top: 45px;
        left: 200px;
    }

    .decorate_star.star2 {
        top: 10px;
        right: 20px;
    }

    .decorate_star.star3 {
        top: 300px;
        left: 30px;
    }

    .decorate_star.star4 {
        bottom: 60px;
        left: 35px;
    }

    .decorate_star.star5 {
        bottom: 140px;
        left: 500px;
    }

    .smiley__icon {
        bottom: 330px;
        left: 10px;
        width: 50px;
    }

    .right .balloon_two {
        position: absolute;
        top: 60px;
        right: -65px;
    }

    #btn__letter {
        margin-top: 15px;
        width: 200px;
    }
}




/* --- New Keyframe: popInAndFloat --- */
@keyframes popInAndFloat {
    0% {
        opacity: 0;
        transform: translateY(350px) scale(0.9);
    }

    50% {
        opacity: 1;
        transform: translateY(310px) scale(1)
    }

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

.small-rajib-letter {
    opacity: 0;
    animation: popInAndFloat 1.0s ease-out 16.0s forwards;
    transform: translateY(310px);
}

/* =====================================================
   TEMA GELAP
   ===================================================== */
body {
    background-image: radial-gradient(ellipse at 72% 38%, #2b2040 0%, #1a1426 45%, #0f0c17 100%);
}

.content .right .image {
    border-color: #FFC531;
    box-shadow: 0 0 0 4px rgba(255, 197, 49, 0.18), 0 0 40px rgba(255, 197, 49, 0.25);
}

.title .birthday {
    filter: drop-shadow(0 0 14px rgba(255, 197, 49, 0.35));
}

.name,
.date__of__birth,
#btn__letter {
    box-shadow: 0 0 18px rgba(255, 197, 49, 0.25);
}

.decorate_star {
    background-color: #FFD76A;
    filter: drop-shadow(0 0 5px rgba(255, 215, 106, 0.8));
}

/* =====================================================
   SUNFLOWER (animasi: muncul, bergoyang, kelopak berputar, inti berdenyut)
   ===================================================== */
.sf-pop {
    position: absolute;
    width: var(--s, 90px);
    height: var(--s, 90px);
    z-index: 3;
    pointer-events: none;
    transform: scale(0);
    animation: scaleCricle 3s var(--t, 15s) forwards ease-in-out;
}

.sf {
    width: 100%;
    height: 100%;
    transform-origin: 50% 90%;
    animation: sfSway var(--d, 4s) ease-in-out infinite alternate;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.sf svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.sf .sf-back,
.sf .sf-front,
.sf .sf-core {
    transform-box: fill-box;
    transform-origin: center;
}

.sf .sf-back { animation: sfSpin 40s linear infinite; }
.sf .sf-front { animation: sfSpin 26s linear infinite reverse; }
.sf .sf-core { animation: sfPulse 2.4s ease-in-out infinite; }

@keyframes sfSway {
    from { transform: rotate(-8deg) translateY(0); }
    to { transform: rotate(8deg) translateY(-5px); }
}

@keyframes sfSpin {
    to { transform: rotate(360deg); }
}

@keyframes sfPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.07); }
}

/* di sekitar foto (satu-satunya balon ada di kiri atas) */
.sf-pop.sf-a { --s: 130px; top: -55px; right: -60px; }
.sf-pop.sf-b { --s: 100px; bottom: 30px; left: -65px; }
.sf-pop.sf-c { --s: 66px; bottom: -14px; right: -6px; }

/* di halaman */
.sf-pop.sf-d { --s: 78px; left: 90px; bottom: 40px; }
.sf-pop.sf-e { --s: 60px; right: 36px; top: 250px; }

@media screen and (max-width: 658px) {
    .sf-pop.sf-a { --s: 84px; top: -30px; right: -36px; }
    .sf-pop.sf-b { --s: 64px; bottom: 16px; left: -40px; }
    .sf-pop.sf-c { --s: 44px; bottom: -8px; right: -10px; }
    .sf-pop.sf-d { --s: 52px; left: 14px; bottom: 34px; }
    .sf-pop.sf-e { --s: 42px; right: 12px; top: 150px; }
}

@media (prefers-reduced-motion: reduce) {
    .sf, .sf .sf-back, .sf .sf-front, .sf .sf-core { animation: none; }
}


.decorate_flower--three {
    top: 90px;
    right: 430px;
}

@media screen and (max-width: 658px) {
    .decorate_flower--three {
        top: 320px;
        right: 25px;
    }
}

@media screen and (max-width: 658px) {
    .sf-pop.sf-e { top: auto; bottom: 170px; right: 14px; }
}
