:root {
    --color-olive-dark: #475026;
    --color-olive-hover: #3b431e;
    --color-cream-bg: #FAF7F2;
    --color-card-bg: #FFFFFF;
    --color-text-dark: #2C301B;
    --color-gold-accent: #C5A059;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-script: 'Great Vibes', cursive;
    --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--color-cream-bg);
    color: var(--color-text-dark);
}

/* Landing Page (Image 1) */
.landing-body {
    background-color: var(--color-olive-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

#petalsCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.landing-container {
    z-index: 2;
    padding: 20px;
    width: 100%;
    max-width: 440px;
}

.invitation-card {
    background-color: var(--color-cream-bg);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.corner-flower-img {
    position: absolute;
    width: 130px;
    max-width: 40%;
    height: auto;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
}

.corner-flower-img.top-left {
    top: 0;
    left: 0;
}

.corner-flower-img.bottom-right {
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}

.heart-badge-circle {
    width: 48px;
    height: 48px;
    background-color: var(--color-olive-dark);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.couple-names {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--color-olive-dark);
    margin: 10px 0;
    font-weight: 500;
    line-height: 1.2;
}

.couple-names .ampersand {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--color-olive-dark);
}

.card-divider {
    margin: 15px 0;
    color: var(--color-olive-dark);
}

.wedding-date-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
}

.cordially-invites {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 25px;
}

.btn-olive-pill {
    background-color: var(--color-olive-dark);
    color: white;
    border: none;
    padding: 12px 38px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-olive-pill:hover {
    background-color: var(--color-olive-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(71, 80, 38, 0.4);
}

.btn-olive-pill.large {
    padding: 14px 44px;
    font-size: 1.05rem;
    letter-spacing: 1px;
}

.btn-olive-pill.full-width {
    width: 100%;
}

/* Floating Audio Control */
.audio-control-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Floating Auto Scroll Control (Bottom-Left Pill) */
.autoscroll-control-floating {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.autoscroll-btn {
    background: var(--color-olive-dark);
    color: #FAF7F2;
    border: 2px solid #FAF7F2;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(71, 80, 38, 0.35);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    outline: none;
}

.autoscroll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(71, 80, 38, 0.5);
}

.autoscroll-btn.active {
    background: #3B431E;
    box-shadow: 0 0 16px rgba(71, 80, 38, 0.6);
}


.audio-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-olive-dark);
    color: white;
    border: 2px solid #FAF7F2;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(71, 80, 38, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(71, 80, 38, 0.5);
}

.audio-btn:active {
    transform: scale(0.92);
}

/* Expanding Radar Pulse Rings (active when playing) */
.pulse-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--color-olive-dark);
    opacity: 0;
    pointer-events: none;
}

.audio-btn.playing .pulse-ring {
    animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.audio-btn.playing .pulse-ring.delay {
    animation-delay: 1s;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Idle Breathing Animation when paused */
.audio-btn:not(.playing) {
    animation: idle-breath 3s infinite ease-in-out;
}

@keyframes idle-breath {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 16px rgba(71, 80, 38, 0.3);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 8px 22px rgba(71, 80, 38, 0.5);
    }
}

/* SVG Equalizer Icon & Bar Bouncing */
.audio-icon-wrap {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.eq-svg {
    width: 100%;
    height: 100%;
    color: #FAF7F2;
}

.eq-bar {
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

/* Equalizer Bouncing Keyframes (Playing state) */
.audio-btn.playing .eq-bar.bar1 {
    animation: eq-bounce 0.8s infinite ease-in-out alternate;
}
.audio-btn.playing .eq-bar.bar2 {
    animation: eq-bounce 0.6s infinite 0.2s ease-in-out alternate;
}
.audio-btn.playing .eq-bar.bar3 {
    animation: eq-bounce 0.9s infinite 0.1s ease-in-out alternate;
}
.audio-btn.playing .eq-bar.bar4 {
    animation: eq-bounce 0.7s infinite 0.3s ease-in-out alternate;
}

@keyframes eq-bounce {
    0% {
        transform: scaleY(0.3);
    }
    100% {
        transform: scaleY(1.1);
    }
}

/* Paused state equalizer bars remain still */
.audio-btn:not(.playing) .eq-bar {
    transform: scaleY(0.4);
    opacity: 0.7;
}

/* Tooltip Hover Label */
.audio-tooltip {
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--color-olive-dark);
    color: #FAF7F2;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.audio-btn:hover .audio-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Invitation Layout (Image 2 & 3) */
.invitation-wrapper {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.05);
    padding-bottom: 50px;
}

.arch-header-section {
    background-size: 100% 100%;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: var(--color-cream-bg);
    width: 100%;
    aspect-ratio: 4 / 5.8;
    min-height: 520px;
    padding: 0px 40px 100px 40px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.arch-frame {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 320px;
    text-align: center;
    margin-bottom: 10%;
}

.arch-subtitle {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: #7A8A5C;
    margin-bottom: 15%;
    text-transform: uppercase;
    font-weight: 500;
}

.arch-names {
    font-family: var(--font-script);
    font-size: 3.2rem;
    color: #3B431E;
    margin: 15px 0;
    margin-top: 20px;
    font-weight: 400;
    line-height: 1.1;
}

.arch-ampersand {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: #3B431E;
    display: block;
    margin: 4px 0;
}

.arch-bouquet {
    display: none;
}

/* Announcement & Dates */
.announcement-section {
    text-align: center;
    padding: 50px 20px;
    background-color: var(--color-cream-bg);
    position: relative;
    overflow: hidden;
}

.announcement-section > * {
    position: relative;
    z-index: 2;
}

.announcement-flower {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
    height: auto;
}

.announcement-flower.top-right {
    top: -20px;
    right: -40px;
    width: 200px;
    transform: rotate(-15deg);
}

.announcement-flower.middle-left {
    top: 35%;
    left: -50px;
    width: 220px;
    transform: scaleX(-1) rotate(10deg);
}

.announcement-flower.bottom-right {
    bottom: 20px;
    right: -30px;
    width: 180px;
    transform: rotate(20deg);
}

.event-tag {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 6px;
}

.joyful-announcement {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--color-olive-dark);
    font-weight: 600;
    margin-bottom: 15px;
}

.couple-titles {
    font-size: 0.9rem;
    color: #555;
}

.section-couple-names {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--color-olive-dark);
    margin: 20px 0;
    font-weight: 500;
}

.reception-info-box {
    margin: 30px 0;
}

.reception-label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #777;
}

.reception-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-olive-dark);
    margin: 6px 0 15px 0;
}

.time-display {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-olive-dark);
    margin-bottom: 15px;
}

.date-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-olive-dark);
    letter-spacing: 1px;
}

.year-display {
    font-size: 1.1rem;
    color: #666;
    margin-top: 10px;
}

/* Countdown Widget */
.countdown-widget {
    background: #FAF7F2;
    border-radius: 12px;
    padding: 15px;
    margin: 25px auto;
    max-width: 340px;
}

.countdown-title {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer-digits {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-olive-dark);
}

/* Calendar Card */
.calendar-card {
    border: 1px solid #E2DCC8;
    border-radius: 12px;
    padding: 15px;
    max-width: 320px;
    margin: 25px auto;
    background: #FFF;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.calendar-header {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-olive-dark);
    margin-bottom: 12px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
    font-size: 0.85rem;
}

.calendar-day {
    padding: 6px;
    border-radius: 50%;
    color: #444;
}

.calendar-day.selected-event {
    background-color: var(--color-olive-dark);
    color: white;
    font-weight: bold;
    position: relative;
}

.calendar-day.selected-event::after {
    content: "❤️";
    font-size: 9px;
    position: absolute;
    bottom: -1px;
    right: 1px;
}

.action-bar {
    margin-top: 25px;
}

.calendar-link {
    color: var(--color-olive-dark);
    font-size: 0.85rem;
    text-decoration: underline;
    display: inline-block;
    margin-bottom: 15px;
}

/* Venue Section (Image 3) */
.venue-section {
    padding: 30px 20px;
    text-align: center;
    background-color: #FAF7F2;
}

.venue-title {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--color-olive-dark);
    margin-bottom: 8px;
}

.venue-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    margin-bottom: 15px;
}

.directions-link {
    color: var(--color-olive-dark);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-block;
    margin-top: 10px;
}

/* Guestbook Section */
.guestbook-section {
    padding: 40px 20px;
    text-align: center;
    background-color: var(--color-cream-bg);
}

.guestbook-header {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--color-olive-dark);
    margin-bottom: 20px;
}

.guestbook-card {
    background: #FAF7F2;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #E2DCC8;
}

.guestbook-input, .guestbook-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #D8D2C2;
    border-radius: 8px;
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 0.9rem;
}

.send-wish-btn {
    width: 100%;
}

.footer-blessings {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-olive-dark);
    margin-top: 35px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px 24px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    border: none;
    background: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #888;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 8px 0 4px 0;
    color: var(--color-olive-dark);
}

.modal-header p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #DDD;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.modal-alert {
    padding: 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    text-align: center;
}

.modal-alert.success {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.modal-alert.error {
    background-color: #FFEBEE;
    color: #C62828;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
}