/* ================================
   2025 Year Recap - Christmas Theme
   ================================ */

/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Christmas Color Palette - with Orange! */
    --color-bg: #0a1628;
    --color-bg-dark: #060d1a;
    --color-sky-top: #0a1628;
    --color-sky-bottom: #1a3a2a;
    --color-orange: #e07020;
    --color-orange-light: #f59042;
    --color-orange-dark: #c45a10;
    --color-gold: #d4a04a;
    --color-gold-light: #e8c47a;
    --color-green: #2d5a3d;
    --color-green-dark: #1a3a28;
    --color-forest-green: #1a5a3a;
    --color-red: #c84040;
    --color-cream: #faf6f0;
    --color-snow: #f8f6f0;
    --color-text: #faf9f7;
    --color-text-muted: rgba(250, 249, 247, 0.7);
    --color-polaroid: #f8f6f0;
    --color-polaroid-shadow: rgba(0, 0, 0, 0.4);
    --color-caption: #2d2821;
    
    /* Typography */
    --font-script: 'Great Vibes', cursive;
    --font-festive: 'Mountains of Christmas', cursive;
    --font-handwritten: 'Caveat', cursive;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Mountains of Christmas', cursive;
    
    /* Polaroid dimensions */
    --polaroid-padding: 20px;
    --polaroid-padding-bottom: 80px;
    --polaroid-max-width: 500px;
    --polaroid-border-radius: 3px;
    
    /* Sidebar */
    --sidebar-width: 280px;
    
    /* Transitions */
    --transition-smooth: 0.3s ease;
    --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    overscroll-behavior: none; /* Prevent overscroll bounce */
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
}

/* ================================
   Homepage Scene Background
   ================================ */

.scene-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(
        to bottom,
        var(--color-sky-top) 0%,
        #0f2535 30%,
        #1a3a2a 60%,
        var(--color-sky-bottom) 100%
    );
}

/* Stars */
.stars {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 10%, rgba(255,255,255,0.9) 50%, transparent 50%),
        radial-gradient(2px 2px at 40% 25%, rgba(255,255,255,0.8) 50%, transparent 50%),
        radial-gradient(1px 1px at 60% 5%, rgba(255,255,255,0.7) 50%, transparent 50%),
        radial-gradient(2px 2px at 80% 20%, rgba(255,255,255,0.9) 50%, transparent 50%),
        radial-gradient(1px 1px at 10% 30%, rgba(255,255,255,0.6) 50%, transparent 50%),
        radial-gradient(2px 2px at 70% 35%, rgba(255,255,255,0.8) 50%, transparent 50%),
        radial-gradient(1px 1px at 30% 15%, rgba(255,255,255,0.7) 50%, transparent 50%),
        radial-gradient(2px 2px at 90% 8%, rgba(255,255,255,0.9) 50%, transparent 50%),
        radial-gradient(1px 1px at 50% 40%, rgba(255,255,255,0.5) 50%, transparent 50%),
        radial-gradient(2px 2px at 15% 45%, rgba(255,255,255,0.6) 50%, transparent 50%);
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Pine Forest - Clean SVG-style with sway animation */
.pine-forest {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    pointer-events: none;
}

.pine-row {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 2%;
}

.pine-row-back {
    bottom: 8%;
}

.pine-row-mid {
    bottom: 3%;
}

.pine-row-front {
    bottom: 0;
}

/* SVG Pine Tree Shape */
.pine {
    position: relative;
    transform-origin: bottom center;
}

.pine svg {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Back row - smaller, more transparent, slower sway */
.pine-row-back .pine {
    animation: sway-gentle 8s ease-in-out infinite;
}

.pine-row-back .pine:nth-child(odd) {
    animation-delay: -2s;
}

.pine-row-back .pine svg {
    width: 40px;
    height: 70px;
    opacity: 0.3;
}

/* Mid row - medium size */
.pine-row-mid .pine {
    animation: sway-gentle 6s ease-in-out infinite;
}

.pine-row-mid .pine:nth-child(even) {
    animation-delay: -1.5s;
}

.pine-row-mid .pine svg {
    width: 55px;
    height: 100px;
    opacity: 0.5;
}

/* Front row - larger, more visible, subtle sway */
.pine-row-front .pine {
    animation: sway-gentle 7s ease-in-out infinite;
}

.pine-row-front .pine:nth-child(odd) {
    animation-delay: -3s;
}

.pine-row-front .pine svg {
    width: 70px;
    height: 130px;
    opacity: 0.7;
}

@keyframes sway-gentle {
    0%, 100% { 
        transform: rotate(-0.5deg); 
    }
    50% { 
        transform: rotate(0.5deg); 
    }
}

/* Snow ground - subtle hint */
.snow-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255,255,255,0.05) 100%
    );
}

/* String Lights */
.string-lights {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    overflow: hidden;
}

.string-lights::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -5%;
    right: -5%;
    height: 2px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transform: rotate(-1deg);
}

.light-bulb {
    position: absolute;
    top: 18px;
    width: 12px;
    height: 16px;
    border-radius: 50% 50% 50% 50%;
    animation: glow 2s ease-in-out infinite alternate;
}

.light-bulb::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background: #333;
    border-radius: 2px 2px 0 0;
}

.light-bulb:nth-child(1) { left: 5%; background: var(--color-orange); animation-delay: 0s; }
.light-bulb:nth-child(2) { left: 15%; background: #e04040; animation-delay: 0.3s; }
.light-bulb:nth-child(3) { left: 25%; background: var(--color-gold); animation-delay: 0.6s; }
.light-bulb:nth-child(4) { left: 35%; background: #40a040; animation-delay: 0.9s; }
.light-bulb:nth-child(5) { left: 45%; background: var(--color-orange); animation-delay: 0.2s; }
.light-bulb:nth-child(6) { left: 55%; background: #e04040; animation-delay: 0.5s; }
.light-bulb:nth-child(7) { left: 65%; background: var(--color-gold); animation-delay: 0.8s; }
.light-bulb:nth-child(8) { left: 75%; background: #40a040; animation-delay: 0.1s; }
.light-bulb:nth-child(9) { left: 85%; background: var(--color-orange); animation-delay: 0.4s; }
.light-bulb:nth-child(10) { left: 95%; background: #e04040; animation-delay: 0.7s; }

@keyframes glow {
    0% { 
        opacity: 0.6;
        box-shadow: 0 0 5px currentColor;
    }
    100% { 
        opacity: 1;
        box-shadow: 0 0 15px currentColor, 0 0 25px currentColor;
    }
}

/* ================================
   Snowfall Animation
   ================================ */

.snowfall {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -50px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    opacity: 0;
    animation: snowfall linear infinite;
    user-select: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Generate snowflakes with different positions and speeds */
.snowflake:nth-child(1) { left: 5%; animation-duration: 10s; animation-delay: 0s; font-size: 0.8rem; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: 1s; font-size: 1.2rem; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 8s; animation-delay: 2s; font-size: 0.6rem; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: 0.5s; font-size: 1rem; }
.snowflake:nth-child(5) { left: 45%; animation-duration: 9s; animation-delay: 3s; font-size: 0.9rem; }
.snowflake:nth-child(6) { left: 55%; animation-duration: 11s; animation-delay: 1.5s; font-size: 1.1rem; }
.snowflake:nth-child(7) { left: 65%; animation-duration: 13s; animation-delay: 2.5s; font-size: 0.7rem; }
.snowflake:nth-child(8) { left: 75%; animation-duration: 10s; animation-delay: 4s; font-size: 1rem; }
.snowflake:nth-child(9) { left: 85%; animation-duration: 15s; animation-delay: 0.8s; font-size: 0.8rem; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 7s; animation-delay: 3.5s; font-size: 1.3rem; }

/* ================================
   Christmas Tree (SVG-based)
   ================================ */

.christmas-tree {
    width: 200px;
    height: 280px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
    animation: tree-sway 6s ease-in-out infinite;
}

@keyframes tree-sway {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

/* ================================
   Grinch Sleigh Animation
   ================================ */

.grinch-sleigh {
    position: fixed;
    top: 8%;
    left: -300px;
    z-index: 50;
    width: 200px;
    height: auto;
    animation: fly-across 20s linear infinite;
    animation-delay: 3s;
    pointer-events: none;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
}

.grinch-sleigh img {
    width: 100%;
    height: auto;
}

@keyframes fly-across {
    /* Fly left to right */
    0% {
        left: -300px;
        top: 8%;
        transform: scaleX(1);
    }
    10% {
        top: 5%;
    }
    20% {
        top: 10%;
    }
    30% {
        top: 6%;
    }
    /* Exit right side */
    45% {
        left: calc(100vw + 300px);
        top: 8%;
        transform: scaleX(1);
    }
    /* Instantly flip and position on right for return */
    46% {
        left: calc(100vw + 300px);
        top: 8%;
        transform: scaleX(-1);
    }
    /* Fly right to left */
    55% {
        top: 6%;
    }
    65% {
        top: 11%;
    }
    75% {
        top: 5%;
    }
    85% {
        top: 9%;
    }
    /* Exit left side */
    100% {
        left: -300px;
        top: 8%;
        transform: scaleX(-1);
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .grinch-sleigh {
        animation: none;
        display: none;
    }
}

/* Smaller on mobile */
@media (max-width: 768px) {
    .grinch-sleigh {
        width: 120px;
        top: 10%;
    }
}

/* ================================
   Hamburger Menu Button
   ================================ */

.menu-toggle {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1000;
    background: var(--color-orange);
    border: none;
    border-radius: 8px;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 12px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(224, 112, 32, 0.4);
}

.menu-toggle:hover {
    background: var(--color-orange-dark);
    transform: scale(1.05);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--color-snow);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* Hamburger to X animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ================================
   Sidebar Navigation
   ================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-bg-dark);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform var(--transition-smooth);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 4.5rem 1.5rem 1.5rem; /* Top padding to go below menu button */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-title {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--color-orange-light);
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 2rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.125rem;
    transition: var(--transition-smooth);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--color-gold);
    color: var(--color-gold);
}

.sidebar-nav a.active {
    background: rgba(224, 112, 32, 0.2);
    border-left-color: var(--color-orange);
    color: var(--color-snow);
}

.sidebar-nav .nav-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-footer p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.sidebar-user {
    font-size: 0.85rem;
    color: var(--color-snow);
    margin-bottom: 0.75rem;
}

.sidebar-logout {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--color-snow);
}

/* Sidebar overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ================================
   Main Content Area
   ================================ */

.main-content {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 2;
    overflow-x: hidden;
}

/* Full-page lockdown - no scrolling at all */
.page-locked {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    height: 100dvh;
}

/* Scrollable page (for coupons, credits, etc.) */
.page-scrollable {
    overflow-y: auto;
    overflow-x: hidden;
}

/* ================================
   Home Page Styles
   ================================ */

.home-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    padding-top: 80px;
    position: relative;
}

.home-welcome {
    font-family: var(--font-script);
    font-size: clamp(3rem, 10vw, 6rem);
    color: var(--color-gold);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 160, 74, 0.3);
}

.home-title {
    font-family: var(--font-festive);
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--color-snow);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.home-subtitle {
    font-family: var(--font-handwritten);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.home-cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-dark) 100%);
    color: var(--color-snow);
    box-shadow: 0 4px 15px rgba(224, 112, 32, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-orange-light) 0%, var(--color-orange) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 112, 32, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
}

.btn-secondary:hover {
    background: var(--color-gold);
    color: var(--color-bg-dark);
    transform: translateY(-2px);
}

/* ================================
   Page Header (for inner pages)
   ================================ */

/* Board View Container */
#boardView {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.page-header {
    padding: 6rem 2rem 3rem;
    text-align: center;
    box-sizing: border-box;
}

.page-title {
    font-family: var(--font-festive);
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--color-snow);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.page-header-row {
    display: block;
}

.upload-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-orange);
    color: var(--color-snow);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(224, 112, 32, 0.3);
}

.upload-btn:hover {
    background: var(--color-orange-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(224, 112, 32, 0.4);
}

.upload-icon {
    font-size: 1.25rem;
    font-weight: bold;
}

@media (max-width: 480px) {
    .upload-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .upload-text {
        display: none;
    }
    
    .upload-icon {
        font-size: 1.5rem;
    }
}

/* ================================
   Month Board (Photos Page)
   ================================ */

.month-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

.month-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.month-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-orange);
    box-shadow: 0 12px 40px rgba(224, 112, 32, 0.3);
}

.month-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}

.month-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    transform-origin: center center;
}

/* Rotation for month card images */
.month-card-image img.rotate-90 {
    transform: rotate(90deg) scale(1.35);
}

.month-card-image img.rotate-180 {
    transform: rotate(180deg);
}

.month-card-image img.rotate-270,
.month-card-image img.rotate--90 {
    transform: rotate(-90deg) scale(1.35);
}

.month-card:hover .month-card-image img.rotate-90 {
    transform: rotate(90deg) scale(1.45);
}

.month-card:hover .month-card-image img.rotate-180 {
    transform: rotate(180deg) scale(1.1);
}

.month-card:hover .month-card-image img.rotate-270,
.month-card:hover .month-card-image img.rotate--90 {
    transform: rotate(-90deg) scale(1.45);
}

.month-card:hover .month-card-image img {
    transform: scale(1.1);
}

/* Video indicator on month cards */
.video-indicator {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    padding-left: 3px; /* Visually center the play triangle */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background 0.3s ease;
}

.month-card:hover .video-indicator {
    background: var(--color-orange);
    transform: scale(1.1);
}

.month-card-content {
    padding: 1.25rem;
    text-align: center;
}

.month-card-title {
    font-family: var(--font-festive);
    font-size: 1.75rem;
    color: var(--color-snow);
    margin-bottom: 0.25rem;
}

.month-card-count {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ================================
   Month Gallery View
   ================================ */

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 4rem 2rem 0; /* Minimal bottom padding */
    position: relative;
}

.back-button {
    position: absolute;
    left: 5rem; /* Clear the hamburger menu button */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.back-button:hover {
    background: rgba(224, 112, 32, 0.3);
    color: var(--color-orange-light);
}

.gallery-title {
    font-family: var(--font-festive);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--color-snow);
}

/* Gallery Container - Fade transitions (no scroll) */
.gallery {
    height: calc(100vh - 120px);
    height: calc(100dvh - 120px); /* Dynamic viewport height for mobile */
    overflow: hidden;
    position: relative;
}

/* Lock body scroll when viewing gallery on mobile */
body.gallery-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}


/* Card Container - centers polaroid */
.card-container {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    padding-right: 3.5rem;
    padding-right: 3.5rem;
}

/* Polaroid Frame */
.polaroid {
    background: var(--color-polaroid);
    padding: var(--polaroid-padding);
    padding-bottom: var(--polaroid-padding-bottom);
    border-radius: var(--polaroid-border-radius);
    box-shadow: 
        0 4px 6px var(--color-polaroid-shadow),
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(224, 112, 32, 0.1);
    max-width: var(--polaroid-max-width);
    width: 100%;
    transform: rotate(var(--rotation, 0deg));
    transition: transform 0.5s ease-in-out;
    /* Polaroid frame is always visible */
}

/* Shake animation when developing - like waving the polaroid */
.polaroid.shaking {
    animation: shake-polaroid 1.2s ease-in-out;
}

@keyframes shake-polaroid {
    0%, 100% { transform: rotate(var(--rotation, 0deg)) translateX(0); }
    10% { transform: rotate(calc(var(--rotation, 0deg) + 5deg)) translateX(12px); }
    20% { transform: rotate(calc(var(--rotation, 0deg) - 4deg)) translateX(-10px); }
    30% { transform: rotate(calc(var(--rotation, 0deg) + 4deg)) translateX(9px); }
    40% { transform: rotate(calc(var(--rotation, 0deg) - 3deg)) translateX(-7px); }
    50% { transform: rotate(calc(var(--rotation, 0deg) + 3deg)) translateX(6px); }
    60% { transform: rotate(calc(var(--rotation, 0deg) - 2deg)) translateX(-4px); }
    70% { transform: rotate(calc(var(--rotation, 0deg) + 2deg)) translateX(3px); }
    80% { transform: rotate(calc(var(--rotation, 0deg) - 1deg)) translateX(-2px); }
    90% { transform: rotate(calc(var(--rotation, 0deg) + 0.5deg)) translateX(1px); }
}

/* The IMAGE inside develops - starts dark/blurry like a real polaroid */
.polaroid-photo img {
    opacity: 0;
    filter: brightness(0.05) blur(20px) saturate(0) sepia(0.5);
    transition: opacity 0.8s ease-out, filter 3s ease-out;
}

.polaroid-photo img.developed {
    opacity: 1;
    filter: brightness(1) blur(0) saturate(1) sepia(0);
}

/* Caption fades in after image develops */
.polaroid-caption {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.polaroid-caption.visible {
    opacity: 1;
}

/* Gallery Navigation Arrows */
.gallery-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(224, 112, 32, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.gallery-nav:hover {
    background: var(--color-orange);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 1.5rem;
}

.gallery-next {
    right: 4rem; /* Account for progress dots */
}

@media (max-width: 768px) {
    .gallery-nav {
        display: none; /* Hide on mobile - swipe works */
    }
    
    .gallery-prev {
        left: 1.5rem;
    }
    
    .gallery-next {
        right: 1.5rem;
    }
}

/* Photo container */
.polaroid-photo {
    background: #1a1612;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 2px;
}

.polaroid-photo img,
.polaroid-photo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
}

/* Rotation classes for incorrectly oriented photos */
.rotate-90 {
    transform: rotate(90deg) scale(1.35) !important;
}

.rotate-180 {
    transform: rotate(180deg) !important;
}

.rotate-270,
.rotate--90 {
    transform: rotate(-90deg) scale(1.35) !important;
}

/* Video-specific styles */
.polaroid-photo video {
    /* Video develop effect - opacity only (no blur filter for video performance) */
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.polaroid-photo video.developed {
    opacity: 1;
}

/* Show native controls on hover/focus */
.polaroid-photo video::-webkit-media-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.polaroid-photo video:hover::-webkit-media-controls,
.polaroid-photo video:focus::-webkit-media-controls {
    opacity: 1;
}

/* Caption area */
.polaroid-caption {
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 50px;
}

.caption-date {
    font-family: var(--font-handwritten);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-orange);
    letter-spacing: 0.02em;
}

.caption-text {
    font-family: var(--font-handwritten);
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--color-caption);
    line-height: 1.2;
}

/* Progress Dots Navigation - bottom center for left/right nav */
.progress-dots {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 12px;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-smooth);
    padding: 0;
}

.dot:hover {
    border-color: var(--color-orange);
    transform: scale(1.3);
}

.dot.active {
    background-color: var(--color-orange);
    border-color: var(--color-orange);
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(224, 112, 32, 0.5);
}

/* ================================
   Placeholder Pages
   ================================ */

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.placeholder-text {
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

/* ================================
   Loading State
   ================================ */

.loading {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-bg);
    z-index: 200;
}

.loading p {
    font-family: var(--font-handwritten);
    font-size: 2rem;
    color: var(--color-text-muted);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ================================
   Responsive Design
   ================================ */

/* Tablet / iPad styles */
@media (max-width: 1024px) {
    .month-board {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .page-header {
        padding: 5rem 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --polaroid-max-width: 420px;
        --polaroid-padding: 14px;
        --polaroid-padding-bottom: 65px;
        --sidebar-width: 260px;
    }
    
    .menu-toggle {
        top: 1rem;
        left: 1rem;
        width: 44px;
        height: 44px;
    }
    
    .christmas-tree {
        width: 150px;
        height: 210px;
    }
    
    .string-lights {
        height: 50px;
    }
    
    .light-bulb {
        width: 10px;
        height: 14px;
    }
    
    .card-container {
        padding: 1.5rem;
        padding-right: 2.5rem;
    }
    
    .caption-text {
        font-size: 1.5rem;
    }
    
    .progress-dots {
        bottom: 1.5rem;
        gap: 10px;
        padding: 0.5rem 0.75rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    .month-board {
        grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .back-button {
        position: relative;
        left: 0;
        margin-bottom: 0.25rem;
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .gallery-header {
        flex-direction: column;
        padding: 4rem 1rem 0.25rem; /* Reduced spacing for mobile */
        gap: 0.25rem;
    }
    
    .gallery-title {
        font-size: 1.5rem;
        margin: 0;
    }
    
    .mountain-1,
    .mountain-2,
    .mountain-3,
    .mountain-4 {
        transform: scale(0.6);
    }
}

@media (max-width: 480px) {
    :root {
        --polaroid-max-width: 85vw;
        --polaroid-padding: 10px;
        --polaroid-padding-bottom: 50px;
    }
    
    .home-cta {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .christmas-tree {
        width: 120px;
        height: 170px;
    }
    
    .gallery-header {
        padding: 3.5rem 0.5rem 0.25rem; /* Even tighter for small phones */
    }
    
    .gallery-title {
        font-size: 1.3rem;
    }
    
    .back-button {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .card-container {
        padding: 0.5rem;
        padding-right: 2rem;
    }
    
    .polaroid {
        transform: rotate(calc(var(--rotation, 0deg) * 0.5));
    }
    
    .caption-text {
        font-size: 1.2rem;
    }
    
    .caption-date {
        font-size: 0.75rem;
    }
    
    .polaroid.visible {
        transform: rotate(calc(var(--rotation, 0deg) * 0.5)) scale(1) translateY(0);
    }
    
    .caption-date {
        font-size: 1rem;
    }
    
    .caption-text {
        font-size: 1.35rem;
    }
    
    .progress-dots {
        bottom: 1rem;
        gap: 8px;
        padding: 0.4rem 0.6rem;
    }
    
    .month-board {
        grid-template-columns: 1fr;
        padding: 0.75rem;
        gap: 1rem;
    }
    
    .page-header {
        padding: 5rem 1rem 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .pine-row-back .pine {
        border-width: 0 15px 50px 15px;
    }
    
    .pine-row-mid .pine {
        border-width: 0 20px 70px 20px;
    }
    
    .pine-row-front .pine {
        border-width: 0 25px 90px 25px;
    }
}

/* ================================
   Accessibility
   ================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .gallery {
        scroll-behavior: auto;
    }
    
    .polaroid {
        opacity: 1;
        transform: rotate(var(--rotation, 0deg));
    }
    
    .snowflake {
        display: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --color-polaroid: #ffffff;
        --color-caption: #000000;
    }
}

/* ================================
   Landscape Warning (Mobile Only)
   ================================ */

.landscape-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-deep-green);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem;
}

.landscape-warning .rotate-icon {
    font-size: 4rem;
    animation: rotate-phone 2s ease-in-out infinite;
}

.landscape-warning p {
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--color-snow);
}

@keyframes rotate-phone {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-20deg); }
    75% { transform: rotate(20deg); }
}

/* Show landscape warning only on mobile in landscape */
@media (max-width: 900px) and (orientation: landscape) {
    .landscape-warning {
        display: flex;
    }
    
    .main-content,
    .sidebar,
    .menu-toggle {
        display: none !important;
    }
}

/* ================================
   Print Styles
   ================================ */

@media print {
    body {
        background: white;
    }
    
    .snowfall,
    .scene-background,
    .menu-toggle,
    .sidebar,
    .sidebar-overlay,
    .progress-dots,
    .string-lights {
        display: none !important;
    }
    
    .gallery {
        height: auto;
        overflow: visible;
    }
    
    .card-container {
        height: auto;
        page-break-after: always;
        padding: 2rem;
    }
    
    .polaroid {
        opacity: 1;
        transform: none;
        box-shadow: 0 0 0 1px #ccc;
    }
}

/* ================================
   Coupon Book Styles
   ================================ */

.coupons-page {
    padding-bottom: 4rem;
}

/* Loading State */
.coupon-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    gap: 1.5rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(224, 112, 32, 0.2);
    border-top-color: var(--color-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.coupon-loading p {
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

/* Coupon Book Grid */
.coupon-book {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 1rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Coupon Stack (contains card + shadows for depth) */
.coupon-stack {
    position: relative;
    perspective: 1000px;
}

.coupon-stack-shadow,
.coupon-stack-shadow-2 {
    position: absolute;
    top: 8px;
    left: 4px;
    right: -4px;
    bottom: -8px;
    background: rgba(248, 246, 240, 0.4);
    border-radius: 12px;
    z-index: -1;
    transform: rotate(1deg);
}

.coupon-stack-shadow-2 {
    top: 16px;
    left: 8px;
    right: -8px;
    bottom: -16px;
    background: rgba(248, 246, 240, 0.2);
    transform: rotate(2deg);
}

/* Individual Coupon Card */
.coupon-card {
    background: linear-gradient(135deg, #faf8f3 0%, #f0ebe0 100%);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.coupon-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 12px rgba(0, 0, 0, 0.15),
        0 16px 30px rgba(0, 0, 0, 0.2);
}

/* Perforation edge (left side tear-off look) */
.coupon-perforation {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 8px,
        rgba(0, 0, 0, 0.1) 8px,
        rgba(0, 0, 0, 0.1) 10px
    );
    border-right: 2px dashed rgba(0, 0, 0, 0.15);
}

.coupon-perforation::before {
    content: '✂';
    position: absolute;
    top: 10px;
    left: 2px;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.3);
    transform: rotate(90deg);
}

/* Coupon Content */
.coupon-content {
    margin-left: 1.5rem;
    text-align: center;
}

.coupon-emoji {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.coupon-title {
    font-family: var(--font-festive);
    font-size: 1.5rem;
    color: #2d2821;
    margin-bottom: 0.5rem;
}

.coupon-description {
    font-family: var(--font-handwritten);
    font-size: 1.1rem;
    color: #5a5248;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

/* Redeem Button */
.coupon-redeem-btn {
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-dark) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(224, 112, 32, 0.3);
}

.coupon-redeem-btn:hover {
    background: linear-gradient(135deg, var(--color-orange-light) 0%, var(--color-orange) 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(224, 112, 32, 0.4);
}

.coupon-redeem-btn:active {
    transform: scale(0.98);
}

/* Login to Redeem variant */
.coupon-redeem-btn.coupon-login-btn {
    background: linear-gradient(135deg, var(--color-forest-green) 0%, #1a5a3a 100%);
    box-shadow: 0 4px 12px rgba(26, 90, 58, 0.3);
}

.coupon-redeem-btn.coupon-login-btn:hover {
    background: linear-gradient(135deg, #2a7a4a 0%, var(--color-forest-green) 100%);
    box-shadow: 0 6px 16px rgba(26, 90, 58, 0.4);
}

/* Redeemed Badge */
.coupon-redeemed-badge {
    background: rgba(64, 160, 64, 0.15);
    color: #2d8a2d;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-family: var(--font-body);
    font-weight: 600;
    display: inline-block;
}

/* Count Badge */
.coupon-count {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-orange);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(224, 112, 32, 0.4);
}

.coupon-count .count-used {
    background: transparent;
    color: #888;
}

.coupon-stack.all-redeemed .coupon-count {
    background: rgba(100, 100, 100, 0.2);
    color: #666;
    box-shadow: none;
}

.coupon-stack.all-redeemed .coupon-card {
    opacity: 0.7;
    filter: grayscale(30%);
}

/* Two-Piece Tear Animation
 * Inspired by:
 * - LottieFiles coupon rip animation by Samuel Osborne
 *   https://lottiefiles.com/free-animation/coupon-rip-ZFP7flFAgy
 * - CSS-Tricks clip-path technique
 *   https://css-tricks.com/clipping-masking-css/
 * - Spring physics easing from easings.net
 */

/* Wrapper holds both stub and main card */
.coupon-wrapper {
    position: relative;
}

/* The stub that stays behind - hidden by default */
.coupon-stub {
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 100%;
    /* Match the coupon card gradient */
    background: linear-gradient(135deg, #faf8f3 0%, #f0ebe0 100%);
    border-radius: 12px 0 0 12px;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    box-shadow: 
        2px 0 8px rgba(0,0,0,0.15),
        inset -2px 0 4px rgba(0,0,0,0.05);
    overflow: visible;
}

/* Perforation lines on the stub (matching the original) */
.coupon-stub .stub-perforation {
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    width: 12px;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 8px,
        rgba(0, 0, 0, 0.1) 8px,
        rgba(0, 0, 0, 0.1) 10px
    );
    border-right: 2px dashed rgba(0, 0, 0, 0.15);
}

/* Scissors mark on stub */
.coupon-stub::before {
    content: '✂';
    position: absolute;
    top: 8px;
    left: 5px;
    font-size: 0.65rem;
    color: rgba(0, 0, 0, 0.25);
    transform: rotate(90deg);
}

/* "USED" text on stub */
.coupon-stub::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    font-size: 0.5rem;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.15);
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Jagged torn edge on the stub */
.stub-edge {
    position: absolute;
    right: -8px;
    top: 0;
    width: 16px;
    height: 100%;
    /* Match the coupon card gradient */
    background: linear-gradient(135deg, #faf8f3 0%, #f0ebe0 100%);
    clip-path: polygon(
        0% 0%,
        30% 3%,
        10% 8%,
        40% 12%,
        15% 18%,
        35% 23%,
        5% 28%,
        30% 33%,
        10% 38%,
        40% 43%,
        20% 48%,
        35% 53%,
        5% 58%,
        25% 63%,
        15% 68%,
        40% 73%,
        10% 78%,
        30% 83%,
        5% 88%,
        35% 93%,
        20% 100%,
        0% 100%
    );
    /* Subtle shadow on torn edge */
    filter: drop-shadow(2px 0 2px rgba(0,0,0,0.1));
}

/* When tearing, show the stub */
.coupon-wrapper.tearing .coupon-stub {
    animation: showStub 0.1s ease-out forwards;
}

@keyframes showStub {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* The main card tears away */
.coupon-wrapper.tearing .coupon-card {
    animation: tearAway 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-origin: 20px 20px;
}

/* Jagged left edge appears on the tearing card */
.coupon-wrapper.tearing .coupon-card::after {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    width: 16px;
    height: 100%;
    background: linear-gradient(135deg, #faf8f3 0%, #f0ebe0 100%);
    clip-path: polygon(
        100% 0%,
        70% 3%,
        90% 8%,
        60% 12%,
        85% 18%,
        65% 23%,
        95% 28%,
        70% 33%,
        90% 38%,
        60% 43%,
        80% 48%,
        65% 53%,
        95% 58%,
        75% 63%,
        85% 68%,
        60% 73%,
        90% 78%,
        70% 83%,
        95% 88%,
        65% 93%,
        80% 100%,
        100% 100%
    );
    z-index: 10;
    opacity: 0;
    animation: showTornEdge 0.15s 0.05s ease-out forwards;
}

@keyframes showTornEdge {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Scissors snip animation */
.coupon-wrapper.tearing .coupon-perforation::before {
    animation: snipScissors 0.2s ease-out forwards;
}

@keyframes snipScissors {
    0% { transform: rotate(90deg) scale(1); color: rgba(0,0,0,0.3); }
    40% { transform: rotate(90deg) scale(1.4); color: rgba(0,0,0,0.7); }
    100% { transform: rotate(90deg) scale(1); color: rgba(0,0,0,0.3); }
}

@keyframes tearAway {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 1;
        clip-path: inset(0);
    }
    /* Tension - slight pull back */
    8% {
        transform: translateX(-8px) translateY(0) rotate(-1deg);
        clip-path: inset(0);
    }
    /* SNAP - the tear happens, clip off the left edge */
    15% {
        transform: translateX(15px) translateY(-5px) rotate(3deg);
        clip-path: inset(0 0 0 20px);
    }
    /* Swing away from pivot point */
    35% {
        transform: translateX(60px) translateY(-15px) rotate(12deg);
        clip-path: inset(0 0 0 20px);
        opacity: 0.95;
    }
    /* Continue arcing */
    60% {
        transform: translateX(130px) translateY(-35px) rotate(22deg);
        opacity: 0.7;
    }
    /* Float away and fade */
    100% {
        transform: translateX(220px) translateY(-60px) rotate(35deg);
        opacity: 0;
        clip-path: inset(0 0 0 20px);
    }
}

/* All Redeemed Celebration */
.all-redeemed-celebration {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.celebration-emoji {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: bounce 1s ease infinite;
}

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

.celebration-title {
    font-family: var(--font-festive);
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.celebration-text {
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.celebration-confetti {
    font-size: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.celebration-confetti span {
    animation: confetti 2s ease-in-out infinite;
}

.celebration-confetti span:nth-child(1) { animation-delay: 0s; }
.celebration-confetti span:nth-child(2) { animation-delay: 0.2s; }
.celebration-confetti span:nth-child(3) { animation-delay: 0.4s; }
.celebration-confetti span:nth-child(4) { animation-delay: 0.6s; }
.celebration-confetti span:nth-child(5) { animation-delay: 0.8s; }

@keyframes confetti {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-15px) rotate(10deg); opacity: 0.8; }
}

/* Redeemed History Section */
.redeemed-history {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.history-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.history-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.history-header h3 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.history-toggle-icon {
    font-size: 0.8rem;
    color: var(--color-orange);
    transition: transform 0.3s ease;
}

.history-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.history-list.visible {
    max-height: 1000px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-item:last-child {
    border-bottom: none;
}

.history-emoji {
    font-size: 1.5rem;
}

.history-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-title {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--color-text);
}

.history-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.history-check {
    color: #4ade80;
    font-size: 1.25rem;
}

/* Redemption Modal */
.redeem-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.redeem-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #faf8f3 0%, #f0ebe0 100%);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.redeem-modal.visible .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.modal-content h2 {
    font-family: var(--font-festive);
    font-size: 1.75rem;
    color: #2d2821;
    margin-bottom: 1rem;
}

.modal-coupon-name {
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--color-orange);
    margin-bottom: 0.5rem;
}

.modal-warning {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1.5rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-buttons .btn {
    min-width: 120px;
}

body.modal-open {
    overflow: hidden;
}

/* Error State */
.error-message {
    text-align: center;
    padding: 3rem 2rem;
    grid-column: 1 / -1;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.error-message p {
    font-family: var(--font-handwritten);
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* Coupon Page Responsive */
@media (max-width: 768px) {
    .coupon-book {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .coupon-card {
        padding: 1.25rem;
    }
    
    .coupon-emoji {
        font-size: 2.5rem;
    }
    
    .coupon-title {
        font-size: 1.3rem;
    }
    
    .coupon-description {
        font-size: 1rem;
    }
    
    .redeemed-history {
        padding: 0 1rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons .btn {
        width: 100%;
    }
    
    .celebration-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .coupon-book {
        padding: 0.75rem;
        gap: 1.5rem;
    }
    
    .page-header {
        padding-top: 5rem;
    }
}

/* ============================================
   UPLOAD MODAL
   ============================================ */

.upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 1rem;
}

.upload-modal.visible {
    opacity: 1;
    visibility: visible;
}

.upload-modal-content {
    background: linear-gradient(180deg, #faf6f0 0%, #f5ede0 100%);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.upload-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.upload-modal-close:hover {
    color: var(--color-red);
}

.upload-modal-content h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--color-forest-green);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Upload Form Fields */
.upload-field {
    margin-bottom: 1.25rem;
}

.upload-field label {
    display: block;
    font-family: var(--font-handwritten);
    font-size: 1.1rem;
    color: #4a453d;
    margin-bottom: 0.5rem;
}

.upload-field input[type="text"],
.upload-field input[type="date"],
.upload-field select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #d4c8b8;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: #fff;
    transition: border-color 0.2s;
}

.upload-field input:focus,
.upload-field select:focus {
    outline: none;
    border-color: var(--color-orange);
}

/* Dropzone */
.upload-dropzone {
    border: 3px dashed #c4b8a8;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--color-orange);
    background: rgba(224, 112, 32, 0.05);
}

.upload-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #888;
}

.dropzone-icon {
    font-size: 3rem;
}

.dropzone-preview {
    position: relative;
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Polaroid-style preview container */
.dropzone-preview-frame {
    position: relative;
    width: 200px;
    height: 240px;
    background: var(--color-polaroid, #f8f6f0);
    padding: 12px 12px 40px 12px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
}

.dropzone-preview-frame::after {
    content: 'Preview';
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-handwritten);
    font-size: 0.9rem;
    color: #888;
}

.dropzone-preview-frame img,
.dropzone-preview-frame video {
    width: 100%;
    height: 100%;
    border-radius: 2px;
    object-fit: cover;
    object-position: center;
}

.dropzone-preview-hint {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 0.25rem;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-red);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.preview-remove:hover {
    background: #b93030;
}

/* Upload Actions */
.upload-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.upload-actions .btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-actions .btn-secondary {
    background: #e0d8cc;
    border: none;
    color: #4a453d;
}

.upload-actions .btn-secondary:hover {
    background: #d4c8b8;
}

.upload-actions .btn-primary {
    background: var(--color-forest-green);
    border: none;
    color: white;
}

.upload-actions .btn-primary:hover:not(:disabled) {
    background: #1a5a3a;
}

.upload-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Upload Progress */
.upload-progress {
    margin-top: 1.5rem;
    text-align: center;
}

.progress-bar {
    height: 8px;
    background: #e0d8cc;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-forest-green), var(--color-orange));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-family: var(--font-handwritten);
    font-size: 1rem;
    color: #666;
}

/* Upload Modal Responsive */
@media (max-width: 768px) {
    .upload-modal-content {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .upload-modal-content h2 {
        font-size: 1.5rem;
    }
    
    .upload-actions {
        flex-direction: column;
    }
}

/* ============================================
   ADMIN PAGE STYLES
   ============================================ */

.admin-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 5rem 1rem 2rem;
}

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

.admin-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-cream);
    margin-bottom: 0.5rem;
}

.admin-header p {
    font-family: var(--font-handwritten);
    font-size: 1.25rem;
    color: var(--color-gold);
}

/* Admin Sections */
.admin-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.admin-section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-forest-green);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0d8cc;
    text-align: center;
}

/* Memory list empty state */
/* User List */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-item {
    background: #faf6f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-email {
    color: #333;
    font-weight: 500;
    font-size: 1rem;
}

.user-status {
    color: #888;
    font-size: 0.85rem;
}

.user-actions .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.user-actions .btn-danger {
    background: #c84040;
    color: white;
    border: none;
}

.user-actions .btn-danger:hover {
    background: #a33;
}

.user-item.user-disabled {
    opacity: 0.6;
    background: #f0f0f0;
}

.user-revoked-label {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.memory-list p {
    text-align: center;
}

/* Memory List */
.memory-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.memory-item {
    background: #faf6f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.memory-item:hover {
    border-color: var(--color-orange);
}

.memory-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.memory-info {
    flex: 1;
    min-width: 0;
}

.memory-info h4 {
    font-family: var(--font-handwritten);
    font-size: 1.1rem;
    color: #2d2821;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.memory-info p {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.memory-actions {
    display: flex;
    gap: 0.5rem;
}

.memory-actions button {
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.memory-actions .btn-edit {
    background: var(--color-orange);
    color: white;
}

.memory-actions .btn-edit:hover {
    background: #c86018;
}

.memory-actions .btn-delete {
    background: var(--color-red);
    color: white;
}

.memory-actions .btn-delete:hover {
    background: #b93030;
}

/* Coupon Admin Table */
.coupon-table {
    width: 100%;
    border-collapse: collapse;
}

.coupon-table th,
.coupon-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e0d8cc;
}

.coupon-table th {
    font-family: var(--font-handwritten);
    font-size: 1rem;
    color: #4a453d;
    background: #f5ede0;
}

.coupon-table td {
    font-size: 0.9rem;
    color: #2d2821;
}

.coupon-table .status-available {
    color: var(--color-forest-green);
    font-weight: 600;
}

.coupon-table .status-redeemed {
    color: var(--color-red);
}

.coupon-table .btn-unredeem {
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    background: var(--color-forest-green);
    color: white;
    transition: background 0.2s;
}

.coupon-table .btn-unredeem:hover {
    background: #1a5a3a;
}

.coupon-table .btn-unredeem:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Admin Bulk Actions */
.admin-bulk-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.admin-bulk-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.admin-bulk-actions .btn-outline {
    background: transparent;
    border: 2px solid var(--color-forest-green);
    color: var(--color-forest-green);
}

.admin-bulk-actions .btn-outline:hover {
    background: var(--color-forest-green);
    color: white;
}

.admin-bulk-actions .btn-danger {
    background: var(--color-red);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-bulk-actions .btn-danger:hover {
    background: #a83030;
}

/* Password Prompt */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.password-box {
    background: linear-gradient(180deg, #faf6f0 0%, #f5ede0 100%);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.password-box h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-forest-green);
    margin-bottom: 0.5rem;
}

.password-box p {
    font-family: var(--font-handwritten);
    color: #666;
    margin-bottom: 1.5rem;
}

.password-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #d4c8b8;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.password-box input:focus {
    outline: none;
    border-color: var(--color-orange);
}

.password-box .btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: var(--color-forest-green);
    border: none;
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.password-box .btn-primary:hover {
    background: #1a5a3a;
}

.password-error {
    color: var(--color-red);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

/* Admin Responsive */
@media (max-width: 768px) {
    .admin-header h1 {
        font-size: 2rem;
    }
    
    .memory-list {
        grid-template-columns: 1fr;
    }
    
    .coupon-table {
        font-size: 0.85rem;
    }
    
    .coupon-table th,
    .coupon-table td {
        padding: 0.5rem;
    }
    
    .admin-bulk-actions {
        flex-direction: column;
    }
    
    .admin-bulk-actions .btn {
        width: 100%;
    }
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.6s ease-out;
}

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

.login-card {
    background: rgba(20, 30, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(196, 30, 58, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-header h1 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--color-snow);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* Login Tabs */
.login-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 10px;
}

.login-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.login-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.login-tab.active {
    background: var(--color-forest-green);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 90, 58, 0.3);
}

/* Login Forms */
.login-form {
    display: none;
}

.login-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-forest-green);
    box-shadow: 0 0 0 3px rgba(26, 90, 58, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.form-error {
    color: var(--color-red);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    min-height: 1.2em;
}

.login-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    position: relative;
}

.login-submit .btn-text {
    display: inline;
}

.login-submit .btn-loading {
    display: none;
}

.login-submit.loading .btn-text {
    display: none;
}

.login-submit.loading .btn-loading {
    display: inline;
}

.login-submit.loading {
    opacity: 0.7;
    cursor: wait;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: var(--color-snow);
}

/* Register notice */
.register-notice {
    background: rgba(212, 160, 74, 0.15);
    border: 1px solid rgba(212, 160, 74, 0.3);
    color: #d4a04a;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* Register success message */
.register-success {
    text-align: center;
    padding: 1.5rem 0;
}

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

.register-success h3 {
    color: var(--color-snow);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.register-success p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Login page - Access Denied state */
.access-denied {
    text-align: center;
    padding: 2rem;
}

.access-denied h2 {
    color: var(--color-red);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.access-denied p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

/* Login Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.8rem;
    }
    
    .login-tab {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .form-group input {
        padding: 0.75rem;
    }
}

/* ===== CHRISTMAS TEASER (Pre-Dec 25th Gate) ===== */

/* Override coupon-book grid when showing teaser */
.coupon-book:has(.christmas-teaser) {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-template-columns: none;
}

.christmas-teaser {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.teaser-card {
    position: relative;
    background: linear-gradient(135deg, #c84040 0%, #8b2020 100%);
    border-radius: 20px;
    padding: 3rem 3.5rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 4px rgba(212, 160, 74, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: teaser-appear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes teaser-appear {
    from { 
        opacity: 0; 
        transform: scale(0.8) translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

/* Ribbon decoration */
.teaser-ribbon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212, 160, 74, 0.3) 20%,
        rgba(212, 160, 74, 0.5) 50%,
        rgba(212, 160, 74, 0.3) 80%,
        transparent 100%
    );
    pointer-events: none;
}

.teaser-ribbon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 60px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(212, 160, 74, 0.3) 20%,
        rgba(212, 160, 74, 0.5) 50%,
        rgba(212, 160, 74, 0.3) 80%,
        transparent 100%
    );
}

.teaser-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: teaser-shake 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
}

@keyframes teaser-shake {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-5deg); }
    20% { transform: rotate(5deg); }
    30% { transform: rotate(-3deg); }
    40% { transform: rotate(3deg); }
    50%, 100% { transform: rotate(0deg); }
}

.teaser-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 5;
}

.teaser-subtitle {
    font-family: var(--font-handwritten);
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    position: relative;
    z-index: 5;
}

.teaser-countdown {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 5;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(212, 160, 74, 0.6);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    min-width: 70px;
    backdrop-filter: blur(4px);
}

.countdown-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.countdown-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.25rem;
}

.teaser-footer {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    position: relative;
    z-index: 5;
}

.teaser-decorations {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    font-size: 1.25rem;
    position: relative;
    z-index: 5;
}

.teaser-decorations span {
    animation: teaser-twinkle 2s ease-in-out infinite;
}

.teaser-decorations span:nth-child(1) { animation-delay: 0s; }
.teaser-decorations span:nth-child(2) { animation-delay: 0.3s; }
.teaser-decorations span:nth-child(3) { animation-delay: 0.6s; }
.teaser-decorations span:nth-child(4) { animation-delay: 0.9s; }
.teaser-decorations span:nth-child(5) { animation-delay: 1.2s; }

@keyframes teaser-twinkle {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* Teaser Responsive */
@media (max-width: 480px) {
    .teaser-card {
        padding: 2.5rem 1.5rem;
        margin: 1rem;
    }
    
    .teaser-icon {
        font-size: 3rem;
    }
    
    .teaser-title {
        font-size: 1.5rem;
    }
    
    .teaser-subtitle {
        font-size: 1.1rem;
    }
    
    .teaser-countdown {
        gap: 0.5rem;
    }
    
    .countdown-item {
        padding: 0.5rem 0.75rem;
        min-width: 55px;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    .countdown-label {
        font-size: 0.55rem;
    }
}
