:root {
    --sage: #a8b5a0;
    --cream: #f5f1ed;
    --soft-white: #fefefe;
    --taupe: #c9bfb3;
    --brown-text: #6b5d53;
    --accent-gold: #d4b896;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f5f1ed 0%, #e8e4df 100%);
    font-family: 'Montserrat', sans-serif;
    color: var(--brown-text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* FLOATING DECORATIONS */
.float-decoration {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
    font-size: 40px;
    animation: float 20s infinite ease-in-out;
}

.float-decoration:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.float-decoration:nth-child(2) {
    top: 60%;
    left: 10%;
    animation-delay: 3s;
}

.float-decoration:nth-child(3) {
    top: 30%;
    right: 8%;
    animation-delay: 6s;
}

.float-decoration:nth-child(4) {
    bottom: 15%;
    right: 12%;
    animation-delay: 9s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* ENVELOPE SECTION */
.envelope-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.8s ease;
}

.envelope-wrapper {
    position: relative;
    width: 360px;
    height: 250px;
}

.envelope-body {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--sage);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.top-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 125px 180px 0 180px;
    border-color: #92a088 transparent transparent transparent;
    z-index: 2;
    transform-origin: top;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.envelope-back {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 180px 125px 180px;
    border-color: transparent transparent #b8c5b0 transparent;
}

.seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--accent-gold);
    border-radius: 50%;
    border: 4px solid #e8d4b4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

.seal span {
    font-size: 36px;
}

.seal-text {
    font-family: 'Dancing Script', cursive;
    font-size: 14px;
    color: white;
    margin-top: 2px;
}

.tap-text {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 13px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.08);
    }
}

/* MAIN CONTENT */
main {
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.hidden {
    display: none !important;
}

.card {
    background: var(--soft-white);
    max-width: 500px;
    width: 100%;
    padding: 50px 35px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(107, 93, 83, 0.12);
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* SAVE THE DATE CARD */
.save-date-card {
    background: linear-gradient(135deg, rgba(245, 241, 237, 0.95), rgba(255, 255, 255, 0.95));
}

.teddy-hero {
    width: 200px;
    margin: 0 auto 20px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.script-text {
    font-family: 'Dancing Script', cursive;
    font-size: 48px;
    color: var(--brown-text);
    margin: 15px 0;
    line-height: 1.2;
}

.date-large {
    font-family: 'Cormorant', serif;
    font-size: 72px;
    font-weight: 300;
    color: var(--sage);
    margin: 10px 0;
}

.year-text {
    font-size: 36px;
    color: var(--taupe);
    font-weight: 300;
}

/* MAIN INVITATION CARD */
.main-invite-card {
    background: var(--soft-white);
}

.balloon-img {
    width: 180px;
    margin: 0 auto 20px;
}

.we-can-text {
    font-size: 16px;
    font-style: italic;
    color: var(--brown-text);
    margin-bottom: 5px;
}

.bearly-wait {
    font-family: 'Dancing Script', cursive;
    font-size: 56px;
    color: var(--brown-text);
    margin-bottom: 10px;
}

.baby-word {
    font-family: 'Cormorant', serif;
    font-size: 68px;
    font-weight: 600;
    color: var(--sage);
    letter-spacing: 8px;
    margin: 20px 0;
}

.subtitle-script {
    font-family: 'Dancing Script', cursive;
    font-size: 24px;
    color: var(--taupe);
    margin-bottom: 20px;
}

.parents-names {
    font-size: 14px;
    line-height: 1.8;
    margin: 25px 0;
    color: var(--brown-text);
}

.baby-name {
    font-family: 'Cormorant', serif;
    font-size: 56px;
    font-weight: 600;
    color: var(--accent-gold);
    margin: 20px 0;
}

/* COUNTDOWN */
.countdown-section {
    margin: 30px 0;
    padding: 25px;
    background: var(--cream);
    border-radius: 15px;
}

.countdown-title {
    font-family: 'Dancing Script', cursive;
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--brown-text);
}

.countdown-subtitle {
    font-size: 11px;
    font-style: italic;
    color: var(--taupe);
    margin-bottom: 20px;
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-value {
    font-family: 'Cormorant', serif;
    font-size: 42px;
    font-weight: 600;
    color: var(--sage);
    line-height: 1;
}

.time-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brown-text);
    margin-top: 5px;
}

/* EVENT DETAILS */
.event-details {
    margin: 30px 0;
    padding: 25px;
    border-top: 2px dashed var(--taupe);
    border-bottom: 2px dashed var(--taupe);
}

.event-date {
    font-size: 18px;
    font-weight: 600;
    color: var(--brown-text);
    margin-bottom: 8px;
}

.event-time {
    font-size: 16px;
    color: var(--sage);
    margin-bottom: 15px;
}

.event-location {
    font-size: 13px;
    line-height: 1.6;
    color: var(--brown-text);
}

/* BOOKS FOR BABY CARD */
.books-card {
    background: var(--soft-white);
}

.books-title {
    font-family: 'Cormorant', serif;
    font-size: 48px;
    font-weight: 600;
    color: var(--sage);
    margin-bottom: 5px;
}

.books-subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: 32px;
    color: var(--taupe);
    margin-bottom: 25px;
}

.books-box {
    background: var(--sage);
    color: white;
    padding: 25px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.8;
    margin: 25px 0;
}

.books-message {
    font-family: 'Dancing Script', cursive;
    font-size: 28px;
    color: var(--brown-text);
    margin-top: 20px;
}

/* REGISTRY CARD */
.registry-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 241, 237, 0.98));
}

.registry-title {
    font-family: 'Cormorant', serif;
    font-size: 52px;
    font-weight: 600;
    color: var(--brown-text);
    margin-bottom: 10px;
}

.registry-subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: 28px;
    color: var(--sage);
    margin-bottom: 15px;
}

.registry-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--brown-text);
    margin: 20px 0;
}

.registry-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sage);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(168, 181, 160, 0.3);
}

.registry-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(168, 181, 160, 0.4);
}

.thank-you-script {
    font-family: 'Dancing Script', cursive;
    font-size: 36px;
    color: var(--taupe);
    margin-top: 25px;
}

/* RSVP CARD */
.rsvp-card {
    background: var(--soft-white);
}

.rsvp-large {
    font-family: 'Cormorant', serif;
    font-size: 120px;
    font-weight: 300;
    color: var(--sage);
    line-height: 0.9;
    margin: 20px 0;
    letter-spacing: -5px;
}

.please-text {
    font-family: 'Dancing Script', cursive;
    font-size: 36px;
    color: var(--brown-text);
    margin-bottom: 10px;
}

.rsvp-deadline {
    font-size: 24px;
    color: var(--brown-text);
    margin: 20px 0;
}

.rsvp-deadline-date {
    font-weight: 600;
    color: var(--sage);
}

.rsvp-btn {
    display: inline-block;
    background: var(--sage);
    color: white;
    padding: 18px 50px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 2px;
    text-decoration: none;
    margin: 25px 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(168, 181, 160, 0.3);
}

.rsvp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(168, 181, 160, 0.4);
}

.dont-miss {
    font-size: 14px;
    color: var(--brown-text);
    margin-top: 20px;
    line-height: 1.6;
}

.final-thank-you {
    font-family: 'Dancing Script', cursive;
    font-size: 42px;
    color: var(--taupe);
    margin-top: 25px;
}

/* MUSIC CONTROL */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 900;
}

.music-btn {
    background: white;
    border: 2px solid var(--sage);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
}

.music-btn.playing {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .card {
        padding: 40px 25px;
    }

    .script-text {
        font-size: 38px;
    }

    .date-large {
        font-size: 56px;
    }

    .bearly-wait {
        font-size: 44px;
    }

    .baby-word {
        font-size: 52px;
    }

    .rsvp-large {
        font-size: 90px;
    }
}