:root {
    --primary-color: #B2AC88;
    /* Sage Green */
    --secondary-color: #D4AF37;
    /* Gold */
    --bg-color: #F9F7F2;
    /* Off-white/Cream */
    --text-color: #4A4A4A;
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Noto Serif TC', serif;
    --accent-font: 'Great Vibes', cursive;
}

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

body {
    font-family: var(--body-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    /* Lock scrolling when envelope is shown */
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Unlock scrolling after intro is complete */
body.intro-complete {
    overflow: auto;
    position: static;
    width: auto;
    height: auto;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--heading-font);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('images/hero.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    /* Parallax effect */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}

/* Initially hide main content until envelope opens */
.navbar,
.hero,
.music-btn {
    opacity: 0;
    transition: opacity 1s ease-out;
}

/* Show content after intro is complete */
body.intro-complete .navbar,
body.intro-complete .hero,
body.intro-complete .music-btn {
    opacity: 1;
}

.hero-content {
    animation: none;
}

body.intro-complete .hero-content {
    animation: fadeIn 1.2s ease-out;
}

.sub-title {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.main-title {
    font-family: var(--accent-font);
    font-size: 6rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.date {
    font-size: 2rem;
    font-family: var(--heading-font);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.schedule {
    font-size: 1.1rem;
    font-family: var(--heading-font);
    margin-bottom: 2rem;
    letter-spacing: 1px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: transparent;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--heading-font);
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.cta-button:hover {
    background-color: white;
    color: var(--text-color);
}

/* General Section Styles */
.section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--heading-font);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--secondary-color);
}

/* Info Section */
.info-section {
    background-color: white;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.info-item h3 {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-item p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.venue-intro {
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
    line-height: 1.7;
    margin: 0.8rem 0 1rem;
    padding: 0.8rem;
    background-color: rgba(178, 172, 136, 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 5px 5px 0;
}

.venue-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    justify-content: center;
}

.feature-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, rgba(178, 172, 136, 0.15), rgba(212, 175, 55, 0.1));
    border: 1px solid rgba(178, 172, 136, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: linear-gradient(135deg, rgba(178, 172, 136, 0.25), rgba(212, 175, 55, 0.2));
    transform: translateY(-2px);
}

.venue-gallery-link {
    display: inline-block;
    margin: 0.8rem 0;
    padding: 0.6rem 1.2rem;
    background-color: transparent;
    color: var(--secondary-color);
    text-decoration: none;
    border: 2px solid var(--secondary-color);
    border-radius: 25px;
    font-family: var(--heading-font);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.venue-gallery-link:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: scale(1.05);
}

.map-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-family: var(--heading-font);
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quote {
    font-style: italic;
    color: #888;
    max-width: 800px;
    margin: 0 auto;
}

/* Gallery Section */
.gallery-section {
    background-color: var(--bg-color);
    position: relative;
    padding: 5rem 2rem 4rem;
    overflow: hidden;
}

/* Photo Collage Layout */
.photo-collage {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 700px;
}

.collage-item {
    position: absolute;
    background: white;
    padding: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.collage-item:hover {
    z-index: 10;
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.collage-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Individual photo positions and rotations */
.item-1 {
    width: 280px;
    height: 350px;
    top: 0;
    left: 5%;
    transform: rotate(-4deg);
    z-index: 2;
}

.item-2 {
    width: 260px;
    height: 320px;
    top: 20px;
    left: 35%;
    transform: rotate(3deg);
    z-index: 3;
}

.item-3 {
    width: 240px;
    height: 300px;
    top: 10px;
    right: 8%;
    transform: rotate(-2deg);
    z-index: 1;
}

.item-4 {
    width: 270px;
    height: 340px;
    top: 340px;
    left: 10%;
    transform: rotate(2deg);
    z-index: 4;
}

.item-5 {
    width: 250px;
    height: 310px;
    top: 360px;
    left: 40%;
    transform: rotate(-3deg);
    z-index: 5;
}

.item-6 {
    width: 230px;
    height: 290px;
    top: 380px;
    right: 10%;
    transform: rotate(4deg);
    z-index: 2;
}

/* Tablet adjustments */
@media (max-width: 900px) {
    .photo-collage {
        min-height: 600px;
    }

    .collage-item {
        padding: 6px;
    }

    .item-1 {
        width: 200px;
        height: 250px;
        left: 2%;
    }

    .item-2 {
        width: 190px;
        height: 240px;
        left: 38%;
    }

    .item-3 {
        width: 180px;
        height: 220px;
        right: 2%;
    }

    .item-4 {
        width: 195px;
        height: 245px;
        top: 280px;
        left: 5%;
    }

    .item-5 {
        width: 185px;
        height: 230px;
        top: 290px;
        left: 40%;
    }

    .item-6 {
        width: 175px;
        height: 215px;
        top: 300px;
        right: 5%;
    }
}

/* Mobile - Enhanced grid layout */
@media (max-width: 600px) {
    .gallery-section {
        padding: 3rem 1rem;
    }

    .photo-collage {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        min-height: auto;
        padding: 0;
    }

    .collage-item {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        height: auto !important;
        padding: 5px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
        border-radius: 4px;
    }

    /* Add subtle rotations for visual interest */
    .collage-item.item-1 {
        transform: rotate(-1deg) !important;
    }

    .collage-item.item-2 {
        transform: rotate(1deg) !important;
    }

    .collage-item.item-3 {
        transform: rotate(-0.5deg) !important;
    }

    .collage-item.item-4 {
        transform: rotate(0.5deg) !important;
    }

    .collage-item.item-5 {
        transform: rotate(-1deg) !important;
    }

    .collage-item.item-6 {
        transform: rotate(1deg) !important;
    }

    .collage-item:hover {
        transform: scale(1.03) rotate(0deg) !important;
        z-index: 10;
    }

    .collage-img {
        aspect-ratio: 3/4;
        object-fit: cover;
        border-radius: 2px;
    }
}

/* RSVP Section */
.rsvp-section {
    background-color: white;
}

.rsvp-desc {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-color);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-family: var(--heading-font);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--body-font);
    font-size: 1rem;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(178, 172, 136, 0.3);
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-family: var(--heading-font);
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #9A9573;
    /* Darker sage */
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    background-color: var(--text-color);
    color: white;
    font-size: 0.9rem;
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .navbar {
        flex-wrap: wrap;
        padding: 1rem 1.5rem;
        justify-content: space-between;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        margin-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.1rem;
    }

    .main-title {
        font-size: 3rem;
    }

    .sub-title {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .date {
        font-size: 1.5rem;
    }

    /* Fix hero image on mobile - critical fix */
    .hero {
        background-attachment: scroll;
        background-position: center center;
        background-size: cover;
        min-height: 100vh;
        height: auto;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .info-item h3 {
        font-size: 1.4rem;
    }

    .rsvp-form {
        padding: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.8rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .main-title {
        font-size: 2.5rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .gallery-slide {
        height: 280px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}

.map-container {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Form Row for multiple inputs */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 5px 15px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: var(--secondary-color);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-nav:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: var(--heading-font);
    font-size: 1rem;
    letter-spacing: 2px;
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
    .lightbox-content img {
        max-width: 95vw;
        max-height: 80vh;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: -40px;
        right: -5px;
        font-size: 2rem;
    }

    .lightbox-counter {
        bottom: -35px;
    }
}

/* =========================================
   Welcome Overlay - Romantic Gatefold
   ========================================= */
.gatefold-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    background: transparent;
    transition: visibility 1.5s linear 0s;
    /* Prevent scroll gestures on mobile */
    touch-action: none;
    -webkit-overflow-scrolling: auto;
}

.gatefold-overlay.hidden {
    visibility: hidden;
    pointer-events: none;
}

/* =========================================
   Floating Hearts Animation
   ========================================= */
.floating-hearts {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.heart {
    position: absolute;
    color: #e8b4b8;
    font-size: 1.5rem;
    opacity: 0;
    animation: floatHeart 8s infinite ease-in-out;
}

.heart-1 { left: 5%; animation-delay: 0s; font-size: 1.2rem; color: #f5d0d3; }
.heart-2 { left: 15%; animation-delay: 1.5s; font-size: 1rem; color: #e8b4b8; }
.heart-3 { left: 25%; animation-delay: 3s; font-size: 1.8rem; color: #d4a5a5; }
.heart-4 { left: 45%; animation-delay: 0.5s; font-size: 1.4rem; color: #f0c6c6; }
.heart-5 { left: 65%; animation-delay: 2s; font-size: 1.1rem; color: #e8b4b8; }
.heart-6 { left: 75%; animation-delay: 4s; font-size: 1.6rem; color: #f5d0d3; }
.heart-7 { left: 85%; animation-delay: 1s; font-size: 1.3rem; color: #d4a5a5; }
.heart-8 { left: 95%; animation-delay: 2.5s; font-size: 1rem; color: #f0c6c6; }

@keyframes floatHeart {
    0% {
        opacity: 0;
        transform: translateY(100vh) rotate(0deg) scale(0.5);
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) rotate(360deg) scale(1);
    }
}

/* Falling Petals */
.petal {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(ellipse at center, #ffccd5 0%, #f8b4bc 50%, transparent 70%);
    border-radius: 50% 0 50% 50%;
    opacity: 0;
    animation: fallPetal 12s infinite ease-in-out;
}

.petal-1 { left: 10%; animation-delay: 0s; width: 12px; height: 12px; }
.petal-2 { left: 30%; animation-delay: 2s; width: 18px; height: 18px; }
.petal-3 { left: 50%; animation-delay: 4s; width: 14px; height: 14px; }
.petal-4 { left: 70%; animation-delay: 1s; width: 16px; height: 16px; }
.petal-5 { left: 85%; animation-delay: 3s; width: 13px; height: 13px; }
.petal-6 { left: 20%; animation-delay: 5s; width: 17px; height: 17px; }

@keyframes fallPetal {
    0% {
        opacity: 0;
        transform: translateY(-10vh) rotate(0deg) translateX(0);
    }
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(30px);
    }
    90% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
        transform: translateY(110vh) rotate(360deg) translateX(-20px);
    }
}

/* Hide floating elements when opened */
.gatefold-overlay.opened .floating-hearts {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* =========================================
   The Gates (Left and Right Panels)
   ========================================= */
.gate-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #fdf8f5 0%, #fef6f2 50%, #fff9f7 100%);
    background-image:
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    z-index: 10;
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
}

.left-panel {
    left: 0;
    border-right: 1px solid rgba(212, 175, 55, 0.15);
    justify-content: flex-end;
}

.right-panel {
    right: 0;
    border-left: 1px solid rgba(212, 175, 55, 0.15);
    justify-content: flex-start;
}

/* Soft romantic overlay on panels */
.gate-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 220, 220, 0.1) 0%,
        transparent 30%,
        transparent 70%,
        rgba(255, 220, 220, 0.1) 100%
    );
    pointer-events: none;
}

/* =========================================
   Decorative Elements
   ========================================= */
.panel-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.decorative-corner {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px solid #D4AF37;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.decorative-corner::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #D4AF37;
    border-radius: 50%;
    opacity: 0.6;
}

.top-left {
    top: 30px;
    left: 30px;
    border-right: none;
    border-bottom: none;
}
.top-left::before { top: -4px; left: -4px; }

.bottom-left {
    bottom: 30px;
    left: 30px;
    border-right: none;
    border-top: none;
}
.bottom-left::before { bottom: -4px; left: -4px; }

.top-right {
    top: 30px;
    right: 30px;
    border-left: none;
    border-bottom: none;
}
.top-right::before { top: -4px; right: -4px; }

.bottom-right {
    bottom: 30px;
    right: 30px;
    border-left: none;
    border-top: none;
}
.bottom-right::before { bottom: -4px; right: -4px; }

/* Floral Flourishes */
.floral-flourish {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 200px;
    color: #D4AF37;
    opacity: 0.3;
}

.left-flourish {
    right: 40px;
}

.right-flourish {
    left: 40px;
}

.flourish-svg {
    width: 100%;
    height: 100%;
}

/* =========================================
   OPEN STATE Animation
   ========================================= */
.gatefold-overlay.opened .left-panel {
    transform: translateX(-100%);
}

.gatefold-overlay.opened .right-panel {
    transform: translateX(100%);
}

/* =========================================
   Central Content - Romantic Typography
   ========================================= */
.intro-content {
    position: relative;
    z-index: 20;
    text-align: center;
    color: #4A4A4A;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gatefold-overlay.opened .intro-content {
    opacity: 0;
    transform: scale(1.15);
    pointer-events: none;
}

.romantic-frame {
    position: relative;
    padding: 2rem;
}

.intro-subtitle {
    font-family: var(--heading-font);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: #b8a080;
    margin-bottom: 0.8rem;
    animation: fadeInDown 1.2s ease-out;
}

.intro-title {
    font-family: var(--accent-font);
    font-size: 5rem;
    margin-bottom: 0.8rem;
    color: #5a4a3a;
    line-height: 1.2;
    animation: fadeInUp 1.4s ease-out;
}

.name-glow {
    position: relative;
    display: inline-block;
    text-shadow:
        0 0 20px rgba(212, 175, 55, 0.3),
        0 2px 10px rgba(0, 0, 0, 0.1);
    animation: gentleGlow 3s infinite ease-in-out;
}

@keyframes gentleGlow {
    0%, 100% {
        text-shadow:
            0 0 20px rgba(212, 175, 55, 0.2),
            0 2px 10px rgba(0, 0, 0, 0.1);
    }
    50% {
        text-shadow:
            0 0 30px rgba(212, 175, 55, 0.4),
            0 0 40px rgba(232, 180, 184, 0.3),
            0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

.intro-title .amp {
    font-family: var(--heading-font);
    font-size: 2.8rem;
    font-style: italic;
    color: #D4AF37;
    margin: 0 15px;
    vertical-align: middle;
    animation: pulse-amp 2s infinite ease-in-out;
}

@keyframes pulse-amp {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.intro-date {
    font-family: var(--heading-font);
    font-size: 1.4rem;
    letter-spacing: 4px;
    color: #8a7a6a;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    animation: fadeInUp 1.6s ease-out;
}

.intro-date::before,
.intro-date::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

.intro-date::before {
    right: 100%;
    margin-right: 15px;
}

.intro-date::after {
    left: 100%;
    margin-left: 15px;
}

/* Romantic Quote */
.romantic-quote {
    font-family: var(--accent-font);
    font-size: 1.3rem;
    color: #c9a88a;
    font-style: italic;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeIn 2s ease-out 0.5s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.9; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Wax Seal Button with Sparkles
   ========================================= */
.wax-seal-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}

.sparkle-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.3), transparent) border-box;
    animation: rotateRing 4s linear infinite;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wax-seal-button {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #FFE4B5, #DAA520, #B8860B, #8B6914);
    border: none;
    cursor: pointer;
    box-shadow:
        0 6px 20px rgba(139, 105, 20, 0.4),
        inset 0 3px 8px rgba(255, 255, 255, 0.5),
        inset 0 -3px 8px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    animation: pulse-seal 3s infinite ease-in-out;
    position: relative;
    z-index: 2;
}

.wax-seal-button:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow:
        0 10px 30px rgba(139, 105, 20, 0.5),
        inset 0 3px 8px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(212, 175, 55, 0.4);
}

.seal-text {
    font-family: var(--heading-font);
    font-size: 1.1rem;
    color: #5a3d0a;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    line-height: 1;
}

/* Sparkle Effects */
.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #fff 0%, #FFD700 50%, transparent 70%);
    border-radius: 50%;
    animation: sparkleFloat 2s infinite ease-in-out;
}

.sparkle-1 { top: -15px; left: 50%; animation-delay: 0s; }
.sparkle-2 { top: 50%; right: -15px; animation-delay: 0.5s; }
.sparkle-3 { bottom: -15px; left: 50%; animation-delay: 1s; }
.sparkle-4 { top: 50%; left: -15px; animation-delay: 1.5s; }

@keyframes sparkleFloat {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Click Instruction Text */
.click-instruction {
    margin-top: 2rem;
    font-family: var(--body-font);
    font-size: 1rem;
    color: #8a7a6a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: fadeInUp 1.8s ease-out, bounce-hint 2s infinite ease-in-out 2s;
}

.tap-icon {
    font-size: 1.3rem;
    animation: tap-bounce 1.5s infinite ease-in-out;
}

@keyframes tap-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes bounce-hint {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes pulse-seal {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 6px 20px rgba(139, 105, 20, 0.4),
            inset 0 3px 8px rgba(255, 255, 255, 0.5),
            inset 0 -3px 8px rgba(0, 0, 0, 0.2),
            0 0 0 4px rgba(212, 175, 55, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 8px 25px rgba(139, 105, 20, 0.5),
            inset 0 3px 8px rgba(255, 255, 255, 0.5),
            inset 0 -3px 8px rgba(0, 0, 0, 0.2),
            0 0 0 6px rgba(212, 175, 55, 0.3),
            0 0 30px rgba(212, 175, 55, 0.2);
    }
}

/* =========================================
   Mobile Adjustments - Romantic Theme
   ========================================= */
@media (max-width: 768px) {
    .intro-title {
        font-size: 3.2rem;
        line-height: 1.3;
    }

    .intro-title .amp {
        font-size: 1.8rem;
        display: block;
        margin: 0.3rem 0;
    }

    .intro-subtitle {
        font-size: 0.75rem;
        letter-spacing: 4px;
    }

    .intro-date {
        font-size: 1rem;
        margin-bottom: 0.8rem;
        letter-spacing: 3px;
    }

    .intro-date::before,
    .intro-date::after {
        width: 25px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .romantic-quote {
        font-size: 1rem;
        padding: 0 1.5rem;
        margin-bottom: 1.5rem;
    }

    .romantic-frame {
        padding: 1rem;
    }

    /* Convert Left/Right Gates to Top/Bottom Gates on Mobile */
    .gate-panel {
        width: 100%;
        height: 50%;
        transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    /* Top Panel (was Left) */
    .left-panel {
        top: 0;
        left: 0;
        bottom: auto;
        right: auto;
        border-right: none;
        border-bottom: 1px solid rgba(212, 175, 55, 0.15);
        padding-bottom: 0;
        align-items: flex-end;
        justify-content: center;
    }

    /* Bottom Panel (was Right) */
    .right-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: auto;
        border-left: none;
        border-top: 1px solid rgba(212, 175, 55, 0.15);
        padding-top: 0;
        align-items: flex-start;
        justify-content: center;
    }

    /* Mobile Opening Animation: Slide Up/Down */
    .gatefold-overlay.opened .left-panel {
        transform: translateY(-100%);
    }

    .gatefold-overlay.opened .right-panel {
        transform: translateY(100%);
    }

    .wax-seal-button {
        width: 75px;
        height: 75px;
    }

    .seal-text {
        font-size: 0.9rem;
    }

    .click-instruction {
        margin-top: 1.5rem;
        font-size: 0.9rem;
    }

    .tap-icon {
        font-size: 1.1rem;
    }

    .sparkle-ring {
        width: 100px;
        height: 100px;
    }

    /* Adjust decorative corners for mobile */
    .decorative-corner {
        width: 80px;
        height: 80px;
    }

    .top-left, .bottom-left {
        left: 15px;
    }

    .top-right, .bottom-right {
        right: 15px;
    }

    .top-left, .top-right {
        top: 15px;
        border-bottom: none;
    }

    .bottom-left, .bottom-right {
        bottom: 15px;
        border-top: none;
    }

    /* Hide flourishes on mobile for cleaner look */
    .floral-flourish {
        display: none;
    }

    /* Reduce floating elements on mobile for performance */
    .heart-3, .heart-6, .heart-8 {
        display: none;
    }

    .petal-3, .petal-5 {
        display: none;
    }

    .heart {
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .intro-title {
        font-size: 2.6rem;
    }

    .intro-title .amp {
        font-size: 1.5rem;
    }

    .romantic-quote {
        font-size: 0.9rem;
    }

    .wax-seal-button {
        width: 65px;
        height: 65px;
    }

    .seal-text {
        font-size: 0.8rem;
    }

    .sparkle-ring {
        width: 85px;
        height: 85px;
    }

    .click-instruction {
        margin-top: 1rem;
        font-size: 0.8rem;
    }
}

/* Music Control Button */
.music-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    cursor: pointer;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    background-color: var(--secondary-color);
}

.music-btn.playing {
    animation: pulse 0.5s infinite;
}

.music-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.music-icon svg {
    width: 100%;
    height: 100%;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 4px 25px rgba(178, 172, 136, 0.6);
    }
}

/* Mobile adjustment for music button */
@media (max-width: 768px) {
    .music-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .music-icon {
        width: 20px;
        height: 20px;
    }
}