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

body {
    background: #efe6db;
    font-family: 'Cormorant Garamond', serif;
    color: #222;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url('background/56df4691-6700-4411-aef8-c2a1a0b4581c.png');
    background-size: cover;
    background-position: center;
}

.wrapper {
    max-width: 430px;
    margin: auto;
    background: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.wrapper.visible {
    opacity: 1;
}

section {
    padding: 40px 20px;
    width: 100%;
    text-align: center;
}

.flower {
    color: #e4d2a4;
    font-size: 40px;
}

.invite-text {
    letter-spacing: 7px;
    margin-top: 10px;
    font-size: 18px;
}

.couple-name {
    margin-top: 30px;
    font-family: 'Great Vibes', cursive;
    font-size: 38px;
    font-weight: normal;
}

.double-happy {
    width: 90px;
    height: 90px;
    margin: 25px auto;
    border-radius: 50%;
    background: #b91212;
    color: white;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 45px;
}

.time {
    letter-spacing: 3px;
    font-size: 24px;
}

.date {
    margin-top: 15px;
    font-size: 38px;
    letter-spacing: 6px;
}

.photo-frame {
    margin-top: 30px;
}

.photo-frame img {
    width: 100%;
    display: block;
    border: 5px solid #9f0000;
}

.divider {
    text-align: center;
    color: #d7ad3a;
    font-size: 18px;
    position: relative;
    margin: 10px 0;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 1px;
    background: #eadbb6;
    top: 50%;
}

.divider::before {
    left: calc(50% - 110px);
}

.divider::after {
    right: calc(50% - 110px);
}

.family {
    text-align: center;
}

.family-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.family-box h3 {
    margin-bottom: 12px;
}

.family-box p {
    line-height: 2;
}

.wedding-icon {
    width: 55px;
    height: 55px;
    border: 2px solid #777;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 28px;
}

.announce {
    margin-top: 50px;
}

.announce h2 {
    font-size: 26px;
    font-style: italic;
    font-weight: 400;
    color: #666;
    line-height: 1.6;
}

.announce p {
    font-size: 30px;
    margin-top: 15px;
    color: #555;
}

.script-title {
    text-align: center;
    font-family: 'Great Vibes', cursive;
    font-size: 44px;
    font-weight: normal;
}

.gallery {
    margin-top: 30px;

    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.gallery img {
    width: 28%;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    background: white;
    padding: 4px;
}

.gallery .middle {
    width: 40%;
}

.event {
    text-align: center;
}

.event h2 {
    font-size: 36px;
    line-height: 1.2;
}

.sub {
    margin-top: 15px;
    font-style: italic;
    font-size: 26px;
}

.date-box {
    margin-top: 30px;

    display: flex;
    justify-content: space-around;
    align-items: center;
}

.day {
    font-size: 80px;
    font-weight: 700;
}

.month {
    margin-top: 10px;
    font-size: 32px;
}

.lunar {
    margin-top: 25px;
    color: #666;
    font-size: 22px;
}

.location {
    text-align: center;
}

.location h3 {
    font-size: 28px;
    margin-bottom: 25px;
}

.location-card {
    border: 2px solid #222;
    padding: 30px;
    border-radius: 25px;
}

.location-card h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.location-card p {
    font-size: 24px;
    line-height: 1.7;
}

.btn-direction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;

    padding: 14px 34px;
    background: #c51616;
    color: #fff;

    border: none;
    border-radius: 999px;

    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;

    text-decoration: none;

    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);

    transition: all 0.25s ease;
}

.btn-direction:hover {
    background: #a80f0f;
    transform: translateY(-2px);
}

@media(max-width:480px) {

    section {
        padding: 28px 16px;
    }

    .couple-name {
        font-size: 38px;
    }

    .double-happy {
        width: 70px;
        height: 70px;
        font-size: 36px;
    }

    .time {
        font-size: 20px;
    }

    .date {
        font-size: 28px;
        letter-spacing: 4px;
    }

    .family-box {
        flex-direction: row;
        gap: 8px;
    }

    .family-box h3 {
        font-size: 13px;
    }

    .family-box p {
        font-size: 12px;
        line-height: 1.6;
    }

    .announce h2 {
        font-size: 20px;
    }

    .announce p {
        font-size: 24px;
    }

    .script-title {
        font-size: 44px;
    }

    .event h2 {
        font-size: 22px;
    }

    .day {
        font-size: 60px;
    }

    .month {
        font-size: 24px;
    }

    .lunar {
        font-size: 16px;
    }

    .location h3 {
        font-size: 20px;
    }

    .location-card {
        padding: 20px 16px;
    }

    .location-card h2 {
        font-size: 22px;
    }

    .location-card p {
        font-size: 18px;
    }

    .btn-direction {
        font-size: 15px;
        padding: 12px 24px;
        margin-top: 30px;
    }

    .album-title {
        font-size: 48px;
    }

    .album-desc {
        font-size: 18px;
    }

    .overlay h2 {
        font-size: 52px;
    }

    .overlay p {
        font-size: 22px;
    }

    .gift-title {
        font-size: 32px;
    }

    .footer-thank {
        font-size: 48px;
    }

    .footer-message {
        font-size: 18px;
    }
}

@media(max-width:360px) {

    .couple-name {
        font-size: 32px;
    }

    .script-title {
        font-size: 38px;
    }

    .event h2 {
        font-size: 18px;
    }

    .day {
        font-size: 48px;
    }

    .location-card h2 {
        font-size: 18px;
    }

    .location-card p {
        font-size: 15px;
    }
}

/* ========= MUSIC BUTTON ========= */

.music-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #222;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    outline: none;
}

.music-btn:hover  { transform: scale(1.06); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.music-btn:active { transform: scale(0.95); }

.music-btn svg {
    width: 24px;
    height: 24px;
    color: #222;
}

.hidden { display: none; }


/* ========= FALLING LEAVES ========= */

.leaf {
    position: fixed;
    top: -20px;
    z-index: 99999;
    width: 10px;
    height: 14px;
    background: radial-gradient(ellipse at 40% 40%, #f9d0d8, #f0a8b8);
    border-radius: 50% 10% 50% 10%;
    animation: leafFall linear forwards;
    pointer-events: none;
    opacity: 0.8;
}

@keyframes leafFall {
    0%   { transform: translateY(0) translateX(0) rotate(0deg);   opacity: 0.85; }
    100% { transform: translateY(105vh) translateX(var(--drift)) rotate(720deg); opacity: 0; }
}

/* ========= SCROLL IMAGE ANIMATION ========= */

.img-from-left,
.img-from-right {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .8, .2, 1);
}

.img-from-left  { transform: translateX(-60px); }
.img-from-right { transform: translateX(60px); }

.img-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========= RSVP ========= */

.rsvp-section{
    padding:60px 20px;
}

.rsvp-form{
    margin:40px auto 0;
    background:#bf1212;
    border-radius:16px;
    padding:16px;
    max-width:320px;

    display:flex;
    flex-direction:column;
    gap:10px;
}

.rsvp-form label{
    color:#fff;
    font-size:13px;
    margin-bottom:-4px;
}

.rsvp-form input,
.rsvp-form textarea,
.rsvp-form select{
    width:100%;
    border:none;
    padding:10px 12px;
    border-radius:8px;
    font-size:13px;
    outline:none;
}

.rsvp-form textarea{
    height:70px;
    resize:none;
}

.rsvp-form button{
    border:none;
    background:white;
    color:#bf1212;
    font-weight:bold;
    font-size:16px;
    padding:10px;
    border-radius:8px;
    cursor:pointer;
}


/* ========= ALBUM ========= */

.album-section{
    padding:60px 20px;
}

.album-title{
    text-align:center;
    font-family:'Great Vibes', cursive;
    font-size:64px;
    font-weight:400;
}

.album-desc{
    text-align:center;
    color:#666;
    font-size:24px;
    margin:20px 0 40px;
    line-height:1.6;
}

.album-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.album-grid img{
    width:100%;
    border-radius:15px;
    display:block;
    box-shadow:0 4px 15px rgba(0,0,0,.12);
}


/* ========= THANK YOU ========= */

.thanks-section{
    padding:60px 20px;
    text-align:center;
}

.thankyou-banner{
    position:relative;
    overflow:hidden;
    border-radius:16px;
}

.thankyou-banner img{
    width:100%;
    display:block;
}

.overlay{
    position:absolute;
    inset:0;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    color:white;
}

.overlay h2{
    font-family:'Great Vibes', cursive;
    font-size:72px;
}

.overlay p{
    font-size:30px;
}

.gift-title{
    margin-top:50px;
    margin-bottom:30px;

    font-size:42px;
    letter-spacing:4px;
}

.qr-card{
    width:250px;
    background:white;
    border-radius:20px;
    padding:15px;
    margin:auto;

    box-shadow:0 8px 20px rgba(0,0,0,.12);
}

.qr-card img{
    width:100%;
}

.footer-thank{
    font-size:64px;
    font-family:'Great Vibes', cursive;
    font-weight:400;

    margin-top:40px;
}

.footer-message{
    margin-top:15px;

    color:#555;
    font-size:22px;
    line-height:1.7;
}


/* ========= PHONG BÌ ========= */

#envelope-new {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0ede6;
}

.env-box {
    position: relative;
    width: min(360px, 96vw);
    height: min(640px, 96vh);
    background: #fdfbf7;
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
}

.env-left {
    width: 62%;
    height: 100%;
    background-color: #f2e9d8;
    background-image: radial-gradient(#e2d5c1 0.5px, transparent 0.5px);
    background-size: 8px 8px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    box-shadow: 3px 0 10px rgba(0,0,0,0.05);
}

.env-couple {
    text-align: center;
    color: #7a4f3a;
    font-family: 'Alex Brush', cursive;
    margin-top: 10px;
}
.env-couple .name { font-size: 32px; line-height: 1.2; display: block; }
.env-couple .amp  { font-size: 22px; display: block; margin: 4px 0; }

.env-guest { text-align: center; margin-bottom: 30px; }
.env-guest-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: #8c6b58;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 500;
}
.env-guest-name {
    font-size: 20px;
    color: #4a3427;
    font-weight: 600;
    font-family: 'Cormorant Garamond', serif;
}

.env-right {
    width: 38%;
    height: 100%;
    background: #faf8f5;
    display: flex;
    justify-content: flex-end;
    padding-top: 30px;
    padding-right: 25px;
}
.env-vdate {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #a86b6c;
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    font-weight: 600;
    line-height: 1.1;
}
.env-vdate .vsep { font-size: 16px; opacity: 0.4; font-weight: 400; }

.env-string {
    position: absolute;
    top: 50%; left: 0;
    width: 100%;
    height: 4px;
    border-top: 1px solid #c8b8a2;
    border-bottom: 1px solid #c8b8a2;
    background: #dfd3c3;
    transform: translateY(-50%);
    z-index: 2;
}

.env-flower {
    position: absolute;
    top: calc(50% - 110px);
    left: 62%;
    transform: translateX(-50%);
    z-index: 3;
    width: 70px;
    pointer-events: none;
}

.env-seal {
    position: absolute;
    top: 50%; left: 62%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    background: radial-gradient(circle at 30% 30%, #f3e5ca, #d4b886 60%, #b89862 100%);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.env-seal:hover  { transform: translate(-50%, -50%) scale(1.06); }
.env-seal:active { transform: translate(-50%, -50%) scale(0.94); }

.env-seal-inner {
    width: 62px; height: 62px;
    border: 2px dashed #b39359;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Alex Brush', cursive;
    font-size: 30px;
    color: #7a5c29;
}

.env-pulse {
    position: absolute;
    top: 50%; left: 62%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(200,162,82,0.2);
    z-index: 3;
    pointer-events: none;
    animation: envPulse 2.2s infinite ease-in-out;
}
@keyframes envPulse {
    0%,100% { transform: translate(-50%,-50%) scale(1);   opacity: 0.7; }
    50%      { transform: translate(-50%,-50%) scale(1.4); opacity: 0.15; }
}

.env-hint {
    position: absolute;
    top: calc(50% + 48px);
    left: 62%;
    transform: translateX(-40%) rotate(-10deg);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6b5548;
    font-size: 13px;
    white-space: nowrap;
    pointer-events: none;
    font-family: 'Cormorant Garamond', serif;
}
.env-hint svg { width: 16px; height: 16px; fill: #6b5548; }


/* ========= LỊCH ========= */

.calendar-section {
    padding: 30px 20px;
    width: 100%;
}
.calendar-box {
    background: #FAF6F0;
    border-radius: 16px;
    padding: 24px 20px;
    border: 1px solid rgba(200,162,82,0.3);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.calendar-box h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    color: #5C4A3E;
    text-align: center;
    margin-bottom: 4px;
}
.cal-subtitle {
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.25em;
    color: #8C7769;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px 2px;
    text-align: center;
}
.cal-grid .dow {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    font-weight: 600;
    color: #5C4A3E;
    padding-bottom: 8px;
}
.cal-grid .dow.sun { color: #B89045; }
.cal-grid .cal-day {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    color: #5C4A3E;
    padding: 4px 0;
    position: relative;
}
.cal-grid .cal-day.sun { color: #B89045; }
.cal-day.highlight {
    font-weight: 700;
    color: #5C4A3E;
    z-index: 1;
}
.cal-day.highlight svg {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 36px; height: 36px;
    color: #C8A252;
    z-index: -1;
}