/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* make viewport math stable on mobile toolbars */
html {
    height: 100%;
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: #fff;
    margin: 0;
    padding: 0;
    height: 100%;
}

/* Scroll snap disabled - causing half-scroll issues */

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-prompt {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    z-index: 100;
    animation: pulse 2s infinite;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: none; /* Hidden by default, shown only if autoplay blocked */
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 5px 30px rgba(224, 175, 255, 0.6);
    }
}

/* Mobile splash screen improvements */
@media screen and (max-width: 768px) {
    .splash-video {
        object-fit: contain; /* Better fit for mobile aspect ratios */
        object-position: center;
    }
    
    .audio-prompt {
        bottom: 20px;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        max-width: 90%;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .audio-prompt {
        bottom: 15px;
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}


.splash-content {
    text-align: center;
    animation: splashContentIn 0.8s ease-out;
}

@keyframes splashContentIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ganesha-animation {
    width: 250px;
    height: 250px;
    margin: 0 auto 2rem;
}

.ganesha-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
}

/* Base: keep strokes crisp and rounded */
.ganesha-part {
    fill: none;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Let OM fade in instead of stroke-draw */
.ganesha-om {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 0;
    animation: omIn .3s ease-out 3.2s forwards;
}

@keyframes omIn {
    to { opacity: 1; }
}

/* Sequential drawing animation for each part */
.ganesha-crown {
    animation: drawPart 0.3s ease-out 0s forwards;
}

.ganesha-head {
    animation: drawPart 0.4s ease-out 0.3s forwards;
}

.ganesha-ear-left {
    animation: drawPart 0.3s ease-out 0.7s forwards;
}

.ganesha-ear-right {
    animation: drawPart 0.3s ease-out 0.7s forwards;
}

.ganesha-trunk {
    animation: drawPart 0.4s ease-out 1s forwards;
}

.ganesha-eye-left {
    animation: drawPart 0.2s ease-out 1.4s forwards;
}

.ganesha-eye-right {
    animation: drawPart 0.2s ease-out 1.4s forwards;
}

.ganesha-tilak {
    animation: drawPart 0.2s ease-out 1.6s forwards;
}

.ganesha-tusk-left {
    animation: drawPart 0.2s ease-out 1.8s forwards;
}

.ganesha-tusk-right {
    animation: drawPart 0.2s ease-out 1.8s forwards;
}

.ganesha-body {
    animation: drawPart 0.3s ease-out 2s forwards;
}

.ganesha-belly {
    animation: drawPart 0.3s ease-out 2.3s forwards;
}

.ganesha-arm-left-upper {
    animation: drawPart 0.2s ease-out 2.6s forwards;
}

.ganesha-arm-left-lower {
    animation: drawPart 0.2s ease-out 2.8s forwards;
}

.ganesha-arm-right-upper {
    animation: drawPart 0.2s ease-out 2.6s forwards;
}

.ganesha-arm-right-lower {
    animation: drawPart 0.2s ease-out 2.8s forwards;
}

.ganesha-thread {
    animation: drawPart 0.2s ease-out 3s forwards;
}

.ganesha-om {
    animation: drawPart 0.3s ease-out 3.2s forwards;
}

.ganesha-lotus {
    animation: drawPart 0.3s ease-out 3.5s forwards;
}

@keyframes drawPart {
    to {
        stroke-dashoffset: 0;
    }
}

/* Glow effect after drawing completes */
.ganesha-drawing {
    animation: ganeshaGlow 2s ease-in-out 3.5s infinite;
}

@keyframes ganeshaGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
    }
}

.initials-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.initial {
    font-size: 5rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Dancing Script', cursive;
    animation: initialFloat 2s ease-in-out infinite;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.initial:first-child {
    animation-delay: 0s;
}

.initial:last-child {
    animation-delay: 0.2s;
}

.ampersand {
    font-size: 4rem;
    color: #ffffff;
    font-family: 'Dancing Script', cursive;
    opacity: 0.9;
}

@keyframes initialFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.splash-text {
    margin-top: 2rem;
}

.splash-text .sanskrit {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.splash-text .english {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2rem;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

main {
    margin: 0;
    padding: 0;
}

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

/* === CSS Variables for Dynamic Colors === */
:root {
    --nav-ink: rgba(255,255,255,.92);
    --nav-ink-dim: rgba(255,255,255,.7);
    --nav-border: rgba(255,255,255,.08);
    --accent: #ffd166;
}

/* If <nav> remains in the DOM, hide it completely */
.navbar { display: none !important; }

/* === Top brand strip === */
.top-brand {
    position: fixed;
    inset: 0 0 auto 0;
    height: clamp(54px, 8vh, 68px);
    z-index: 4000;
    background: var(--hero-gradient, transparent); /* bleed */
    /* fade the very top edge so it disappears into the page */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.6) 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.6) 70%, transparent 100%);
    border: 0;
    box-shadow: none;
}

.top-brand-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the logo */
    padding: 0 clamp(12px, 4vw, 28px);
}

.top-logo-link {
    display: inline-flex;
    align-items: center;
    pointer-events: auto;
}

.top-logo {
    width: clamp(60px, 4.8vw, 71px); /* 5px bigger */
    height: clamp(60px, 4.8vw, 71px); /* 5px bigger */
    border-radius: 50%; /* force circular */
    object-fit: cover;
    /* subtle ring and depth that adapt to gradient */
    box-shadow:
        0 2px 16px rgba(0,0,0,.25),
        0 0 0 2px rgba(255,255,255,.15);
}

/* No top padding needed since logo is removed */
.hero {
    padding-top: 0 !important;
}

/* === Full-width hero navigation bar === */
.hero-nav {
    position: absolute;
    top: clamp(40px, 10vh, 14vh);
    left: 0;
    right: 0;
    z-index: 4;
    pointer-events: auto;
}

.hero-nav-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 30px);
    display: grid;
    grid-template-columns: 200px 1fr auto;
    align-items: center;
    gap: 0.5rem;
}

/* Left: Brand Title */
.hero-nav-left {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo-gif {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-planet-gif {
    width: 18px;
    height: 18px;
    object-fit: cover;
    margin-left: 0.2rem;
    vertical-align: middle;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.brand-link:hover {
    transform: scale(1.02);
}

.hero-nav-left .brand-title {
    margin: 0;
    font-family: 'Dancing Script', cursive;
    font-size: clamp(14px, 2vw, 20px);
    line-height: 1;
    letter-spacing: .2px;
    color: #fff;
    text-shadow:
        0 2px 26px rgba(0,0,0,.32),
        0 8px 50px rgba(0,0,0,.22);
    white-space: nowrap;
}

/* Brand Title in Hero Section */
.brand-title-hero {
    position: absolute;
    top: clamp(20px, 3vh, 40px);
    left: clamp(20px, 3vw, 40px);
    z-index: 10;
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #B65FCF;
    pointer-events: none;
}

/* Center: Nav Links */
.hero-nav-center {
    justify-self: center;
}

.hero-nav-list {
    display: flex;
    gap: clamp(8px, 1.5vw, 18px);
    margin: 0;
    padding: 0;
    list-style: none;
    
    /* fully transparent - no background */
    background: transparent;
    border: none;
}

.hero-nav-link {
    display: inline-block;
    padding: .4rem .7rem;
    font-weight: 700;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    letter-spacing: .2px;
    text-decoration: none;
    color: #fff;
    opacity: 1;
    border-radius: 999px;
    transition: opacity .2s ease, background .25s ease, color .2s ease, transform .15s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.hero-nav-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* Active link - no background, just opacity */
.hero-nav-link.is-active {
    opacity: 1;
    color: #fff;
}

/* Right: Invite Code / Logout Button */
.hero-nav-right {
    justify-self: end;
}

.hero-nav-right .invite-code-btn {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(6px);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block !important; /* Force visibility */
}

.hero-nav-right .invite-code-btn:hover {
    background: rgba(255,255,255,.18);
    transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    background: transparent;
    border: none;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: block;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile responsive */
@media (max-width: 968px) {
    .hero-nav-inner {
        grid-template-columns: 1fr auto;
        gap: 1rem;
        position: relative;
    }
    
    .hero-nav-left {
        justify-self: start;
    }
    
    .hero-nav-center {
        position: static;
        display: flex;
        align-items: center;
        justify-self: end;
    }
    
    .hero-nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(182, 95, 207, 0.98);
        backdrop-filter: blur(10px);
        border-radius: 0 0 15px 15px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
    }
    
    .hero-nav-center.mobile-menu-open .hero-nav-list {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hero-nav-right {
        justify-self: end;
        display: none;
    }
    
    .hero-nav-list li {
        width: 100%;
    }
    
    .hero-nav-link {
        display: block;
        padding: 1rem 2rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1.1rem;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        position: relative;
        z-index: 1001;
    }
    
    .hero-nav-list .mobile-only-item {
        display: block;
    }
    
    .hero-nav-list .mobile-only-item .hero-nav-link,
    .hero-nav-list .mobile-only-item button {
        width: 100%;
        text-align: left;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        padding: 1rem 2rem;
        color: white;
        font-size: 1.1rem;
        font-weight: 700;
        cursor: pointer;
    }
}


.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: .9rem 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
}

.nav-left {
    justify-self: start;
}

.nav-center {
    justify-self: center;
}

.nav-right {
    justify-self: end;
}

/* === Logo: spinning planet that inherits accent/background === */
.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: 'Dancing Script', cursive;
    font-size: 1.85rem;
    font-weight: 700;
    text-decoration: none;
    text-shadow: none;
    color: var(--nav-ink);
    transition: all 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.logo-orb {
    width: 1.1em;
    height: 1.1em;
    border-radius: 50%;
    display: inline-block;
    background:
        radial-gradient(60% 60% at 35% 35%, rgba(255,255,255,.85), rgba(255,255,255,0) 60%),
        conic-gradient(from 0deg at 50% 50%, var(--accent), rgba(255,255,255,.15), var(--accent));
    box-shadow:
        0 0 10px color-mix(in oklab, var(--accent) 40%, transparent),
        inset 0 0 10px rgba(0,0,0,.35);
    animation: orbSpin 6s linear infinite;
}

@keyframes orbSpin {
    to { transform: rotate(360deg); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--nav-ink);
    font-weight: 500;
    font-size: .95rem;
    padding: .35rem 0;
    transition: opacity .2s ease, color .2s ease;
    opacity: .9;
    position: relative;
}

.nav-link:hover {
    opacity: 1;
}

.nav-link.active {
    opacity: 1;
    font-weight: 600;
}

.nav-link.active::after {
    display: none !important;
}

.invite-code-btn {
    background: rgba(255,255,255,.12);
    color: var(--nav-ink);
    border: 1px solid var(--nav-border);
    backdrop-filter: blur(6px);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.invite-code-btn:hover {
    background: rgba(255,255,255,.18);
    transform: translateY(-1px);
}

.invite-code-btn svg {
    width: 18px;
    height: 18px;
}

/* Solid style after scrolling past hero */
.navbar.solid {
    background: rgba(255,255,255,.82) !important;
    -webkit-backdrop-filter: blur(10px) saturate(140%) !important;
    backdrop-filter: blur(10px) saturate(140%) !important;
    border-bottom: 1px solid rgba(0,0,0,.06) !important;
}

.navbar.solid .nav-link,
.navbar.solid .nav-logo {
    color: #0b0f1e;
}

.navbar.solid .invite-code-btn {
    background: rgba(11,15,30,.06);
    color: #0b0f1e;
    border-color: rgba(11,15,30,.08);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: currentColor;
    margin: 3px 0;
    transition: 0.3s;
    color: var(--nav-ink);
}

.navbar.solid .hamburger .bar {
    background: #0b0f1e;
}

/* Hero Banner Section - Full Screen with Single Image */
.hero-banner {
    height: 100vh;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

@supports (height: 100dvh) {
    .hero-banner {
        height: 100dvh;
        min-height: 100dvh;
    }
}

.banner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 90%;
    max-width: 800px;
}

.couple-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
}

.bride-name,
.groom-name {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: #B65FCF;
}

.couple-names .ampersand {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #B65FCF;
    opacity: 0.9;
}

.wedding-date-text {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 1px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
}

/* Scroll Down Arrow */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.arrow-container {
    animation: bounce 2s infinite;
}

.arrow {
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

.scroll-text {
    color: white;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-8px);
    }
}

/* Old hero styles kept for reference but not used */
.hero {
    display: none;
}

/* dark edges + light center glow */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 50% 30%, rgba(255,255,255,.12), transparent 55%),
        radial-gradient(140% 100% at 50% 120%, rgba(0,0,0,.45), transparent 55%);
    mix-blend-mode: multiply;
    z-index: 1;
}

/* Full-bleed slides (no card look) */
.carousel-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;  /* stretch to the hero's full height */
}

/* each slide occupies the whole hero area */
.card {
    position: absolute;
    inset: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.card.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

/* image fills hero; we'll fade its edges so it merges into the hero bg */
.card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    /* Tighter mask so edges don't read as "padding" */
    -webkit-mask-image: radial-gradient(140% 140% at 50% 52%, #000 74%, rgba(0,0,0,.85) 90%, transparent 100%);
    mask-image: radial-gradient(140% 140% at 50% 52%, #000 74%, rgba(0,0,0,.85) 90%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    /* optional: a touch of clarity so subjects pop */
    filter: contrast(1.05) saturate(1.05);
    transition: transform 10s ease;
}

/* subtle motion on the active slide for polish */
.card.active img {
    transform: scale(1.03);
}

.hero-content {
    flex: 1;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(30, 58, 138, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 1rem;
}

.wedding-date {
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
}

.hero-image {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.3);
    border: 5px solid rgba(255, 255, 255, 0.8);
}

/* Hearts Waterfall Container */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

/* Individual Heart Styling */
.heart {
    position: absolute;
    width: 15px;
    height: 15px;
    animation-name: fall;
    animation-timing-function: linear;
    animation-duration: 10s;
    animation-iteration-count: infinite;
    opacity: 0;
    transform-origin: center center;
}

.heart::before {
    content: '';
    position: absolute;
    top: -7.5px;
    left: 0;
    width: 15px;
    height: 15px;
    background-color: #7A4988;
    border-radius: 50%;
}

.heart::after {
    content: '';
    position: absolute;
    left: 7.5px;
    top: 0;
    width: 15px;
    height: 15px;
    background-color: #7A4988;
    border-radius: 50%;
}

.heart {
    background-color: #7A4988;
    transform: rotate(-45deg);
}

/* Falling Animation */
@keyframes fall {
    0% {
        transform: rotate(-45deg) translate3d(0, -100vh, 0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: rotate(-45deg) translate3d(0, 100vh, 0);
        opacity: 0;
    }
}

/* Variety in Hearts */
.heart:nth-child(2n) {
    animation-duration: 12s;
    background-color: #ff6b9d;
}

.heart:nth-child(2n)::before,
.heart:nth-child(2n)::after {
    background-color: #ff6b9d;
}

.heart:nth-child(3n) {
    animation-duration: 8s;
    background-color: #ffc0e0;
}

.heart:nth-child(3n)::before,
.heart:nth-child(3n)::after {
    background-color: #ffc0e0;
}

.heart:nth-child(4n) {
    animation-duration: 14s;
    background-color: #d090ff;
}

.heart:nth-child(4n)::before,
.heart:nth-child(4n)::after {
    background-color: #d090ff;
}

/* Countdown Section */
.countdown-section {
    padding: 80px 0;
    background: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}



.countdown-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background-image: url('Borders/lavender-border-bl.jpeg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom left;
    z-index: 10;
}

.countdown-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background-image: url('Borders/lavender-border-tr.jpeg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top right;
    z-index: 10;
}

@media screen and (max-width: 768px) {
    .countdown-section::before {
        width: 120px;
        height: 120px;
    }
    
    .countdown-section::after {
        width: 120px;
        height: 120px;
    }
}

@media screen and (max-width: 480px) {
    .countdown-section::after {
        width: 80px;
        height: 80px;
    }
}

/* Only apply scroll snap to countdown on desktop */
@media screen and (min-width: 769px) {
    .countdown-section {
        scroll-snap-align: start;
    }
}

.countdown-section h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #7A4988;
    margin-bottom: 3rem;
}



.flip-clock-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.flip-clock {
    text-align: center;
    perspective: 400px;
    margin: 20px auto;
}

.flip-clock *,
.flip-clock *:before,
.flip-clock *:after {
    box-sizing: border-box;
}

.flip-clock__piece {
    display: inline-block;
    margin: 0 5px;
}



.flip-clock__slot {
    font-size: 2vw;
    color: #7A4988;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.flip-clock__card {
    display: block;
    position: relative;
    padding-bottom: 0.72em;
    font-size: 5vw;
    line-height: 0.95;
}

.flip-clock__card .card__top,
.flip-clock__card .card__bottom,
.flip-clock__card .card__back::before,
.flip-clock__card .card__back::after {
    display: block;
    height: 0.72em;
    color: #ccc;
    background: #B65FCF;
    padding: 0.25em 0.25em;
    border-radius: 0.15em 0.15em 0 0;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    width: 1.8em;
    transform: translateZ(0);
}

.flip-clock__card .card__bottom {
    color: #FFF;
    position: absolute;
    top: 50%;
    left: 0;
    border-top: solid 1px #B65FCF;
    background: #B65FCF;
    border-radius: 0 0 0.15em 0.15em;
    pointer-events: none;
    overflow: hidden;
}

.flip-clock__card .card__bottom::after {
    display: block;
    margin-top: -0.72em;
}

.flip-clock__card .card__back::before,
.flip-clock__card .card__bottom::after {
    content: attr(data-value);
}

.flip-clock__card .card__back {
    position: absolute;
    top: 0;
    height: 100%;
    left: 0%;
    pointer-events: none;
}

.flip-clock__card .card__back::before {
    position: relative;
    z-index: -1;
    overflow: hidden;
}

.flip .flip-clock__card .card__back::before {
    animation: flipTop 0.3s cubic-bezier(.37,.01,.94,.35);
    animation-fill-mode: both;
    transform-origin: center bottom;
}

.flip .flip-clock__card .card__back .card__bottom {
    transform-origin: center top;
    animation-fill-mode: both;
    animation: flipBottom 0.6s cubic-bezier(.15,.45,.28,1);
}

@keyframes flipTop {
    0% {
        transform: rotateX(0deg);
        z-index: 2;
    }
    0%, 99% {
        opacity: 0.99;
    }
    100% {
        transform: rotateX(-90deg);
        opacity: 0;
    }
}

@keyframes flipBottom {
    0%, 50% {
        z-index: -1;
        transform: rotateX(90deg);
        opacity: 0;
    }
    51% {
        opacity: 0.99;
    }
    100% {
        opacity: 0.99;
        transform: rotateX(0deg);
        z-index: 5;
    }
}

@media screen and (max-width: 768px) {
    .flip-clock__card {
        font-size: 8vw;
    }
    
    .flip-clock__slot {
        font-size: 3vw;
    }
}

@media screen and (max-width: 480px) {
    .flip-clock__card {
        font-size: 10vw;
    }
    
    .flip-clock__slot {
        font-size: 4vw;
    }
    
    .flip-clock-container {
        gap: 10px;
    }
    
    .flip-clock__piece {
        margin: 0 2px;
    }
}

/* Live Stream Styles */
.live-stream-container {
    text-align: center;
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease forwards;
}

.live-stream-container h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #7A4988;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stream-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stream-wrapper::before {
    content: '';
    display: block;
    padding-top: 56.25%;
}

.stream-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.stream-message {
    font-size: 1.3rem;
    color: #7A4988;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stream-fallback {
    background: linear-gradient(135deg, #e6f0ff, #cce0ff);
    padding: 3rem 2rem;
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.2);
}

.stream-fallback h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: #7A4988;
    margin-bottom: 1rem;
}

.stream-fallback p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.refresh-btn {
    background: linear-gradient(135deg, #7A4988, #d090ff);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(224, 175, 255, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(224, 175, 255, 0.4);
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #7A4988;
    margin-bottom: 3rem;
}

.about-text h3 {
    font-family: cursive;
    font-size: 2rem;
    color: #7A4988;
    margin-bottom: 2rem;
    text-align: center;
}

.about-text h4 {
    font-family: system-ui;
    font-size: 2rem;
    font-weight: 600;
    color: #7A4988;
    margin: 2rem 0;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 
        0 0 5px rgba(224, 175, 255, 0.8),
        0 0 10px rgba(224, 175, 255, 0.6),
        0 0 15px rgba(224, 175, 255, 0.4),
        0 0 20px rgba(224, 175, 255, 0.3),
        0 0 35px rgba(224, 175, 255, 0.2);
    animation: glow 2s ease-in-out infinite alternate;
}

.about-text h4:hover {
    transform: translateY(-2px);
    text-shadow: 
        0 0 8px rgba(224, 175, 255, 1),
        0 0 15px rgba(224, 175, 255, 0.8),
        0 0 25px rgba(224, 175, 255, 0.6),
        0 0 35px rgba(224, 175, 255, 0.4),
        0 0 50px rgba(224, 175, 255, 0.3);
}

@keyframes glow {
    0% {
        text-shadow: 
            0 0 5px rgba(224, 175, 255, 0.8),
            0 0 10px rgba(224, 175, 255, 0.6),
            0 0 15px rgba(224, 175, 255, 0.4),
            0 0 20px rgba(224, 175, 255, 0.3),
            0 0 35px rgba(224, 175, 255, 0.2);
    }
    100% {
        text-shadow: 
            0 0 10px rgba(224, 175, 255, 1),
            0 0 20px rgba(224, 175, 255, 0.8),
            0 0 30px rgba(224, 175, 255, 0.6),
            0 0 40px rgba(224, 175, 255, 0.4),
            0 0 60px rgba(224, 175, 255, 0.3);
    }
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #666;
    text-align: justify;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Quick Info Section */
.quick-info {
    padding: 80px 0;
    background: #fff;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: #7A4988;
    margin-bottom: 1rem;
}

.info-card p {
    color: #666;
    margin-bottom: 0.5rem;
}

/* Blossoming Flowers Animation */
.flowers-garden {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: transparent;
    overflow: visible;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    perspective: 1000px;
    z-index: 10;
    margin: 0;
    padding: 0;
}

.flowers-garden .night {
    display: none;
}

.flowers-garden .flowers {
    position: relative;
    transform: scale(0.3);
}

.flowers-garden .flower {
    position: absolute;
    bottom: 10vmin;
    transform-origin: bottom center;
    z-index: 10;
}

.flowers-garden .flower--1 {
    animation: moving-flower-1 4s linear infinite;
}

.flowers-garden .flower--2 {
    left: 50%;
    transform: rotate(20deg);
    animation: moving-flower-2 4s linear infinite;
}

.flowers-garden .flower--3 {
    left: 50%;
    transform: rotate(-15deg);
    animation: moving-flower-3 4s linear infinite;
}

.flowers-garden .flower__leafs {
    position: relative;
    animation: blooming-flower 2s 0.8s backwards;
}

.flowers-garden .flower__leafs--2 {
    animation-delay: 1.1s;
}

.flowers-garden .flower__leafs--3 {
    animation-delay: 1.4s;
}

.flowers-garden .flower__leaf {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 8vmin;
    height: 11vmin;
    border-radius: 51% 49% 47% 53% / 44% 45% 55% 69%;
    background: linear-gradient(to top, #D8A7FF, #E0AFFF);
    transform-origin: bottom center;
    opacity: 0.9;
    box-shadow: inset 0 0 2vmin rgba(255, 255, 255, 0.5);
}

.flowers-garden .flower__leaf--1 {
    transform: translate(-10%, 1%) rotateY(40deg) rotateX(-50deg);
}

.flowers-garden .flower__leaf--2 {
    transform: translate(-50%, -4%) rotateX(40deg);
}

.flowers-garden .flower__leaf--3 {
    transform: translate(-90%, 0%) rotateY(45deg) rotateX(50deg);
}

.flowers-garden .flower__leaf--4 {
    width: 8vmin;
    height: 8vmin;
    transform-origin: bottom left;
    border-radius: 4vmin 10vmin 4vmin 4vmin;
    transform: translate(-0%, 18%) rotateX(70deg) rotate(-43deg);
    background: linear-gradient(to top, #C89FFF, #E0AFFF);
    z-index: 1;
    opacity: 0.8;
}

.flowers-garden .flower__white-circle {
    position: absolute;
    left: -3.5vmin;
    top: -3vmin;
    width: 9vmin;
    height: 4vmin;
    border-radius: 50%;
    background-color: #fff;
}

.flowers-garden .flower__line {
    height: 55vmin;
    width: 1.5vmin;
    background: linear-gradient(to top, transparent 10%, #B65FCF, #D8A7FF);
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);
    animation: grow-flower-tree 4s backwards;
}

.flowers-garden .flower__line__leaf {
    --w: 7vmin;
    --h: calc(var(--w) + 2vmin);
    position: absolute;
    top: 20%;
    left: 90%;
    width: var(--w);
    height: var(--h);
    border-top-right-radius: var(--h);
    border-bottom-left-radius: var(--h);
    background: linear-gradient(to top, rgba(182, 95, 207, 0.4), #D8A7FF);
}

.flowers-garden .flower__line__leaf--1 {
    transform: rotate(70deg) rotateY(30deg);
    animation: blooming-leaf-right 0.8s 1.6s backwards;
}

.flowers-garden .flower__line__leaf--2 {
    top: 45%;
    transform: rotate(70deg) rotateY(30deg);
    animation: blooming-leaf-right 0.8s 1.4s backwards;
}

.flowers-garden .flower__line__leaf--3,
.flowers-garden .flower__line__leaf--4 {
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: var(--h);
    border-bottom-right-radius: var(--h);
    left: -460%;
    top: 12%;
    transform: rotate(-70deg) rotateY(30deg);
}

.flowers-garden .flower__line__leaf--3 {
    animation: blooming-leaf-left 0.8s 1.2s backwards;
}

.flowers-garden .flower__line__leaf--4 {
    top: 40%;
    animation: blooming-leaf-left 0.8s 1s backwards;
}

.flowers-garden .flower__light {
    position: absolute;
    bottom: 0vmin;
    width: 1vmin;
    height: 1vmin;
    background-color: #FFCCFF;
    border-radius: 50%;
    filter: blur(0.2vmin);
    animation: light-ans 4s linear infinite backwards;
}

.flowers-garden .flower__light:nth-child(odd) {
    background-color: #E0AFFF;
}

.flowers-garden .flower__light--1 {
    left: -2vmin;
    animation-delay: 1s;
}

.flowers-garden .flower__light--2 {
    left: 3vmin;
    animation-delay: 0.5s;
}

.flowers-garden .flower__light--3 {
    left: -6vmin;
    animation-delay: 0.3s;
}

.flowers-garden .flower__light--4 {
    left: 6vmin;
    animation-delay: 0.9s;
}

.flowers-garden .flower__light--5 {
    left: -1vmin;
    animation-delay: 1.5s;
}

.flowers-garden .flower__light--6 {
    left: -4vmin;
    animation-delay: 3s;
}

.flowers-garden .flower__light--7 {
    left: 3vmin;
    animation-delay: 2s;
}

.flowers-garden .flower__light--8 {
    left: -6vmin;
    animation-delay: 3.5s;
}

@keyframes moving-flower-1 {
    0%, 100% {
        transform: rotate(2deg);
    }
    50% {
        transform: rotate(-2deg);
    }
}

@keyframes moving-flower-2 {
    0%, 100% {
        transform: rotate(18deg);
    }
    50% {
        transform: rotate(14deg);
    }
}

@keyframes moving-flower-3 {
    0%, 100% {
        transform: rotate(-18deg);
    }
    50% {
        transform: rotate(-20deg) rotateY(-10deg);
    }
}

@keyframes blooming-leaf-right {
    0% {
        transform-origin: left;
        transform: rotate(70deg) rotateY(30deg) scale(0);
    }
}

@keyframes blooming-leaf-left {
    0% {
        transform-origin: right;
        transform: rotate(-70deg) rotateY(30deg) scale(0);
    }
}

@keyframes grow-flower-tree {
    0% {
        height: 0;
        border-radius: 1vmin;
    }
}

@keyframes blooming-flower {
    0% {
        transform: scale(0);
    }
}

@keyframes light-ans {
    0% {
        opacity: 0;
        transform: translateY(0vmin);
    }
    25% {
        opacity: 1;
        transform: translateY(-5vmin) translateX(-2vmin);
    }
    50% {
        opacity: 1;
        transform: translateY(-15vmin) translateX(2vmin);
        filter: blur(0.2vmin);
    }
    75% {
        transform: translateY(-20vmin) translateX(-2vmin);
        filter: blur(0.2vmin);
    }
    100% {
        transform: translateY(-30vmin);
        opacity: 0;
        filter: blur(1vmin);
    }
}

.not-loaded * {
    animation-play-state: paused !important;
}

.footer {
    background: #B65FCF;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    margin: 0;
    position: relative;
}

.footer-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.footer .copyright {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.footer .made-with {
    margin: 0;
    font-size: 1rem;
    font-family: 'Dancing Script', cursive;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

/* Inline Heart Animation */
.made-with .heart {
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
    vertical-align: middle;
    transform: rotate(-45deg);
    background: #7A4988;
}

.made-with .heart::before,
.made-with .heart::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #7A4988;
    border-radius: 50%;
}

.made-with .heart::before {
    top: -9px;
    left: 0;
}

.made-with .heart::after {
    left: 9px;
    top: 0;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40%, 50%, 60%, 70% {
        transform: scale(1.1);
    }
    80% {
        transform: scale(1.05);
    }
}

/* Animated Button Styles */
.svg-wrapper {
    position: relative;
    display: inline-block;
}

.svg-wrapper svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.svg-wrapper .shape {
    stroke-dasharray: 140 540;
    stroke-dashoffset: -474;
    stroke-width: 8px;
    fill: transparent;
    stroke: #B65FCF;
    transition: stroke-width 0.6s, stroke-dashoffset 0.6s, stroke-dasharray 0.6s;
}

.svg-wrapper:hover .shape {
    stroke-width: 2px;
    stroke-dashoffset: 0;
    stroke-dasharray: 760;
}

/* Apply to all buttons */
button, .btn, .submit-btn, .submit-blessing-btn, .invite-code-btn, .carousel-btn, .refresh-btn, .logout-btn, .reset-btn, .event-map-btn {
    position: relative;
    overflow: visible;
}

/* Authentication Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.auth-modal .modal-content {
    background: white;
    margin: 10% auto;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal .modal-content h2 {
    font-family: 'Dancing Script', cursive;
    color: #7A4988;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.auth-modal .modal-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.auth-modal .modal-content input {
    width: 100%;
    padding: 1.2rem;
    margin: 1rem 0;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-modal .modal-content input:focus {
    outline: none;
    border-color: #7A4988;
    box-shadow: 0 0 0 3px rgba(224, 175, 255, 0.1);
}

.auth-modal .modal-content button {
    background: linear-gradient(135deg, #7A4988, #d090ff);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0.5rem;
    box-shadow: 0 5px 15px rgba(224, 175, 255, 0.3);
}

.auth-modal .modal-content button:hover {
    background: linear-gradient(135deg, #d090ff, #c070ff);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 175, 255, 0.4);
}

/* Modal close button - ensure it stays visible */
.modal-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    color: #999 !important;
    cursor: pointer !important;
    padding: 5px !important;
    line-height: 1 !important;
    z-index: 1000 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: color 0.2s ease !important;
}

.modal-close:hover {
    color: #333 !important;
    background: none !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Session Warning Modal */
#sessionWarningModal .modal-content {
    max-width: 500px;
}

#sessionWarningModal .modal-content h2 {
    color: #dc3545;
    margin-bottom: 1rem;
}

#sessionWarningModal .modal-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Logout Button Styles */
.logout-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.access-code-item {
    display: flex;
    align-items: center;
}

.nav-item.access-required {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-item.access-required.show {
    opacity: 1;
    transform: translateY(0);
    display: block !important;
}

.access-code-item.hide {
    display: none !important;
}

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: #7A4988;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    color: #666;
}

/* Family Page Styles */
.family-section {
    padding: 80px 0;
}

.family-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.family-member {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.family-member.reverse {
    grid-template-columns: 1fr 1fr;
}

.family-member.reverse .member-photo {
    order: 2;
}

.family-member.reverse .member-info {
    order: 1;
}

.member-photo {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.member-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.member-photo:hover img {
    transform: scale(1.05);
}

.member-relation {
    font-size: 1rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-align: center;
}

.member-subtitle {
    font-size: 0.9rem !important;
    color: #888 !important;
    font-style: italic !important;
    font-weight: 300 !important;
    opacity: 0.85 !important;
    margin-bottom: 0.8rem !important;
    text-align: center !important;
    line-height: 1.4 !important;
}

.member-names {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: #7A4988;
    margin-bottom: 0.3rem;
    text-align: center;
}

.family-subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: #7A4988;
    text-align: center;
    margin-top: -2rem;
    margin-bottom: 3rem;
}

.member-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    text-align: justify;
}

.family-values-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-10px);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.value-card h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: #7A4988;
    margin-bottom: 1rem;
}

.value-card p {
    color: #666;
    line-height: 1.6;
}

@media screen and (max-width: 968px) {
    .family-member,
    .family-member.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .family-member.reverse .member-photo,
    .family-member.reverse .member-info {
        order: unset;
    }
    
    .member-names {
        font-size: 2rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

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

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 20px 40px;
    }

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

    .about-content {
        flex-direction: column;
        gap: 2rem;
    }

    .countdown {
        gap: 1rem;
    }

    .countdown-item {
        min-width: 100px;
        padding: 1.5rem;
    }

    .countdown-number {
        font-size: 2rem;
    }
    
    .countdown-section h2 {
        font-size: 2.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .countdown-section h2,
    .about-text h2 {
        font-size: 2rem;
    }

    .countdown-item {
        min-width: 80px;
        padding: 1rem;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .live-stream-container h2 {
        font-size: 2rem;
    }

    .stream-wrapper {
        max-width: 100%;
        margin: 0 auto 1.5rem;
    }

    .stream-message {
        font-size: 1.1rem;
    }

    .stream-fallback {
        padding: 2rem 1rem;
        margin: 1rem auto;
    }

    .stream-fallback h3 {
        font-size: 2rem;
    }
}

/* Translation Button Styles */
.translation-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.translation-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.translation-btn:active {
    transform: translateY(0);
}

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

.translation-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Hindi Font Support */
html[lang="hi"] {
    font-family: 'Noto Sans Devanagari', 'Open Sans', sans-serif;
}

html[lang="hi"] .hero-title,
html[lang="hi"] .about-text h2,
html[lang="hi"] .countdown-section h2 {
    font-family: 'Noto Sans Devanagari', 'Dancing Script', cursive;
}

/* Responsive Translation Button */
@media screen and (max-width: 768px) {
    .translation-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .translation-icon {
        font-size: 1rem;
    }
    
    .translation-text {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 480px) {
    .translation-btn {
        padding: 0.5rem 0.8rem;
    }
    
    .translation-text {
        display: none;
    }
}


/* About Couple Section */
.about-couple-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #7A4988;
    text-align: center;
    margin-bottom: 4rem;
}

.couple-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
    padding: 2rem;
}

.couple-card.reverse {
    grid-template-columns: 1fr 1fr;
}

.couple-card.reverse .couple-photo {
    order: 2;
}

.couple-card.reverse .couple-info {
    order: 1;
}

.couple-photo {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.couple-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.couple-photo:hover img {
    transform: scale(1.05);
}

.couple-info {
    padding: 2rem;
}

.couple-name {
    font-size: 1.2rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.person-name {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: #7A4988;
    margin-bottom: 1.5rem;
}

.couple-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

/* Hero Banner Styles */
.hero-banner {
    position: relative;
    height: 100vh;
    overflow: hidden;
}



.countdown-section {
    /* scroll-snap disabled */
}

.banner-image {
    position: relative;
    width: 100%;
    height: 100%;
}
/* Reduce flicker on iOS by isolating the layer */
.banner-image img{
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform; /* limited scope: just this hero image */
}


.brand-title-hero {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 15;
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #B65FCF;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.planet-gif {
    width: 30px;
    height: 30px;
    object-fit: cover;
}

.logo-gif {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 15;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.logo-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Fade the image more */
}

.banner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 100%;
    padding-top: 6rem;
}

.banner-title {
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
    color: #B65FCF;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.couple-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    flex-wrap: wrap;
}

.bride-name, .groom-name {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    color: #B65FCF;
}

.ampersand {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #B65FCF;
}

.wedding-date-text {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 600;
    color: #B65FCF;
    margin: 0;
}

.banner-divider {
    width: 80%;
    height: 2px;
    background: #B65FCF;
    margin: 1.5rem auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.sticky-nav {
    position: fixed !important;
    top: -120px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 5000 !important;
    background: rgba(182, 95, 207, 0.95) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0.5rem 0;
    transition: top 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: block !important;
    visibility: visible !important;
}

.sticky-nav.show {
    top: 0 !important;
}



.hero-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.brand-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.hero-nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-nav-link:hover,
.hero-nav-link.is-active {
    color: #fff;
}

.invite-code-btn {
    background: rgba(224, 175, 255, 0.2);
    color: white;
    border: 2px solid rgba(224, 175, 255, 0.5);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.invite-code-btn:hover {
    background: rgba(224, 175, 255, 0.3);
    border-color: #7A4988;
    transform: translateY(-2px);
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 5;
    animation: bounce 2s infinite;
}

.arrow-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.arrow {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .sticky-nav {
        display: block !important;
    }
    
    .hero-nav-inner {
        grid-template-columns: 1fr auto;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .nav-logo-gif {
        width: 30px;
        height: 30px;
    }
    
    .nav-planet-gif {
        width: 20px;
        height: 20px;
    }
    
    .hero-nav-list {
        gap: 1rem;
    }
    
    .couple-names {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .wedding-date-text {
        margin: 0 auto;
        max-width: fit-content;
    }
    
    .brand-title-hero {
        top: 1rem;
        left: 1rem;
        font-size: 1.5rem;
    }
    
    .planet-gif {
        width: 25px;
        height: 25px;
    }
    
    .logo-gif {
        top: 1rem;
        right: 1rem;
        width: 60px;
        height: 60px;
    }
    
    .banner-overlay {
        padding-top: 6rem;
    }
    
    .banner-divider {
        margin: 1rem auto;
    }
}

/* Love Story Timeline Section with Scroll Color Change */
.love-story-section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    background: transparent !important;
}

.love-story-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--timeline-bg, #E6D5F0);
    transition: background-color 600ms ease;
}

/* Kill the expensive BG transition on mobile */
@media (max-width: 768px) {
    .love-story-section::before {
        transition: none !important;
    }
}

.love-story-section > * {
    position: relative;
    z-index: 1;
}

.story-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: #666;
    font-style: italic;
    margin-bottom: 4rem;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #7A4988, #d090ff);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    justify-content: flex-start;
    padding-left: calc(50% + 60px);
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
    padding-left: 0;
    padding-right: calc(50% + 60px);
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #7A4988;
    border: 5px solid #fff;
    box-shadow: 0 0 0 4px #7A4988;
    z-index: 2;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
    text-align: right;
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, #7A4988, #d090ff);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.timeline-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: #7A4988;
    margin-bottom: 1rem;
}

.timeline-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
}

/* Timeline Photo */
.timeline-photo {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.timeline-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@media (hover: hover) {
    .timeline-photo:hover img {
        transform: scale(1.05);
    }
}

/* Timeline Scroll Animation */
.timeline-item {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media screen and (max-width: 968px) {
    .couple-card,
    .couple-card.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .couple-card.reverse .couple-photo,
    .couple-card.reverse .couple-info {
        order: unset;
    }
    
    .couple-info {
        padding: 1rem;
        text-align: center;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 80px;
        padding-right: 0;
        justify-content: flex-start;
    }
    
    .timeline-marker {
        left: 30px;
    }
    
    .timeline-content {
        max-width: 100%;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
    }
    
    .timeline-photo img {
        transform: none !important;
        transition: none !important;
    }
}

/* Timeline Scroll Animation */
.timeline-item {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Memories Section */
.memories-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.memories-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 60px;
}

.memories-track {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.memory-card {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.memory-card.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.memory-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.memory-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 2rem;
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    text-align: center;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #7A4988;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* Blessings Section */
.blessings-section {
    padding: 80px 0;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.blessings-section::before,
.blessings-section::after {
    content: '';
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 10%, #7A4988 8px, transparent 8px),
        radial-gradient(circle at 60% 25%, #ff6b9d 6px, transparent 6px),
        radial-gradient(circle at 80% 40%, #ffc0e0 5px, transparent 5px),
        radial-gradient(circle at 30% 55%, #d090ff 7px, transparent 7px),
        radial-gradient(circle at 70% 70%, #7A4988 6px, transparent 6px),
        radial-gradient(circle at 40% 85%, #ff6b9d 5px, transparent 5px),
        radial-gradient(circle at 15% 30%, #ffc0e0 4px, transparent 4px),
        radial-gradient(circle at 85% 15%, #d090ff 6px, transparent 6px),
        radial-gradient(circle at 50% 5%, #7A4988 5px, transparent 5px),
        radial-gradient(circle at 25% 75%, #ff6b9d 4px, transparent 4px);
    background-size: 120px 300px;
    background-repeat: repeat-y;
    opacity: 0.4;
    animation: heartsWaterfall 15s linear infinite;
}

.blessings-section::before {
    left: 0;
}

.blessings-section::after {
    right: 0;
    animation-delay: -7.5s;
}

.blessing-form-container {
    max-width: 600px;
    margin: 0 auto 4rem;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.blessing-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.blessing-form input,
.blessing-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.3s ease;
}

.blessing-form input:focus,
.blessing-form textarea:focus {
    outline: none;
    border-color: #7A4988;
}

.submit-blessing-btn {
    width: 100%;
    background: linear-gradient(135deg, #7A4988, #d090ff);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(224, 175, 255, 0.3);
}

.submit-blessing-btn:hover::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #B65FCF;
    border-radius: 50px;
    animation: drawBorder 0.6s ease-out;
    pointer-events: none;
}

.submit-blessing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 175, 255, 0.4);
}

.submit-blessing-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Approved Blessings Carousel */
.approved-blessings {
    margin-top: 4rem;
}

.blessings-carousel-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: #7A4988;
    text-align: center;
    margin-bottom: 2rem;
}

.blessings-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 60px;
}

.blessings-track {
    position: relative;
    min-height: 250px;
}

.blessing-card {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.5s ease;
}

.blessing-card.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
}

.blessing-content {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #7A4988;
}

.blessing-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #555;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.blessing-author {
    font-size: 1.1rem;
    font-weight: 600;
    color: #7A4988;
    text-align: right;
}

@media screen and (max-width: 768px) {
    .memories-track {
        height: 400px;
    }
    
    .memories-carousel,
    .blessings-carousel {
        padding: 0 50px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .memory-caption {
        font-size: 1.5rem;
        padding: 1.5rem;
    }
    
    .blessing-content {
        padding: 2rem;
    }
    
    .blessing-text {
        font-size: 1.1rem;
    }
    
    .timeline-photo img {
        transform: none !important;
        transition: none !important;
    }
}

@media screen and (max-width: 480px) {
    .banner-title {
        font-size: 1.2rem;
    }
    
    .couple-names {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .scroll-down {
        bottom: 20px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 60px;
    }
    
    .timeline-marker {
        width: 20px;
        height: 20px;
        left: 20px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .timeline-title {
        font-size: 1.5rem;
    }
    
    .timeline-photo img {
        transform: none !important;
        transition: none !important;
        will-change: auto !important;
    }
    
    .memories-track {
        height: 300px;
    }
    
    .memories-carousel,
    .blessings-carousel {
        padding: 0 40px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .memory-caption {
        font-size: 1.2rem;
        padding: 1rem;
    }
    
    .blessing-form-container {
        padding: 1.5rem;
    }
    
    .blessing-content {
        padding: 1.5rem;
    }
    
    .blessing-text {
        font-size: 1rem;
    }
    
    .blessing-author {
        font-size: 1rem;
    }
}

Do this (iOS-only, drop-in)

Add this at the very end of your CSS. It targets iOS Safari without touching Android/desktop.

/* ---- iOS SAFARI FLICKER PATCHES ---- */
@supports (-webkit-touch-callout: none) {

  /* 1) Stop animating the ancestor that wraps the image on iOS */
  .timeline-item,
  .timeline-item.animate {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* 2) Promote each photo to its own isolated layer */
  .timeline-photo {
    isolation: isolate;             /* contain effects within */
    will-change: transform;
  }
  .timeline-photo img {
    -webkit-transform: translateZ(0.1px); /* force GPU layer */
    transform: translateZ(0.1px);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    filter: none !important;        /* ensure no filter-based repaints */
  }

  /* 3) Make the card cheaper to paint while scrolling */
  .timeline-content {
    contain: paint;                 /* limit paint area */
    box-shadow: 0 6px 16px rgba(0,0,0,.12); /* lighter blur */
  }

  /* 4) Heavy overlays cause underlay flicker: remove them on iOS */
  /* backdrop-filter forces constant recompositing on iOS */
  .sticky-nav,
  .hero-nav-center {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(182, 95, 207, 0.95) !important; /* solid fallback */
  }

  /* 5) Fixed, full-viewport, animated overlay = flicker magnet on iOS.
        Hide the global hearts layer on iOS, keep footer heart animation. */
  .hearts-container { display: none !important; }
}

/* ===== iOS Safari: kill timeline flicker (v2) ===== */
@supports (-webkit-touch-callout: none) {

  /* A) Zero out any animation/transition on the ancestors that wrap the images */
  .timeline-item,
  .timeline-item.animate {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* B) Make each photo an isolated, opaque paint target (no transparency blending) */
  .timeline-photo {
    position: relative;
    isolation: isolate;
    background-color: #fff;                 /* avoids blending with moving bg */
    box-shadow: none !important;            /* blur shadows cause re-raster on iOS */
    filter: none !important;
    will-change: transform;
    -webkit-transform: translateZ(0);       /* own composited layer */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
  }

  .timeline-photo img {
    display: block;
    position: relative;
    z-index: 1;
    will-change: auto !important;           /* undo any ‘will-change: transform’ */
    transform: none !important;             /* no transforms on the bitmap */
    transition: none !important;            /* no transitions on the bitmap */
    -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
    -webkit-transform: translate3d(0,0,0);  /* hard promote the image layer */
            transform: translate3d(0,0,0);
  }

  /* C) Make the card around the photo cheap to paint */
  .timeline-content {
    contain: paint;                          /* limit repaint region */
    box-shadow: 0 4px 12px rgba(0,0,0,.10);  /* lighter shadow */
    -webkit-transform: translateZ(0);        /* keep this on its own layer too */
            transform: translateZ(0);
  }

  /* D) Nearby heavy overlays are common culprits — disable on iOS */
  /* remove blur + fixed stacking that triggers re-composition under scroll */
  .sticky-nav,
  .hero-nav-center {
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
    background: rgba(182,95,207,.97) !important;
  }

  /* E) Any fixed, animated decorations near the timeline — hide on iOS */
  .hearts-container { display: none !important; }
  .flowers-garden  { display: none !important; }  /* 3D transforms can poison the page */
}

/* === Make sticky nav same thickness as family page === */
.sticky-nav {
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
}

/* Align inner content vertically tighter like family page */
.sticky-nav .hero-nav-inner {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: clamp(54px, 8vh, 68px); /* same as family page top bar */
    align-items: center;
}

/* Family Toggle Switch */
.family-toggle-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.family-toggle-container input {
    display: none;
}

.toggle-switch {
    display: flex;
    background: #e0e0e0;
    border-radius: 50px;
    padding: 4px;
    cursor: pointer;
    position: relative;
    width: 500px;
    height: 60px;
}

.toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    z-index: 1;
    border-radius: 50px;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #7A4988, #d090ff);
    border-radius: 50px;
    top: 4px;
    left: 4px;
    transition: transform 0.3s ease;
    z-index: 0;
}

input:checked + .toggle-switch::before {
    transform: translateX(calc(100% + 4px));
}

input:not(:checked) + .toggle-switch .toggle-option:first-child,
input:checked + .toggle-switch .toggle-option:last-child {
    color: white;
}

.family-content {
    display: none;
}

.family-content.active {
    display: block;
}

@media screen and (max-width: 768px) {
    .toggle-switch {
        width: 100%;
        max-width: 400px;
        height: 50px;
    }
    
    .toggle-option {
        font-size: 0.95rem;
    }
}

@media screen and (max-width: 480px) {
    .toggle-switch {
        max-width: 320px;
        height: 45px;
    }
    
    .toggle-option {
        font-size: 0.85rem;
    }
}


/* Logout Button Styles */
.logout-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.mobile-only-item.logout-btn-item {
    display: none;
}

@media (max-width: 968px) {
    .mobile-only-item.logout-btn-item {
        display: block;
    }
    
    .mobile-only-item.logout-btn-item .logout-btn {
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        padding: 1rem 2rem;
        color: white;
        font-size: 1.1rem;
        text-align: left;
    }
}


/* Hide elements when authenticated */
.hide-auth { display: none !important; }

/* Ensure modal close button is never hidden by translation */
.modal-close {
    pointer-events: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* === RSVP THEME === */
:root {
  --rsvp-brand-1: #7A4988;
  --rsvp-brand-2: #B65FCF;
  --rsvp-ink: #ffffff;
  --rsvp-ink-dim: rgba(255,255,255,0.85);
  --rsvp-gold: #D4A574;
  --rsvp-backdrop: rgba(11,15,30,0.6);
}

/* Backdrop + slight blur */
.rsvp-modal {
  position: fixed; inset: 0; z-index: 1001;
  background: radial-gradient(1200px 800px at 80% 90%, rgba(182,95,207,0.25), transparent),
              linear-gradient(to bottom, var(--rsvp-backdrop), rgba(11,15,30,0.75));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: none;
}

/* Dialog card with on-brand gradient */
.rsvp-modal__dialog {
  width: min(92vw, 460px);
  margin: 10vh auto;
  padding: 20px 20px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(122,73,136,0.96) 0%, rgba(182,95,207,0.96) 100%);
  color: var(--rsvp-ink);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
}

.rsvp-modal__dialog h3 {
  margin: 0 0 6px;
  font-family: "Dancing Script", cursive;
  font-size: 1.8rem;
  letter-spacing: 0.3px;
}

.rsvp-field { margin: 12px 0; }
.rsvp-field label { display:block; font-weight: 700; color: var(--rsvp-ink); margin-bottom: 6px; }

.rsvp-radios label {
  color: var(--rsvp-ink-dim);
  font-weight: 600;
  margin-right: 16px;
}

#guestCount, .rsvp-modal select, .rsvp-modal input[type="text"],
.rsvp-modal input[type="number"], .rsvp-modal input[type="email"] {
  width: 100%;
  background: rgba(255,255,255,0.98);
  color: #0b0f1e;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
}

.rsvp-actions { display:flex; gap:10px; justify-content:flex-end; margin-top: 14px; }

.rsvp-submit {
  background: linear-gradient(135deg, var(--rsvp-gold), #e2bb8e);
  color: #2b1a12;
  border: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(212,165,116,0.35);
}

.rsvp-cancel {
  background: transparent;
  color: var(--rsvp-ink);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

/* RSVP message (on-brand toast) */
.rsvp-message {
  display: none;
  margin-top: 12px;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--rsvp-ink);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}

/* Success: purple gradient + gold chip */
.rsvp-message.success {
  background:
    radial-gradient(600px 400px at 85% 90%, rgba(182,95,207,0.25), transparent),
    linear-gradient(135deg, rgba(122,73,136,0.96) 0%, rgba(182,95,207,0.96) 100%);
}

/* Error: classy deep-rose gradient */
.rsvp-message.error {
  background:
    radial-gradient(600px 400px at 85% 90%, rgba(255, 120, 140, 0.25), transparent),
    linear-gradient(135deg, rgba(185, 50, 75, 0.96) 0%, rgba(135, 30, 55, 0.96) 100%);
}

.rsvp-message .msg-row {
  display: flex; align-items: center; gap: 10px;
}

.rsvp-message .msg-icon {
  font-size: 1.25rem; line-height: 1;
}

.rsvp-message .id-chip {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--rsvp-gold);
  color: #2b1a12;
  border-radius: 999px;
  font-weight: 800;
}

/* === Floating RSVP button (placed above translate button) === */
.rsvp-fab{
  position:fixed; right:clamp(12px,2vw,20px); bottom: 20px; /* JS will raise this if translator is present */
  z-index: 1002;  /* above translation button's z-index */
  border:none; border-radius:999px; padding:16px 24px; font-weight:800;
  box-shadow:0 10px 30px rgba(0,0,0,.25); cursor:pointer;
  background:linear-gradient(135deg, var(--rsvp-brand-2) 0%, var(--rsvp-brand-1) 100%);
  color:#fff; letter-spacing: .3px;
  font-size: 1.1rem;
  animation: rsvpPulse 2s ease-in-out infinite;
  transition: all 0.3s ease;
}
.rsvp-fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(182, 95, 207, 0.5);
  animation-play-state: paused;
}
@keyframes rsvpPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(182, 95, 207, 0.6);
  }
}
@media (max-width: 480px){
  .rsvp-modal__dialog{ margin: 12vh auto; padding: 18px 16px 14px; }
}

