:root {
    --color-bg: #FAFAF5;
    /* Soft Cream */
    --color-text: #3A4B25;
    /* Deep Olive Green */
    --color-gold: #C5A059;
    /* Muted Gold */
    --color-gold-light: #E5D0A0;
    --color-paper: #fafcfb;

    --font-heading: 'Cinzel', serif;
    --font-script: 'Pinyon Script', cursive;
    /* Elegant script */
    --font-body: 'Lato', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    height: 100dvh;
    /* Dynamic Fixed height for mobile */
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px 20px 20px;
    /* Account for header */
    overflow: hidden;
    /* Disable scroll */
}

#bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -3;
    background-image: url('assets/Background.jpg');
    background-size: cover;
    background-position: center;
}

/* Elegant Header */
.elegant-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-paper);
    border-bottom: 1px solid var(--color-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);

    /* Paper Texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
}

.header-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-gold);
    letter-spacing: 2px;
    font-weight: 700;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

#blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    backdrop-filter: blur(7px);
    /* Control blur amount here */
    pointer-events: none;
}

.main-container {
    width: 100%;
    max-width: 700px;
    height: 100%;
    /* Take available space */
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.card {
    background-color: var(--color-paper);
    padding: 30px;
    /* Slightly reduced default padding */
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    width: 100%;
    max-width: 600px;
    max-height: 100%;
    /* Fit in container */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically */

    /* Paper Texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    background-blend-mode: multiply;
}

/* Floral Decorations */
.floral-corner {
    position: absolute;
    width: 250px;
    height: 250px;
    background-image: url('assets/floral_corner.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0.9;
    pointer-events: none;
}

.top-left {
    top: -40px;
    left: -40px;
    transform: rotate(0deg);
}

.top-right {
    top: -40px;
    right: -40px;
    transform: rotate(90deg);
}

.bottom-left {
    bottom: -40px;
    left: -40px;
    transform: rotate(-90deg);
}

.bottom-right {
    bottom: -40px;
    right: -40px;
    transform: rotate(180deg);
}

.card-content {
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 1.5vh;
    /* Flexible gap */
}

#ampersand {
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    /* Ensure scaling works */
    padding: 10px;
    /* Increase hit area */
    margin: -10px;
    /* Offset padding so layout doesn't shift */
    touch-action: manipulation;
    /* Disable double-tap zoom delay */
    -webkit-tap-highlight-color: transparent;
    /* Remove blue highlight on tap */
    user-select: none;
    /* Prevent selection triggers */
    -webkit-user-select: none;
}

.pre-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 20px;
}

.names h2 {
    font-family: var(--font-script);
    font-size: clamp(2rem, 5vh, 3.5rem);
    /* Responsive font size */
    line-height: 1.1;
    margin: 0;
    color: var(--color-text);
    font-weight: 400;
}

/* ... divider styles ... */
.divider-elegant {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    gap: 15px;
}

.divider-elegant::before,
.divider-elegant::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-gold));
}

.divider-elegant::after {
    background: linear-gradient(to left, transparent, var(--color-gold));
}

.divider-icon {
    color: var(--color-gold);
    font-size: 1.2rem;
    line-height: 1;
}

.details {
    margin: 0;
}

.details p {
    font-family: var(--font-heading);
    margin: 5px 0;
    letter-spacing: 2px;
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: var(--color-text);
}

/* ... date styles ... */

.countdown-container h3 {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    margin-bottom: 10px;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.8;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 10px;
    /* Reduced gap for mobile safety */
    margin-bottom: 10px;
    flex-wrap: nowrap;
    /* Prevent wrapping */
}

.time-unit {
    display: flex;
    flex-direction: column;
    /* Stack number and label vertically */
    align-items: center;
    min-width: 45px;
    /* Prevent squashing */
}

.time-unit span {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vh, 2.5rem);
    font-weight: 400;
    color: var(--color-gold);
    line-height: 1;
}

.time-unit label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-top: 8px;
    color: var(--color-text);
    letter-spacing: 1px;
}

.btn {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-gold);
    padding: 14px 30px;
    /* Reduced padding */
    font-family: var(--font-heading);
    font-size: 0.85rem;
    /* Slightly smaller font */
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: var(--color-gold);
    color: white;
    border-color: var(--color-gold);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .card {
        padding: 40px 20px;
    }

    .floral-corner {
        width: 150px;
        height: 150px;
        opacity: 0.6;
        /* Fade out slightly on mobile to not obstruct text */
    }

    /* Pull corners closer on mobile to prevent overflow */
    .top-left {
        top: -10px;
        left: -10px;
    }

    .top-right {
        top: -10px;
        right: -10px;
    }

    .bottom-left {
        bottom: -10px;
        left: -10px;
    }

    .bottom-right {
        bottom: -10px;
        right: -10px;
    }
}

/* Responsive adjustments for short screens */
@media (max-height: 700px) {
    .floral-corner {
        width: 120px;
        height: 120px;
    }

    .card {
        padding: 20px;
    }
}