@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Poppins:wght@300;400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #090707;
    color: #f5eee9;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

.opening {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    background:
        radial-gradient(ellipse at center, #351018 0%, #160a0d 45%, #090707 80%);
}

.opening-content {
    max-width: 650px;
    animation: fadeIn 2s ease;
}

.small-text {
    color: #c49b86;
    font-size: 10px;
    letter-spacing: 4px;
    margin-bottom: 25px;
}

.opening h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(45px, 8vw, 85px);
    font-weight: 400;
    margin-bottom: 20px;
}

.opening h1 span {
    color: #c58b8e;
}

.intro-text {
    color: #b9aaa5;
    font-size: 14px;
    margin-bottom: 40px;
}

button {
    background: #792d3b;
    color: white;
    border: 1px solid #b77b7e;
    padding: 16px 35px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.4s;
}

button:hover {
    background: #a34b5b;
    transform: translateY(-4px);
}

.hidden {
    display: none;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 25px;
    background: radial-gradient(ellipse at center, #351018, #090707 75%);
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(50px, 9vw, 100px);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 30px;
}

.hero h1 span {
    color: #c58b8e;
    font-style: italic;
}

.hero > p:last-of-type {
    max-width: 450px;
    color: #c1b1ac;
    font-size: 13px;
    line-height: 2;
}

.heart {
    font-size: 35px;
    color: #bd7781;
    margin-top: 50px;
    animation: heartbeat 2s infinite;
}

.appreciation,
.letter {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 25px;
}

.appreciation h2,
.letter h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(35px, 6vw, 60px);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 25px;
}

.appreciation > p:last-child,
.letter > p:last-child {
    max-width: 550px;
    color: #b9aaa5;
    font-size: 13px;
    line-height: 2.2;
}

.appreciation {
    background: #100b0c;
}

.letter {
    background: linear-gradient(180deg, #100b0c, #241015);
}

footer {
    text-align: center;
    padding: 35px;
    color: #a98c86;
    font-size: 11px;
    letter-spacing: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}.number-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 350px;
    margin: 35px auto;
}

.number {
    padding: 22px;
    background: #1c1013;
    color: #d9b77e;
    border: 1px solid #8b5a50;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.number:hover:not(:disabled) {
    background: #702d3d;
    transform: translateY(-5px);
}

.number:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.number.chosen {
    opacity: 1;
    background: #702d3d;
    border-color: #e4c58b;
}

#numberMessage {
    max-width: 400px;
    margin: 25px auto;
    color: #e4c58b;
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    line-height: 1.6;
    text-align: center;
}/* IF YOU WERE SECTION */

.if-you-were {
    padding: 100px 20px;
    text-align: center;
}

.if-you-were h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    color: #e4c58b;
    margin: 15px 0;
}

.card-instruction {
    color: #c5a9a9;
    font-size: 13px;
    margin-top: 20px;
}

.memory-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 700px;
    margin: 45px auto 0;
}

.memory-card {
    background: transparent;
    border: none;
    height: 210px;
    perspective: 1000px;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.card-inner {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s;
    transform-style: preserve-3d;
}

.memory-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border: 1px solid #8b5a50;
    border-radius: 15px;
    background: #1c1013;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card-front {
    color: #e4c58b;
    gap: 15px;
}

.card-symbol {
    font-size: 32px;
}

.card-front small,
.card-back small {
    color: #c5a9a9;
    line-height: 1.6;
}

.card-back {
    transform: rotateY(180deg);
    background: #351a22;
    color: #f2dddd;
    gap: 12px;
}

.card-back strong {
    font-family: 'Playfair Display', serif;
    font-size: 27px;
    color: #e4c58b;
}

@media (max-width: 500px) {
    .memory-cards {
        grid-template-columns: 1fr;
    }

    .if-you-were h2 {
        font-size: 34px;
    }
}/* OPEN WHEN SECTION */

.open-when {
    padding: 100px 20px;
    text-align: center;
}

.open-when h2 {
    font-family: 'Playfair Display', serif;
    color: #e4c58b;
    font-size: 40px;
}

.envelope-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 650px;
    margin: 45px auto;
}

.envelope {
    background: #1c1013;
    border: 1px solid #8b5a50;
    border-radius: 15px;
    padding: 30px 15px;
    color: #f2dddd;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
}

.envelope:hover {
    background: #351a22;
    transform: translateY(-5px);
}

.envelope span {
    font-size: 35px;
    color: #e4c58b;
}

.envelope strong {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
}

.envelope small {
    color: #c5a9a9;
}

.letter-popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.letter-popup.show {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.letter-box {
    background: #1c1013;
    border: 1px solid #b58b68;
    border-radius: 18px;
    padding: 40px 25px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.letter-box h2 {
    font-family: 'Playfair Display', serif;
    color: #e4c58b;
}

#letterMessage {
    color: #f2dddd;
    line-height: 1.9;
    margin: 25px 0;
}

#closeLetter {
    background: #702d3d;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    cursor: pointer;
}

@media (max-width: 500px) {
    .envelope-grid {
        grid-template-columns: 1fr;
    }
}/* BIRTHDAY CAKE */

.birthday-cake {
    padding: 100px 20px;
    text-align: center;
}

.birthday-cake h2 {
    font-family: 'Playfair Display', serif;
    color: #e4c58b;
    font-size: 38px;
}

.cake-container {
    position: relative;
    width: 280px;
    margin: 100px auto 30px;
}

.candles {
    display: flex;
    justify-content: center;
    gap: 28px;
    position: absolute;
    top: -85px;
    left: 0;
    right: 0;
    z-index: 2;
}

.candle {
    width: 17px;
    height: 65px;
    background: linear-gradient(90deg, #a77b65, #f0d2a0, #a77b65);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.flame {
    position: absolute;
    top: -30px;
    left: -2px;
    font-size: 20px;
    transition: 0.3s;
}

.candle.blown .flame {
    opacity: 0;
    transform: scale(0);
}

.wick {
    position: absolute;
    top: -3px;
    left: 7px;
    width: 3px;
    height: 7px;
    background: #33201a;
}

.cake-top {
    height: 35px;
    background: #e8c8bd;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.cake-body {
    height: 120px;
    background: linear-gradient(135deg, #702d3d, #3a1721);
    border-radius: 0 0 18px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    color: #e4c58b;
    font-family: 'Playfair Display', serif;
    font-size: 21px;
}

.cake-plate {
    width: 115%;
    height: 15px;
    background: #b58b68;
    border-radius: 50%;
    margin-left: -7.5%;
}

#wishMessage {
    display: none;
    max-width: 480px;
    margin: 40px auto;
    padding: 25px;
    background: #1c1013;
    border: 1px solid #b58b68;
    border-radius: 15px;
    color: #f2dddd;
    line-height: 1.8;
}

#wishMessage.show {
    display: block;
    animation: fadeIn 1s ease;
}

#wishMessage h3 {
    font-family: 'Playfair Display', serif;
    color: #e4c58b;
}

@media (max-width: 400px) {
    .cake-container {
        transform: scale(0.85);
    }
}/* FINAL MYSTERY GIFT */

.final-gift {
    text-align: center;
    padding: 110px 20px;
    background: #160b10;
    color: #f8e9df;
}

.final-gift h2 {
    font-family: 'Playfair Display', serif;
    font-size: 38px;
    margin: 15px 0;
}

.final-gift > p:not(.small-text) {
    color: #cbb8b1;
    margin-bottom: 45px;
}

.gift-button {
    position: relative;
    display: block;
    width: 150px;
    height: 145px;
    margin: 30px auto 55px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.gift-box-body {
    position: absolute;
    width: 110px;
    height: 85px;
    background: #721f35;
    bottom: 25px;
    left: 20px;
    border: 2px solid #d5ad68;
    border-radius: 4px;
}

.gift-ribbon {
    position: absolute;
    width: 18px;
    height: 85px;
    background: #d5ad68;
    bottom: 25px;
    left: 66px;
    z-index: 2;
}

.gift-lid {
    position: absolute;
    width: 130px;
    height: 25px;
    background: #922b45;
    border: 2px solid #d5ad68;
    border-radius: 5px;
    bottom: 108px;
    left: 10px;
    z-index: 3;
    transition: transform 0.7s ease;
}

.gift-label {
    position: absolute;
    width: 220px;
    left: -35px;
    bottom: -10px;
    color: #d5ad68;
    font-size: 13px;
    letter-spacing: 1px;
}

.gift-button.opened .gift-lid {
    transform: translateY(-65px) rotate(-15deg);
}

.gift-button:disabled {
    cursor: default;
}

.final-message {
    max-width: 550px;
    margin: 30px auto 0;
    padding: 35px;
    border: 1px solid #a77c50;
    border-radius: 12px;
    background: #24121b;

    opacity: 0;
    transform: translateY(25px);
    max-height: 0;
    overflow: hidden;
    transition: all 0.8s ease;
}

.final-message.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 600px;
}

.final-message h3 {
    font-family: 'Playfair Display', serif;
    color: #e4c18a;
    font-size: 25px;
    margin: 15px 0;
}

.final-message p {
    color: #e6d6cf;
    line-height: 1.9;
    font-size: 14px;
}/* FLOATING HEARTS */

.floating-heart {
    position: fixed;
    bottom: -30px;
    color: #b76b7d;
    font-size: 20px;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 0.5;
    }

    85% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-110vh) rotate(45deg);
        opacity: 0;
    }
}/* CONFETTI */

.confetti {
    position: fixed;
    top: -20px;
    font-size: 22px;
    color: #d5ad68;
    pointer-events: none;
    z-index: 9999;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}/* MOBILE RESPONSIVENESS */

@media (max-width: 600px) {

    .final-gift {
        padding: 80px 18px;
    }

    .final-gift h2 {
        font-size: 29px;
    }

    .final-message {
        padding: 25px 18px;
        margin: 25px 12px;
    }

    .final-message h3 {
        font-size: 22px;
    }

    .final-message p {
        font-size: 13px;
    }

    .gift-button {
        transform: scale(0.9);
    }

    .birthday-cake {
        padding: 70px 15px;
    }

    .pick-number,
    .appreciation,
    .letter {
        padding-left: 18px;
        padding-right: 18px;
    }

}