:root {
    /* Premium Palette - Romantic Touch */
    --santa-red: #c0222e;
    --pine-green: #1a4d2e;
    --warm-cream: #f9f7f2;
    --gold: #d4af37;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;

    /* Spacing & UI */
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Fonts - Now Romantic */
    --font-heading: 'Dancing Script', cursive;
    --font-body: 'Nunito', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--warm-cream);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(192, 34, 46, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(26, 77, 46, 0.03) 0%, transparent 20%);
    font-family: var(--font-body);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

/* Subtle Noise Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9000;
}

.hidden {
    display: none !important;
}

/* --- Snow Effect --- */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.7;
}

/* --- Glass UI Utility --- */
.glass-effect {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-lg);
}

/* --- Password Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 77, 46, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    text-align: center;
    width: 90%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.snowy-window-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8), transparent 70%);
    pointer-events: none;
    opacity: 0.3;
}

.modal-content h2 {
    font-family: 'Mountains of Christmas', serif;
    font-size: 2.2rem;
    color: var(--santa-red);
    margin-bottom: 0.5rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-content input {
    width: 100%;
    padding: 14px 20px;
    margin: 10px 0 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s;
}

.modal-content input:focus {
    border-color: var(--santa-red);
    outline: none;
    box-shadow: 0 0 0 4px rgba(192, 34, 46, 0.1);
}

.modal-content button {
    background: var(--santa-red);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(192, 34, 46, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 34, 46, 0.4);
    background: #a91b26;
}

#error-msg {
    color: var(--santa-red);
    margin-top: 10px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- Layout --- */
.section-container {
    padding: 6rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--santa-red);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: "❤️";
    display: block;
    font-size: 1rem;
    margin-top: 5px;
    opacity: 0.5;
}

/* --- Hero Section with Banner --- */
.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    /* Real Image Banner */
    background-image: url('images/banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax */
    border-bottom: 5px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Dark Romantic Overlay */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    z-index: 0;
    pointer-events: none;
}

.ornaments {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    z-index: 1;
}

.ornament {
    font-size: 4rem;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.1));
}

.swing-1 {
    animation: swing 3s infinite ease-in-out;
}

.swing-2 {
    animation: swing 4s infinite ease-in-out;
    animation-delay: 0.5s;
}

.swing-3 {
    animation: swing 3.5s infinite ease-in-out;
    animation-delay: 1s;
}

@keyframes swing {
    0% {
        transform: rotate(10deg);
    }

    50% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(10deg);
    }
}

#hero-title {
    font-family: var(--font-heading);
    font-size: 5.5rem;
    color: white;
    /* White for contrast */
    text-shadow: 0 0 20px rgba(192, 34, 46, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: none;
    -webkit-text-fill-color: initial;
    margin-bottom: 1rem;
    line-height: 1.1;
    z-index: 1;
}

.animate-pop {
    animation: popIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0);
}

@keyframes popIn {
    to {
        transform: scale(1);
    }
}

#hero-subtitle {
    font-size: 1.8rem;
    color: var(--warm-cream);
    /* Lighter */
    letter-spacing: 2px;
    opacity: 1;
    z-index: 1;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* --- Wrapped Stats --- */
.wrapped-container {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 5px;
    scroll-snap-type: x mandatory;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .wrapped-container {
        justify-content: center;
    }
}

.stat-card {
    min-width: 280px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--santa-red);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Counter --- */
.fireplace-mantle {
    display: inline-flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    background: #5d4037;
    padding: 40px 60px;
    border-radius: 8px;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    margin-top: 30px;
}

.fireplace-mantle::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -10px;
    right: -10px;
    height: 20px;
    background: #4a332a;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.stocking {
    background: #fdfbf7;
    color: var(--santa-red);
    width: 90px;
    height: 140px;
    border-radius: 0 0 50px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.05);
}

.stocking::before {
    content: '';
    position: absolute;
    top: -25px;
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
}

.stocking span {
    font-weight: 800;
    font-size: 2rem;
    line-height: 1;
}

.stocking label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    opacity: 0.7;
}

/* --- Music Player (Jukebox) --- */
.jukebox {
    background: #1a202c;
    color: white;
    padding: 3rem;
    border-radius: 40px;
    max-width: 450px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg), 0 0 0 8px rgba(212, 175, 55, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.jukebox-center img {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 8px solid #2d3748;
}

.spin-animation {
    animation: spin 10s linear infinite;
}

.paused {
    animation-play-state: paused;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.jukebox-top h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.jukebox-top p {
    color: #a0aec0;
}

.lollipop-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: var(--santa-red);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(192, 34, 46, 0.4);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.lollipop-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(192, 34, 46, 0.5);
}

/* --- Gallery (Unboxing) --- */
.instruction-text {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px;
    padding: 20px;
}

.gift-box-container {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    z-index: 10;
}

.gift-box {
    width: 100%;
    height: 100%;
    background: var(--pine-green);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 15px 30px rgba(26, 77, 46, 0.2);
    transition: transform 0.3s;
}

.gift-box:hover {
    transform: translateY(-5px);
}

.gift-box::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 100%;
    background: var(--santa-red);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.gift-box::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 25px;
    background: var(--santa-red);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.shaking {
    animation: shake 0.6s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-2px, 0, 0) rotate(-2deg);
    }

    20%,
    80% {
        transform: translate3d(4px, 0, 0) rotate(4deg);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-6px, 0, 0) rotate(-6deg);
    }

    40%,
    60% {
        transform: translate3d(6px, 0, 0) rotate(6deg);
    }
}

.revealed-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 4px solid white;
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.revealed-img.show {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* --- Bingo --- */
.bingo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 600px) {
    .bingo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.bingo-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-weight: 700;
    color: var(--pine-green);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.bingo-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.bingo-item.stamped {
    background: #f0fff4;
    border-color: var(--pine-green);
    color: var(--pine-green);
    opacity: 0.8;
}

.bingo-item.stamped::after {
    content: '❤️';
    /* Heart Stamp */
    position: absolute;
    font-size: 4rem;
    opacity: 0.2;
    transform: rotate(-15deg);
    animation: stamp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stamp {
    from {
        transform: scale(3) rotate(0);
        opacity: 0;
    }
}

/* --- Location --- */
.map-frame {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    background: #cbd5e0;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.pine-pin {
    font-size: 4rem;
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.2));
}

/* --- Letter --- */
.parchment {
    position: relative;
    background: #fffdf5;
    padding: 4rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 650px;
    margin: 0 auto;
    font-family: var(--font-body);
    line-height: 2;
    color: #4a3b32;
    border-radius: 2px;
}

.parchment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 100% 2rem;
    opacity: 0.1;
    pointer-events: none;
}

.parchment::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) rotate(-2deg);
}

footer {
    padding: 4rem 2rem;
    background: var(--pine-green);
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Cinema Video Fix (Refined) --- */
.cinema-frame {
    background: #000;
    padding: 20px;
    box-shadow: var(--shadow-lg), 0 0 0 15px #2d3748;
    /* Frame look */
    border-radius: var(--radius-lg);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.cinema-frame video {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: #000;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    #hero-title {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .parchment {
        padding: 2rem;
        font-size: 0.95rem;
    }

    .modal-content {
        padding: 2rem;
        width: 95%;
    }
}

/* --- Desktop Enhancements --- */
@media (min-width: 1024px) {

    /* Widen the main container slightly for large screens */
    .section-container {
        max-width: 1200px;
        padding: 8rem 2rem;
        /* More generous vertical spacing */
    }

    /* Hero Text Scaling */
    #hero-title {
        font-size: 7rem;
    }

    #hero-subtitle {
        font-size: 2rem;
    }

    /* Wrapped Stats: Center them */
    .wrapped-container {
        justify-content: center;
        gap: 40px;
        padding-bottom: 20px;
    }

    .stat-card {
        min-width: 300px;
        /* Slightly wider cards */
        transform: scale(1);
        transition: transform 0.3s ease;
    }

    .stat-card:hover {
        transform: translateY(-15px) scale(1.02);
        /* More dramatic hover */
    }

    /* Cinema Frame: Limit width nicely */
    .cinema-frame {
        max-width: 800px;
        margin: 0 auto;
    }

    /* Bingo Grid */
    .bingo-grid {
        gap: 30px;
        max-width: 900px;
        margin: 0 auto;
    }

    /* Parchment width */
    .parchment {
        max-width: 800px;
        padding: 5rem;
        font-size: 1.1rem;
    }

    /* Gallery: Bigger items on desktop */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 40px;
    }
}