@import url('https://fonts.googleapis.com/css2?family=Coiny&family=Titan+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nerko+One&family=Sriracha&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap');
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
:root{
    --pink: #ff9ecb;
    --lavender: #c9a8ff;
    --gold: #ffd58a;
    --bg: #0a0e27;
    --bg-alt: #12173f;
    --color-pink: #feecea;
    --color-white: #fff;
    --color-black: #333;
    --color-text-pink: #FF7882;
    --color-heart: #FF7882;
    --color-bg-letter: #fff8e4;
    --color-border: #DACCBF;
}
html{
    min-height: 100vh;
}
body {
    position: relative;
    font-size: 16px;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
}

/* Starfield to match the rest of the site */
.stars-layer{
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.star{
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--dur, 3s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes twinkle{
    0%, 100% { opacity: var(--min-op, .25); transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* Minimal header to match the main site */
.site-header-mini{
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 5000;
    background: rgba(10,14,39,0.55);
    backdrop-filter: blur(10px);
}
.site-header-mini .logo{
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f5f1ff;
}
.site-header-mini .logo-dot{ color: var(--gold); }
.site-header-mini .back-link{
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    color: #a8a4c9;
    transition: color .25s ease;
}
.site-header-mini .back-link:hover{ color: #f5f1ff; }

#wrapper{
    position: relative;
    background-color: transparent;
    min-height: 100vh;
    overflow-x: hidden;
    z-index: 1;
    padding-top: 60px;
}

/* Flags: gentle fade + tiny drop, no more flying in from way above */
.flag__birthday{
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(-100px);
    animation: flagIn 4s .3s forwards ease;
}
@keyframes flagIn{
    to{
        opacity: 1;
        transform: translateY(0);
    }
}
.flag__birthday img{
    max-width: 100%;
    height: auto;
}
.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%;
}
.title{
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    font-family: "Titan One", sans-serif;
    font-size: 3rem;
    flex-direction: column;
    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;
    z-index: -1;
    opacity: 0;
    transform-origin: left;
    animation: hatFall 4s 7s both ease;
}
.title .hat img{
    display: block;
    width: 100%;
    height: auto;
}
@keyframes hatFall{
    0%{
        opacity: 0;
        transform: translateY(-600px) rotate(-40deg);
    }
    1%{
        opacity: 1;
    }
    20%, 30%{
        opacity: 1;
        transform: translateY(0) rotate(-40deg);
    }
    35%, 100%{
        opacity: 1;
        transform: translateY(0) 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;
    z-index: -1;
    width: 300px;
    height: 50px;
    opacity: 0;
    animation: dateOfBirthIn .6s 7s forwards ease;
}
@keyframes dateOfBirthIn{
    to{ opacity: 1; }
}
.name{
    position: absolute;
    padding: 0px 20px;
    bottom: -20px;
    border: 3px solid var(--color-black);
    font-family: 'Dancing Script', cursive;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}
.name:hover{
    transform: scale(1.06);
    box-shadow: 0 0 20px rgba(255,120,150,0.5);
}
.date__of__birth span, .name span{
    font-weight: bold;
    margin: 0px 40px;
}
.date__of__birth span{
    font-size: 1.2rem;
}
.name span{
    font-size: 1.7rem;
}

/* Profile photo: fades + settles into place instead of sliding up 700px
   from below (that was the main cause of the huge scrollable page) */
.right .box__account{
    position: relative;
    opacity: 0;
    transform: translateY(25px) scale(.92);
    animation: profileIn 1s 7s forwards ease;
}
@keyframes profileIn{
    to{
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.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;

}
.cricle{
    position: absolute;
    top: 20px;
    right: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0);
    animation: scaleCricle 3s 8.3s forwards ease-in-out;
}
@keyframes scaleCricle {
    0%{
        transform: scale(0);
    }
    10%{
        transform: scale(1.3);
    }
    20%{
        transform: scale(0.7);
    }
    30%,100%{
        transform: scale(1);
    }

}
.text__cricle{
    position: relative;
    width: 100px;
    height: 100px;
    background-color: var(--color-text-pink);
    border-radius: 50%;
    border: 5px solid var(--color-black);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: rotateCricle 5s linear infinite;
}
@keyframes rotateCricle{
    to{
        transform: rotate(360deg);
    }
}
.text__cricle span{
    top: 0%;
    left: 50%;
    position: absolute;
    color: var(--color-black);
    transform: rotate(calc(var(--i) * 24deg));
    transform-origin: 0 45px;
    font-family: "Sriracha", cursive;
    text-transform: uppercase;
    font-size: 0.7rem;
}
.fa-heart{
    color: var(--color-heart);
    filter: drop-shadow(0 0 3px var(--color-heart));
    animation: scaleHeart 1s infinite linear;
}
.cricle .fa-heart{
    position: absolute;
    transform: scale(0.85);
}
@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);
    }
}

/* Smiley badge now lives inside .box__account so it always sits right on
   the profile photo, wherever that photo ends up */
.smiley__icon{
    position: absolute;
    top: 30px;
    right: -40px;
    width: 90px;
    transform: scale(0);
    animation: scaleCricle 3s 8.5s forwards ease-in-out;
}

.decorate_star{
    position: absolute;
    transform: scale(0);
    background-color: var(--gold);
    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;
}


#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;
}

.age__counter{
    position: relative;
    margin-top: 22px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 14px 22px;
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(14px);
    animation: ageCounterIn .8s 7s forwards ease;
}
@keyframes ageCounterIn{
    to{ opacity: 1; transform: translateY(0); }
}
.age__label{
    font-family: "Sriracha", cursive;
    font-size: .7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
}
.age__row{
    font-family: "Sriracha", cursive;
    font-weight: bold;
    font-size: 1.15rem;
    color: var(--color-white);
}
.age__row-sub{
    font-size: .95rem;
    color: rgba(255,255,255,0.65);
}


/* ============ Letter popup (boxMail) ============ */
.boxMail{
    position: fixed;
    background: rgb(0, 0, 0, 0.8);
    width: 100%;
    height: 100%;
    opacity: 0;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0.3);
    visibility: hidden;
    transition: all 0.5s;
    z-index: 100000000;
}
.boxMail.active{
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.boxMail .boxMail-container{
    position: absolute;
    width: 750px;
    height: 500px;
    display: flex;
    margin: 0;
    transform: scale(0.9);
    -webkit-perspective: 2000px;
    perspective: 2000px;
    transition: all 0.5s;
}
.boxMail .boxMail-container .card1,
.boxMail .boxMail-container .card2{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid black;
}
.boxMail .boxMail-container .card1 {
    position: absolute;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, #FF7882, #FF7882 63%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.boxMail-container .card1{
    z-index: 1;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transform-origin: left;
    transition: all 2.2s ease-in-out;
}
.boxMail .boxMail-container .card1 .userImg{
    position: relative;
    width: 80px;
    height: 80px;
    background-color: white;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    cursor: pointer;
    margin-bottom: 20px;
}
.boxMail .boxMail-container .card1 .userImg img{
    position: absolute;
    object-fit: cover;
    width: calc(100%);
    height: calc(100%);
}
.boxMail .boxMail-container .card1 h3{
    font-family: 'Dancing Script', cursive;
    font-size: 40px;
    text-transform: uppercase;
    width: 80%;
    text-align: center;
    line-height: 1.5;
    letter-spacing: 5px;
    transform: rotate(-5deg);
    text-shadow: 0 0 5px white,
                0 0 10px white;
}
.boxMail .boxMail-container .card2{
    position: relative;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, #e0e0e0, #ffffff 30%);
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transform-origin: left;
    transition: all 2.2s;
}
.boxMail .boxMail-container .card2 .card2-content {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #FF7882;
    transition: all 1s;
    overflow-y: auto;
    font-family: "Inter", serif;
    color: #fff;
}

/* Card flip + message reveal now run automatically once (triggered by
   JS adding .flipped when the letter opens) — no hover required. The
   flip itself is a desktop-only flourish; the class is only ever added
   above the 659px breakpoint. */
.boxMail-container.flipped{
    transform: rotate(-5deg);
    filter: drop-shadow(0 0 10px #FF7882);
}
.boxMail-container.flipped .card1{
    transform: translate(-187px, -250px) rotateY(-140deg);
}
.boxMail-container.flipped .card2-content{
    transform: translate(20px, 20px);
    box-shadow: -1px -1px 5px rgb(0, 0, 0, 0.4);
}

.boxMail .boxMail-container .card2 h3{
    font-family: 'Dancing Script', cursive;
    padding: 20px 0px 10px 60px;
    font-size: 25px;
    text-shadow: 0 0 8px #FF7882;
    min-height: 1.3em;
}
.boxMail .boxMail-container .card2 h2{
    font-family: 'Dancing Script', cursive;
    padding: 0px 20px;
    text-indent: 20px;
    font-size: 22px;
    min-height: 5em;
    white-space: pre-wrap;
}

/* Blinking cursor while a line is being "written" */
.is-typing::after{
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    vertical-align: -0.15em;
    background: currentColor;
    animation: blinkCursor .8s steps(1) infinite;
}
@keyframes blinkCursor{
    50%{ opacity: 0; }
}

.boxMail .boxMail-container .card2 .card2-content .imageCute2{
    position: absolute;
    top: 5px;
    left: 20px;
    opacity: 0;
    transition: 1s;
}
.boxMail .boxMail-container .card2 .card2-content .imageCute2.show{
    animation: cute3 1s linear infinite,
                cute4 2s forwards;
}
@keyframes cute3{
    0%{
        opacity: 1;
        transform: rotate(0deg);
    }
    25%{
        opacity: 1;
        transform: rotate(5deg);
    }
    50%{
        opacity: 1;
        transform: rotate(0deg);
    }
    75%{
        opacity: 1;
        transform: rotate(-5deg);
    }
    100%{
        opacity: 1;
        transform: rotate(0deg);
    }
}
@keyframes cute4{
    0%{
        opacity: 1;
        left: 20px;
    }
    100%{
        opacity: 1;
        left: 100px;
    }
}
.boxMail .boxMail-container .card2 .card2-content .imageCute2 img{
    width: 40px;
}

.boxMail .fa-xmark{
    position: fixed;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    padding: 0;
    cursor: pointer;
    color: white;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    transition: background .2s ease, transform .2s ease;
    z-index: 10000000000000000;
}
.boxMail .fa-xmark:hover{
    background: rgba(255,255,255,0.25);
    transform: scale(1.08);
}


/* ======================================================================
   Mobile — kept at the END of the file on purpose: rules here need to
   win the cascade over every rule above at matching widths, and equal-
   specificity ties go to whichever rule comes LAST in the stylesheet.
   (Having this block earlier than the base rules was why some mobile
   overrides weren't reliably applying.)
   ====================================================================== */
@media screen and (max-width: 658px)   {

    .site-header-mini{
        height: 50px;
        padding: 0 15px;
    }

    .site-header-mini .logo{
        font-size: 1rem;
    }

    .site-header-mini .back-link{
        font-size: 0.7rem;
    }

    #wrapper {
        padding-top: 50px;
    }

    .flag__birthday img {
        width: 110px;
        height: auto;
    }

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

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

    .content {
        width: 100%;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        align-items: center;
        padding-top: 0.6rem;
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 20px;
    }

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

    .date__of__birth {
        width: 90% !important;
        max-width: 180px;
        height: 36px;
        margin: 0 auto;
    }

    .date__of__birth span {
        margin: 0 10px;
        font-size: 0.75rem;
    }

    .age__counter {
        margin-top: 6px;
        padding: 6px 10px;
        gap: 1px;
    }

    .age__label {
        font-size: 0.5rem;
    }

    .age__row {
        font-size: 0.8rem;
    }

    .age__row-sub {
        font-size: 0.65rem;
    }

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

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

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

    .cricle {
        top: -12px;
        right: -30px;
    }

    .cricle .text__cricle{
        width: 78px;
        height: 78px;
    }

    .cricle .text__cricle span{
        transform-origin: 0 35px;
        font-size: 0.55rem;
    }

    .right .balloon_one {
        top: -18px;
        left: -28px;
    }

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

    .right .balloon_two {
        top: 64px;
        right: -22px;
    }

    .right .balloon_two img {
        width: 40px !important;
    }

    .smiley__icon{
        top: auto;
        bottom: 4px;
        right: -14px;
        width: 46px;
    }

    .decorate_star.star1 {
        width: 10px;
        height: 10px;
        top: 118px;
        left: 12px;
    }

    .decorate_star.star2 {
        width: 9px;
        height: 9px;
        top: 100px;
        right: 12px;
        left: auto;
    }

    .decorate_star.star3 {
        width: 8px;
        height: 8px;
        top: 260px;
        left: 16px;
    }

    .decorate_star.star4 {
        width: 9px;
        height: 9px;
        top: 300px;
        right: 14px;
        left: auto;
        bottom: auto;
    }

    .decorate_star.star5 {
        width: 8px;
        height: 8px;
        top: 420px;
        right: 14px;
        left: auto;
        bottom: auto;
    }

    .decorate_flower--one {
        top: 88px;
        left: 14px;
    }

    .decorate_flower--two {
        top: 78px;
        right: 14px;
        left: auto;
    }

    .decorate_flower--three {
        top: 395px;
        left: 14px;
        right: auto;
    }

    .decorate_bottom {
        right: 0;
        bottom: -10px;
        width: 70px;
    }

    .decorate_bottom img {
        width: 70px !important;
    }

    /* Letter: identical flip-book as desktop (same layout, same sideways
       rotateY flip) — just scaled down to fit a small screen instead of
       being reshaped, so the animation itself matches desktop exactly. */
    .boxMail{
        overflow: hidden;
    }
    .boxMail .boxMail-container{
        transform: scale(0.68) translateX(8%);
    }
    .boxMail-container.flipped{
        transform: scale(0.68) translateX(8%) rotate(-5deg);
    }

    .boxMail .fa-xmark{
        top: 10px;
        right: 10px;
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

}
