* {
    margin: 0;
    padding: 0;
    box-sizing: content-box;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #e8d5b5, #f3e6cf, #d8c09b);
    font-family: Georgia, 'Times New Roman', serif;
}

.card {
    
    width: 400px;
    padding: 40px 30px;
    text-align: center;

    background:
    radial-gradient(
        circle at 20% 20%,
        rgba(139, 105, 65, 0.08),
        transparent 30%
    ),
    radial-gradient(
        circle at 80% 80%,
        rgba(139, 105, 65, 0.08),
        transparent 30%
    ),
    #f7ecd8;
    
    border: 2px solid #b89b72;
    border-radius: 12px;

    box-shadow: 
        0 12px 30px rgba(75, 52, 30, 0.25),
        inset 0 0 25px rgba(139, 105, 65, 0.12);

    position: relative;
    z-index: 10;

    transition: 0.4s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid #b89b72;
    border-radius: 8px;
    pointer-events: none;
}

.card::after {
    content: "❦";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: #9b7954;
    font-size: 22px;
}

.card h1 {
    color: #704214;
    font-size: 38px;
    margin-bottom: 15px;

    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(155, 121, 84, 0.2);
    }

    50% {
        text-shadow:
            0 0 10px rgba(155, 121, 84, 0.4),
            0 0 18px rgba(184, 155, 114, 0.3);
    }
}
.card h2 {
    color: #8b5e3c;
    font-size: 22px;
    margin-bottom: 20px;
}

.card p {
    color: #5f4a36;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 25px;
}

.card button {
    padding: 12px 25px;
    margin: 5px;

    border: 1px solid #9b7954;
    border-radius: 8px;

    background: linear-gradient(
        135deg,
        #a9825a,
        #80613f
    );

    color: #fff8eb;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;

    cursor: pointer;

    box-shadow: 0 5px 12px rgba(75, 52, 30, 0.25);

    transition: 0.3s ease;
}

.card button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(75, 52, 30, 0.35);
}

.balloons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.balloon {
    position: absolute;
    font-size: 50px;
    animation: float 3s ease-in-out infinite;
}


.balloons span {
    position: absolute;
    animation: float 4s ease-in-out infinite;
}

.flowers span {
    position: absolute;
    animation: flowerSwing 2s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes flowerSwing {
    0%, 100% {
        transform: rotate(-8deg);
    }

    50% {
        transform: rotate(8deg);
    }
}

/* Balloons */

.balloons span {
    font-size: 45px;
}

.balloons span:nth-child(1) {
    left: 3%;
    top: 5%;
}

.balloons span:nth-child(2) {
    left: 15%;
    top: 25%;
}

.balloons span:nth-child(3) {
    left: 30%;
    top: 5%;
}

.balloons span:nth-child(4) {
    left: 50%;
    top: 12%;
}

.balloons span:nth-child(5) {
    right: 5%;
    top: 5%;
}

.balloons span:nth-child(6) {
    right: 18%;
    top: 25%;
}

.balloons span:nth-child(7) {
    left: 5%;
    bottom: 15%;
}

.balloons span:nth-child(8) {
    left: 25%;
    bottom: 5%;
}

.balloons span:nth-child(9) {
    right: 5%;
    bottom: 15%;
}

.balloons span:nth-child(10) {
    right: 25%;
    bottom: 5%;
}

.balloons span:nth-child(11) {
    left: 42%;
    bottom: 8%;
}

.balloons span:nth-child(12) {
    right: 40%;
    top: 3%;
}


/* Flowers */

.flowers span {
    font-size: 32px;
}

.flowers span:nth-child(1) {
    left: 2%;
    top: 40%;
}

.flowers span:nth-child(2) {
    left: 12%;
    top: 55%;
}

.flowers span:nth-child(3) {
    left: 25%;
    top: 15%;
}

.flowers span:nth-child(4) {
    right: 2%;
    top: 40%;
}

.flowers span:nth-child(5) {
    right: 12%;
    top: 55%;
}

.flowers span:nth-child(6) {
    right: 25%;
    top: 15%;
}

.flowers span:nth-child(7) {
    left: 10%;
    bottom: 30%;
}

.flowers span:nth-child(8) {
    left: 35%;
    bottom: 3%;
}

.flowers span:nth-child(9) {
    right: 10%;
    bottom: 30%;
}

.flowers span:nth-child(10) {
    right: 35%;
    bottom: 3%;
}

.flowers span:nth-child(11) {
    left: 48%;
    top: 8%;
}

.flowers span:nth-child(12) {
    right: 48%;
    bottom: 12%;
}

.surprise-message {
    margin-top: 25px;
    padding: 20px;
    background: #fff0f7;
    border-radius: 15px;

    animation: surpriseOpen 0.8s ease;
}

@keyframes surpriseOpen {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: fall 2s linear forwards;
}

@keyframes fall {
    from {
        transform: translateY(-20px) rotate(0deg);
    }

    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

.surprise-message {
    display: none;
    margin-top: 25px;
    padding: 30px;

    background: #f4e4c1;

    border: 2px solid #b89b72;
    border-radius: 10px;

    box-shadow:
        0 10px 25px rgba(75, 52, 30, 0.2),
        inset 0 0 25px rgba(139, 105, 65, 0.1);

    position: relative;
    z-index: 10;
}

.surprise-message h2 {
    color: #704214;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
}

.surprise-message p {
    animation: messagePop 0.6s ease 0.5s both;
}

@keyframes messagePop {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.surprise-message.show {
    display: block;
    animation: surpriseOpen 0.8s ease;
}

@keyframes surpriseOpen {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Sparkle Animation */

.sparkle {
    position:absolute;
    font-size: 35px;
    animation: sparkleMove  2s ease-in-out infinite;
    pointer-events:none;
}

@keyframes sparkleMove {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.sparkles span:nth-child(1) {
    left: 3%;
    top: 10%;
}

.sparkles span:nth-child(2) {
    left: 25%;
    top: 50%;
}

.sparkles span:nth-child(3) {
    left: 5%;
    bottom: 10%;
}

.sparkles span:nth-child(4) {
    left: 20%;
    bottom: 11%;
}

.sparkles span:nth-child(5) {
    right: 3%;
    top: 10%;
}

.sparkles span:nth-child(6) {
    right: 25%;
    top: 50%;
}

.sparkles span:nth-child(7) {
    right: 5%;
    bottom: 10%;
}

.sparkles span:nth-child(8) {
    right: 20%;
    bottom: 9%;
}

.sparkles span:nth-child(9) {
    left: 20%;
    top: 2%;
}

.sparkles span:nth-child(10) {
    right: 30%;
    top: 6%;
}

.hearts span {
    position: fixed;
    font-size: 50px;
    animation: heartFloat 5s ease-in-out infinite;
    pointer-events:none;
}

.hearts span:nth-child(1) {
    left: 10%;
    bottom: 5%;
}

.hearts span:nth-child(2) {
    left: 25%;
    bottom: 10%;
}

.hearts span:nth-child(3) {
    left: 40%;
    bottom: 5%;
}

.hearts span:nth-child(4) {
    right: 40%;
    bottom: 10%;
}

.hearts span:nth-child(5) {
    right: 25%;
    bottom: 5%;
}

.hearts span:nth-child(6) {
    right: 10%;
    bottom: 10%;
}

@keyframes heartFloat {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        transform: translateY(-250px);
        opacity: 0;
    }
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(75, 52, 30, 0.25),
        0 0 25px rgba(155, 121, 84, 0.25);
}

.gift-box {
    font-size: 70px;
    margin-bottom: 15px;
    display: inline-block;
    animation: giftBounce 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes giftBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(-5deg);
    }
}
.gift-box.open {
    .gift-box.open {
    animation: giftOpen 1.5s ease forwards;
}

@keyframes giftOpen {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    30% {
        transform: scale(1.15) rotate(-5deg);
        opacity: 1;
    }

    60% {
        transform: scale(1.2) rotate(5deg);
        opacity: 1;
    }

    80% {
        transform: scale(1.1) rotate(-3deg);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}
}

@keyframes giftOpen {
    0% {
        transform: scale(1) rotate(0deg);
    }

    40% {
        transform: scale(1.3) rotate(-10deg);
    }

    70% {
        transform: scale(1.15) rotate(10deg);
    }

    100% {
        transform: scale(0) rotate(20deg);
        opacity: 0;
    }
}
#surpriseBtn{
    position: relative;
    z-index: 9999;
    pointer-events: auto;
}
.balloons,
.flowers,
.sparkles,
.hearts,
#confetti-container{
    pointer-events: none;
}
.burst-sparkle {
    position: fixed;
    font-size: 40px;
    pointer-events: none;
    z-index: 1000;

    animation: sparkleBurst 1s ease-out forwards;
}

@keyframes sparkleBurst {
    from {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    to {
        transform: translate(
            calc(-50% + var(--x)),
            calc(-50% + var(--y))
        ) scale(1.3);
        opacity: 0;
    }
}
#wishBtn {
    padding: 12px 25px;
    margin-top: 10px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #a9825a, #80613f);
border: 1px solid #9b7954;
font-family: Georgia, "Times New Roman", serif;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s ease;
}

#wishBtn:hover {
    transform: scale(1.08);
}

#wishMessage {
    margin-top: 15px;
    font-size: 18px;
    color: #704214;
    font-weight: bold;
}

.wish-show {
    animation: wishPop 0.6s ease;
}

@keyframes wishPop {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* =========================
   VINTAGE BIRTHDAY LETTER
========================= */

.birthday-letter {
    text-align: center;
}

/* Vintage Envelope */

.envelope {
    position: relative;
    width: 120px;
    height: 85px;
    margin: 25px auto;

    background: #d2a06f;

    border: 2px solid #9b7954;
    border-radius: 5px;

    box-shadow:
        0 8px 15px rgba(75, 52, 30, 0.25);

    overflow: visible;
}

/* Envelope flap */

.envelope-flap {
    position: absolute;

    top: 0;
    left: 0;

    width: 0;
    height: 0;

    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-top: 45px solid #b9825b;

    transform-origin: top center;
    transition: transform 0.7s ease;

    z-index: 3;
}

/* Letter symbol */

.envelope-paper {
    position: absolute;

    top: 22px;
    left: 35px;

    font-size: 45px;

    z-index: 2;

    transition: transform 0.8s ease;
}

/* Open animation */

.envelope.open .envelope-flap {
    transform: rotateX(180deg);
}

.envelope.open .envelope-paper {
    transform: translateY(-45px);
}

/* Envelope flap */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;

    width: 0;
    height: 0;

    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-top: 45px solid #d4a276;

    transform-origin: top center;
    transition: transform 0.7s ease;

    z-index: 3;
}

/* Letter symbol */
.envelope-paper {
    position: absolute;

    top: 25px;
    left: 35px;

    font-size: 45px;

    z-index: 2;

    transition: transform 0.8s ease;
}

/* Envelope opening */
.envelope.open .envelope-flap {
    transform: rotateX(180deg);
}

.envelope.open .envelope-paper {
    transform: translateY(-45px);
}


/* Open Letter button */
#letterBtn {
    padding: 12px 25px;
    margin: 5px;

    border: 1px solid #9b7954;
    border-radius: 8px;

    background: linear-gradient(
        135deg,
        #a9825a,
        #80613f
    );

    color: #f3ce89;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;

    cursor: pointer;

    box-shadow:
        0 5px 12px rgba(75, 52, 30, 0.25);

    transition: 0.3s ease;
}

#letterBtn:hover {
    transform: translateY(-3px) scale(1.05);

    box-shadow:
        0 8px 18px rgba(75, 52, 30, 0.35);
}


/* Vintage paper */
.letter-content {
    display: none;

    margin-top: 20px;
    padding: 25px;

    background: #f4e4c1;

    border: 1px solid #b89b72;
    border-radius: 5px;

    box-shadow:
    inset 0 0 25px rgba(100, 70, 40, 0.15),
    0 8px 20px rgba(75, 52, 30, 0.25);
    font-family: "Brush Script MT", "Segoe Script", cursive;
}

/* Letter opening */
.letter-content.show {
    display: block;
    animation: letterOpen 0.8s ease;
}

@keyframes letterOpen {
    0% {
        opacity: 0;
        transform: translateY(35px) scale(0.85);
    }

    50% {
        opacity: 0.7;
        transform: translateY(-8px) scale(1.03);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.letter-content::before {
    content: "❦";
    display: block;
    color: #9b7954;
    font-size: 22px;
    margin-bottom: 10px;
}

.letter-content::after {
    content: "❦";
    display: block;
    color: #9b7954;
    font-size: 22px;
    margin-top: 15px;
}

/* Letter heading */
.letter-content h3 {
    color: #704214;
    margin-bottom: 18px;
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-size: 28px;
    font-style: italic;
}

/* Letter paragraphs */
.letter-content p {
    color: #5f4a36;
    line-height: 1.8;
    margin-bottom: 12px;
    font-family:"Retro Lines Authentic", sans-serif;
    font-size: 19px;
    text-align: left;
}

.wax-seal {
    position: absolute;
    left: 50%;
    top: 48%;

    transform: translate(-50%, -50%);

    width: 28px;
    height: 28px;

    background: #8b3a32;
    color: #f4e4c1;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;

    box-shadow:
        0 2px 5px rgba(75, 30, 20, 0.3);

    z-index: 5;
}

/* Wax seal opening */

.wax-seal {
    transition:
        transform 0.5s ease,
        opacity 0.5s ease;
}

.wax-seal.seal-open {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}
.letter-content p:last-of-type {
    text-align: right;
    font-style: italic;
    font-size: 21px;
    margin-top: 20px;
}

.card::after {
    content: "❦";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: #9b7954;
    font-size: 22px;
}

.surprise-message::before {
    content: "❦";
    display: block;
    color: #9b7954;
    font-size: 24px;
    margin-bottom: 8px;
}

.surprise-message::after {
    content: "❦";
    display: block;
    color: #9b7954;
    font-size: 24px;
    margin-top: 15px;
}

/* =========================
   MOBILE RESPONSIVE
========================= */

@media (max-width: 600px) {

    body {
        padding: 20px 10px;
        min-height: 100vh;
        overflow-x: hidden;
    }

    .card {
        width: 90%;
        max-width: 400px;
        padding: 30px 20px;
    }

    .card h1 {
        font-size: 30px;
    }

    .card h2 {
        font-size: 19px;
    }

    .card p {
        font-size: 15px;
    }

    .balloon {
        font-size: 35px;
    }

    .balloons span {
        font-size: 32px;
    }

    .flowers span {
        font-size: 25px;
    }

    .sparkle {
        font-size: 25px;
    }

    .hearts span {
        font-size: 35px;
    }

    .envelope {
        transform: scale(0.9);
    }

    .letter-content {
        padding: 20px 15px;
    }

    .letter-content p {
        font-size: 17px;
    }

    .gift-box {
        font-size: 60px;
    }

    .card button,
    #letterBtn,
    #wishBtn {
        max-width: 90%;
    }
}