        @import url(https://fonts.googleapis.com/css?family=Lato:300italic);

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

        body {
            font-family: 'Outfit', sans-serif;
            margin: 0;
            padding: 0;
            background: linear-gradient(-45deg, #2b0b30, #61184c, #9c2162, #ff275d, #ffdf85);
            background-size: 400% 400%;
            animation: gradientBG 15s ease infinite;
            color: #fff;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        /* Smooth animated gradient background */
        @keyframes gradientBG {
            0% {
                background-position: 0% 50%;
            }

            50% {
                background-position: 100% 50%;
            }

            100% {
                background-position: 0% 50%;
            }
        }

        /* Floating Light Particles Background */
        .particles {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
            overflow: hidden;
        }

        .particle {
            position: absolute;
            display: block;
            pointer-events: none;
            opacity: 0;
            animation: floatUp 15s linear infinite;
        }

        @keyframes floatUp {
            0% {
                transform: translateY(110vh) scale(0) rotate(0deg);
                opacity: 0;
            }

            10% {
                opacity: 0.8;
            }

            80% {
                opacity: 0.8;
            }

            100% {
                transform: translateY(-10vh) scale(1.5) rotate(360deg);
                opacity: 0;
            }
        }

        .container {
            position: relative;
            z-index: 10;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            max-width: 600px;
            padding: 20px;
        }

        /* Interactive Initial Screen: Gift Box */
        .gift-wrapper {
            cursor: pointer;
            transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
        }

        .gift-wrapper:hover {
            transform: scale(1.1);
        }

        .gift-box {
            position: relative;
            width: 160px;
            height: 150px;
            background: linear-gradient(135deg, #ff4d4d, #cc0000);
            border-radius: 12px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.2);
            animation: pulseGlow 2s infinite;
        }

        .gift-lid {
            position: absolute;
            top: -25px;
            left: -10px;
            width: 180px;
            height: 45px;
            background: linear-gradient(135deg, #ff6666, #b30000);
            border-radius: 8px;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
            z-index: 2;
            transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            transform-origin: bottom right;
        }

        .gift-ribbon-v {
            position: absolute;
            left: 50%;
            top: 0;
            transform: translateX(-50%);
            width: 30px;
            height: 100%;
            background: linear-gradient(135deg, #ffd700, #b8860b);
            z-index: 1;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        }

        .gift-ribbon-h {
            position: absolute;
            top: 50%;
            left: 0;
            transform: translateY(-50%);
            width: 100%;
            height: 30px;
            background: linear-gradient(135deg, #ffd700, #b8860b);
            z-index: 1;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        }

        .gift-bow {
            position: absolute;
            top: -50px;
            left: 50%;
            transform: translateX(-50%);
            width: 70px;
            height: 70px;
            background: radial-gradient(circle, #ffd700, #b8860b);
            clip-path: polygon(50% 50%, 0 0, 0 100%, 50% 50%, 100% 0, 100% 100%);
            z-index: 3;
            transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        .tap-text {
            margin-top: 50px;
            font-size: 1.4rem;
            font-weight: 300;
            letter-spacing: 3px;
            text-transform: uppercase;
            animation: fadeInOut 2s infinite;
            text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
            color: rgba(255, 255, 255, 0.9);
        }

        @keyframes pulseGlow {
            0% {
                transform: scale(1);
                box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            }

            50% {
                transform: scale(1.03);
                box-shadow: 0 20px 50px rgba(255, 77, 77, 0.6);
            }

            100% {
                transform: scale(1);
                box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            }
        }

        @keyframes fadeInOut {

            0%,
            100% {
                opacity: 0.4;
            }

            50% {
                opacity: 1;
            }
        }

        .date-text {
            position: fixed;
            top: 150px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 3rem;
            font-weight: 600;
            letter-spacing: 2px;
            text-align: center;
            font-family: 'Dancing Script', cursive;
            text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
            color: rgba(255, 255, 255, 0.95);
            z-index: 10;
            pointer-events: none;
            transition: opacity 0.3s;
        }

        /* Festive Bunting */
        .bunting-container {
            position: absolute;
            top: -5px;
            left: 0;
            width: 100%;
            display: flex;
            justify-content: space-around;
            z-index: 5;
            pointer-events: none;
        }

        .flag {
            width: 0;
            height: 0;
            border-left: 25px solid transparent;
            border-right: 25px solid transparent;
            border-top: 45px solid var(--c);
            display: inline-block;
            animation: swing 5s ease-in-out infinite alternate;
            transform-origin: top center;
            animation-delay: var(--d);
            filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
        }

        @keyframes swing {
            0% {
                transform: rotate(10deg);
            }

            100% {
                transform: rotate(-10deg);
            }
        }

        /* Gift opening animations */
        .gift-wrapper.opened .gift-lid {
            transform: translateY(-80px) rotate(-15deg) scale(1.1);
            opacity: 0;
        }

        .gift-wrapper.opened .gift-bow {
            transform: translateY(-90px) rotate(15deg) scale(1.1);
            opacity: 0;
        }

        .gift-wrapper.opened .gift-box {
            transform: translateY(20px) scale(0.8);
            opacity: 0;
            transition: all 800ms ease 0.5s;
        }

        .gift-wrapper.opened .tap-text {
            opacity: 0;
            transition: opacity 0.3s;
        }

        /* Confetti Burst Logic Elements */
        .burst-heart {
            position: absolute;
            pointer-events: none;
            z-index: 100;
            filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
        }

        /* Fireworks Launch Effect */
        .projectile {
            position: fixed;
            width: 12px;
            height: 12px;
            background: white;
            border-radius: 50%;
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                0 0 30px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.4);
            pointer-events: none;
            z-index: 20;
        }

        .particule {
            position: fixed;
            font-size: 2rem;
            font-family: 'Arial', sans-serif;
            font-weight: 700;
            color: white;
            transform: scale(0);
            opacity: 0;
            pointer-events: none;
            z-index: 20;
        }

        .sparkle {
            position: fixed;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: white;
            transform: scale(0);
            opacity: 0;
            pointer-events: none;
            z-index: 20;
        }

        /* BIRTHDAY CAKE ANIMATION */

        .cake-scene {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 15;
            opacity: 0;
            transition: opacity 1s ease;
            pointer-events: none;
        }

        .cake-scene.active {
            display: block;
            opacity: 1;
        }

        #cake {
            display: block;
            position: relative;
            margin: -10em auto 0 auto;
        }

        /* Candle */
        .cake {
            background: #ffffff;
            border-radius: 10px;
            position: absolute;
            top: 228px;
            left: 50%;
            margin-left: -2.4px;
            margin-top: -8.33333333px;
            width: 5px;
            height: 35px;
            transform: translateY(-300px);
            backface-visibility: hidden;
            animation: cakeCandleIn 500ms 4s ease-out forwards;
        }

        .cake:after,
        .cake:before {
            background: rgba(255, 0, 0, 0.4);
            content: "";
            position: absolute;
            width: 100%;
            height: 2.22222222px;
        }

        .cake:after {
            top: 25%;
            left: 0;
        }

        .cake:before {
            top: 45%;
            left: 0;
        }

        /* Fire */
        .fuego {
            border-radius: 100%;
            position: absolute;
            top: -20px;
            left: 50%;
            margin-left: -2.6px;
            width: 6.66666667px;
            height: 18px;
        }

        .fuego:nth-child(1) {
            animation: fuego 1s 4s infinite;
        }

        .fuego:nth-child(2) {
            animation: fuego 1.5s 4s infinite;
        }

        .fuego:nth-child(3) {
            animation: fuego 1s 6.5s infinite;
        }

        .fuego:nth-child(4) {
            animation: fuego 0.5s 6.5s infinite;
        }

        .fuego:nth-child(5) {
            animation: fuego 0.2s 6.5s infinite;
        }

        @keyframes fuego {

            0%,
            100% {
                background: rgba(254, 248, 97, 0.5);
                box-shadow: 0 0 40px 10px rgba(248, 233, 209, 0.2);
                transform: translateY(0) scale(1);
            }

            50% {
                background: rgba(255, 50, 0, 0.1);
                box-shadow: 0 0 40px 20px rgba(248, 233, 209, 0.2);
                transform: translateY(-20px) scale(0);
            }
        }

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

        .text {
            color: #fffbfb;
            font-family: 'Lato', sans-serif;
            font-weight: 400;
            font-style: italic;
            text-align: center;
            margin-top: 150px;
            font-size: 4em;
            line-height: 1.5;
            text-shadow: 8px 8px 10px rgba(0, 5, 0, 0.7);

        }

        h1 {
            font-size: 1.4em;
        }

        /* "Go Ahead" button — appears after the cake finishes baking/icing */
        .go-ahead-btn {
            position: fixed;
            right: 20vh;
            bottom: 15%;
            padding: 12px 28px;
            font-family: 'Outfit', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            letter-spacing: 1px;
            color: #f6f6f6;
            background: linear-gradient(135deg, #ff4d4d, #cc0000);
            border: none;
            border-radius: 30px;
            cursor: pointer;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
            z-index: 25;
            opacity: 0;
            transform: translateY(15px);
            animation: goAheadIn 0.8s ease forwards;
            animation-delay: 5.8s;
            /* 4.8s cake build+icing + 1s */
        }

        @keyframes goAheadIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .go-ahead-btn:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 12px 28px rgba(255, 77, 77, 0.5);
        }

        /* LOVE LETTER SCENE — same body background, just a new layer on top */
        .letter-scene {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 15;
            opacity: 0;
            align-items: center;
            justify-content: center;
            transition: opacity 1s ease;
            pointer-events: none;
        }

        .letter-scene.active {
            display: flex;
            opacity: 1;
            pointer-events: auto;
        }

        .envelope-scene-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .envelope-wrapper {
            position: relative;
            height: 450px;
        }

        .envelope-controls {
            text-align: center;
            margin-top: 50px;
        }

        .envelope-controls button {
            font-weight: 800;
            font-style: normal;
            transition: all 0.1s linear;
            appearance: none;
            background-color: transparent;
            border: solid 2px #d9534f;
            border-radius: 4px;
            color: #fff;
            display: inline-block;
            font-size: 14px;
            text-transform: uppercase;
            margin: 15px;
            padding: 10px;
            line-height: 1em;
            text-decoration: none;
            min-width: 120px;
            cursor: pointer;
        }

        .envelope-controls button:hover {
            background-color: #d9534f;
            color: #fff;
        }

        #envelope {
            position: relative;
            width: 400px;
            height: 300px;
            top: 140px;
            margin: 0 auto;
            perspective: 1000px;
            border-bottom-left-radius: 8px;
            border-bottom-right-radius: 8px;
            background-color: #d9534f;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        #envelope .front {
            position: absolute;
            width: 0;
            height: 0;
            z-index: 3;
        }

        #envelope .flap {
            border-left: 200px solid transparent;
            border-right: 200px solid transparent;
            border-bottom: 137px solid transparent;
            border-top: 163px solid #d9534f;
            transform-origin: top;
            pointer-events: none;
        }

        #envelope .pocket {
            border-left: 200px solid #f5a3a2;
            border-right: 200px solid #f5a3a2;
            border-bottom: 150px solid #ff6f61;
            border-top: 150px solid transparent;
            border-bottom-left-radius: 8px;
            border-bottom-right-radius: 8px;
        }

        #envelope .letter {
            position: relative;
            background-color: #fff;
            color: #0e0d0d;
            width: 90%;
            height: 90%;
            margin: 0 auto;
            top: 5%;
            border-radius: 6px;
            box-shadow: 0 2px 26px rgba(0, 0, 0, 0.12);
            font-family: 'Dancing Script', cursive;
            font-style: italic;
            font-weight: 1000;
            overflow-y: auto;
            padding: 10px;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
        }

        #envelope .words {
            width: 100%;
            background-color: #ffe6e6;
            padding: 8px 10px;
            margin-bottom: 8px;
            border-radius: 4px;
            line-height: 1.4;
        }

        #envelope .words.line1 {
            font-size: 1.3rem;
            text-align: left;
            width: fit-content;
            padding: 5px 10px;
        }

        #envelope .words.line2 {
            font-size: 1.6rem;
            text-align: left;
        }

        #envelope .words.line3 {
            font-size: 1.6rem;
            text-align: left;
        }

        #envelope .words.line4 {
            font-size: 1.6rem;
            text-align: left;
        }

        #envelope .words.line5 {
            font-size: 1.6rem;
            text-align: left;
        }

        #envelope .words.line6 {
            font-size: 1.6rem;
            text-align: left;
        }

        #envelope .words.line7 {
            font-size: 1.6rem;
            text-align: left;
        }

        #envelope .words.line8 {
            font-size: 1.6rem;
            text-align: left;
        }

        #envelope .words.line9 {
            font-size: 1.6rem;
            text-align: left;
        }

        #envelope .words.line10 {
            font-size: 1.6rem;
            text-align: left;
        }

        #envelope .words.line11 {
            font-size: 1.5rem;
            text-align: right;
            font-style: italic;
            margin-top: 15px;
        }

        #envelope .words.line12 {
            font-size: 1.6rem;
            text-align: right;
            font-weight: bold;
        }

        #envelope .words.line13 {
            font-size: 1rem;
            text-align: right;
            font-weight: bold;
        }

        #envelope .hearts {
            position: absolute;
            top: 150px;
            left: 0;
            right: 0;
            z-index: 2;
        }

        #envelope .heart {
            position: absolute;
            bottom: 0;
            right: 10%;
            pointer-events: none;
        }

        #envelope .heart:before,
        #envelope .heart:after {
            position: absolute;
            content: "";
            left: 50px;
            top: 0;
            width: 50px;
            height: 80px;
            background: #e60073;
            border-radius: 50px 50px 0 0;
            transform: rotate(-45deg);
            transform-origin: 0 100%;
            pointer-events: none;
        }

        #envelope .heart:after {
            left: 0;
            transform: rotate(45deg);
            transform-origin: 100% 100%;
        }

        #envelope .a1 {
            left: 20%;
            transform: scale(0.6);
        }

        #envelope .a2 {
            left: 55%;
            transform: scale(1);
        }

        #envelope .a3 {
            left: 10%;
            transform: scale(0.8);
        }

        #envelope.close .flap {
            transform: rotateX(0deg);
            transition: transform 0.4s 0.6s ease, z-index 1s;
            z-index: 5;
        }

        #envelope.close .letter {
            transform: translateY(0px);
            transition: transform 0.4s ease, z-index 1s;
            z-index: 1;
        }

        #envelope.close .heart {
            opacity: 0;
            animation: none;
        }

        #envelope.open .flap {
            transform: rotateX(180deg);
            transition: transform 0.4s ease, z-index 0.6s;
            z-index: 1;
        }

        #envelope.open .letter {
            transform: translateY(-167px);
            transition: transform 0.4s 0.6s ease, z-index 0.6s;
            z-index: 2;
        }

        #envelope.open .heart {
            opacity: 1;
        }

        #envelope.open .a1 {
            animation: slideUp 4s linear 1, sideSway 2s ease-in-out 4 alternate;
            animation-fill-mode: forwards;
            animation-delay: 0.7s;
        }

        #envelope.open .a2 {
            animation: slideUp 5s linear 1, sideSway 4s ease-in-out 2 alternate;
            animation-fill-mode: forwards;
            animation-delay: 0.7s;
        }

        #envelope.open .a3 {
            animation: slideUp 7s linear 1, sideSway 2s ease-in-out 6 alternate;
            animation-fill-mode: forwards;
            animation-delay: 0.7s;
        }

        @keyframes slideUp {
            0% {
                top: 0;
            }

            100% {
                top: -600px;
            }
        }

        @keyframes sideSway {
            0% {
                margin-left: 0px;
            }

            100% {
                margin-left: 50px;
            }
        }

        /* Mobile responsiveness */
        @media (max-width: 640px) {

            .gift-wrapper {
                -webkit-tap-highlight-color: transparent;
            }

            .go-ahead-btn {
                right: 10vh;
                bottom: 10%;
            }

            .container {
                transform: scale(0.85);
            }

            .cake-scene {
                transform: scale(0.85);
                transform-origin: center top;
            }

            .flag {
                border-left-width: 15px;
                border-right-width: 15px;
                border-top-width: 27px;
            }

            .text {
                font-size: 2.5em;
            }

            .letter-scene {
                transform: scale(0.85);
                transform-origin: center top;
            }

            .container {
                transform: scale(0.85);
            }
        }