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

body {
    background: #16070e;
    color: white;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background:
        radial-gradient(ellipse at 50% 45%, #572037 0%, #2b101e 48%, #10060b 100%);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.intro-screen.hide-intro {
    opacity: 0;
    transform: scale(1.12);
    pointer-events: none;
}

.intro-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: #ff477f;
    filter: blur(150px);
    opacity: .2;
}

.intro-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
}

.intro-label {
    font-size: 10px;
    letter-spacing: 5px;
    color: #eeb5c8;
    margin-bottom: 20px;
}

.intro-content h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 65px;
    font-weight: normal;
    color: #fff0f5;
    text-shadow: 0 0 25px #ff8bac55;
}

.intro-content h1 span {
    color: #ff8fb5;
}

.intro-description {
    font-size: 12px;
    line-height: 2;
    color: #e8c5d2;
    margin: 15px auto 35px;
}

/* ENVELOPE */

.envelope {
    position: relative;
    width: 230px;
    height: 155px;
    margin: 0 auto 40px;
    perspective: 1000px;
}

.envelope-back {
    position: absolute;
    inset: 0;
    background: #8f3153;
    border-radius: 5px;
    box-shadow: 0 20px 50px #0008;
}

.envelope-front {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: #c24d75;
    clip-path: polygon(0 0, 50% 62%, 100% 0, 100% 100%, 0 100%);
    border-radius: 4px;
}

.envelope-flap {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: #e27899;
    clip-path: polygon(0 0, 100% 0, 50% 57%);
    transform-origin: top;
    transition: transform .9s ease;
}

.letter {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 8px;
    height: 125px;
    background: #fff0e7;
    color: #81344d;
    border-radius: 4px;
    z-index: 2;
    padding-top: 25px;
    transition: transform 1s ease;
}

.letter span {
    font-size: 10px;
    letter-spacing: 2px;
}

.letter h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 36px;
    margin-top: 8px;
}

.wax-seal {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #7b163b;
    color: #ffd5df;
    display: grid;
    place-items: center;
    box-shadow: 0 3px 12px #0005;
    transition: opacity .3s;
}

.envelope.opened .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.envelope.opened .letter {
    transform: translateY(-100px);
    transition-delay: .4s;
}

.envelope.opened .wax-seal {
    opacity: 0;
}

/* BUTTON */

#openBtn {
    padding: 16px 28px;
    border: 1px solid #ff9bb9;
    border-radius: 50px;
    color: white;
    font-size: 10px;
    letter-spacing: 2px;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #b52f60, #e65b8a);
    box-shadow: 0 8px 35px #ed568c44;
    cursor: pointer;
    transition: .3s;
}

#openBtn:active {
    transform: scale(.94);
}

.intro-footer {
    margin-top: 35px;
    font-size: 9px;
    letter-spacing: 4px;
    color: #bd8b9d;
}

/* SECOND PAGE */

.main-experience {
    min-height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background:
        radial-gradient(circle at center, #512039, #16070e 75%);
}

.main-experience.show-experience {
    display: flex;
    animation: revealPage 1.5s ease;
}

@keyframes revealPage {
    from {
        opacity: 0;
        transform: scale(.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.proposal-card {
    width: 100%;
    max-width: 430px;
    padding: 45px 25px;
    text-align: center;
    border: 1px solid #ffffff25;
    border-radius: 25px;
    background: #ffffff0b;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 80px #0007;
}

.top-label {
    font-size: 9px;
    letter-spacing: 4px;
    color: #ffb6cd;
}

.proposal-card h1 {
    margin-top: 35px;
    font-size: 29px;
    line-height: 1.7;
}

.proposal-card h1 span {
    display: block;
    font-family: 'Great Vibes', cursive;
    font-size: 52px;
    color: #ff8fb5;
}

.description {
    margin: 20px 0 30px;
    color: #e9cbd8;
    font-size: 12px;
    line-height: 2;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.buttons button {
    padding: 13px 25px;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.yes-btn {
    background: linear-gradient(135deg, #ff4788, #ff91b7);
    color: white;
}

.no-btn {
    background: #ffffff15;
    color: white;
}

#message {
    margin-top: 25px;
    color: #ffb6cd;
    font-size: 12px;
}

@media(max-width:380px) {
    .intro-content h1 {
        font-size: 55px;
    }

    .envelope {
        transform: scale(.9);
    }

    .proposal-card h1 {
        font-size: 25px;
    }
}

/* Button animations */
#yesBtn, #noBtn {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

#yesBtn.final-yes {
    position: relative;
    z-index: 5;
    transform: scale(2) !important;
}

/* Premium success screen */
.success-screen {
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px;
    overflow: hidden;
    background:
        radial-gradient(circle at top, #67203f 0%, transparent 45%),
        linear-gradient(145deg, #180711, #310d22, #12050c);
    color: #fff;
    font-family: Georgia, serif;
}

.success-content {
    width: 100%;
    max-width: 450px;
    animation: successReveal 1s ease both;
}

.success-heart {
    font-size: 75px;
    animation: heartBeat 1.2s infinite;
}

.success-content h1 {
    font-size: clamp(32px, 9vw, 48px);
    color: #ffb5cf;
    margin: 20px 0;
    letter-spacing: 2px;
}

.success-content h2 {
    font-size: 29px;
    color: #fff;
}

.success-content p {
    font-size: 18px;
    line-height: 1.6;
    color: #f8dce7;
}

#surpriseBtn {
    margin-top: 25px;
    padding: 16px 24px;
    border: none;
    border-radius: 35px;
    background: linear-gradient(120deg, #ff8caf, #d92d69);
    color: white;
    font-size: 15px;
    font-weight: bold;
    box-shadow: 0 8px 30px #ff4f8b55;
}

.forever {
    margin-top: 25px;
    font-size: 17px;
    letter-spacing: 2px;
    color: #ffb5cf;
}

@keyframes successReveal {
    from { opacity: 0; transform: scale(.75) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

/* Premium Romantic Typography */
.success-screen {
    font-family: 'Cormorant Garamond', serif;
}

.success-content h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    letter-spacing: 3px;
}

.success-content h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 42px;
    font-weight: 700;
}

.success-content p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 25px;
    font-weight: 500;
    line-height: 1.45;
}

#surpriseBtn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
}

.forever {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Balanced Romantic Font Sizes */
.success-content h1 {
    font-size: clamp(27px, 7vw, 35px);
    letter-spacing: 1.5px;
}

.success-content h2 {
    font-size: 32px;
}

.success-content p {
    font-size: 19px;
    line-height: 1.5;
}

#surpriseBtn {
    font-size: 13px;
    padding: 14px 20px;
}

.forever {
    font-size: 14px;
    letter-spacing: 1.5px;
}

.success-heart {
    font-size: 60px;
}

.floating-hearts {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.floating-heart {
    position: absolute;
    bottom: -40px;
    opacity: 0;
    animation: floatUp linear forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.8;
    }
    85% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-110vh) rotate(35deg);
        opacity: 0;
    }
}
