/* ============================================================
   1Party — Design System
   Mobile-first, light/dark, premium celebration platform
   ============================================================ */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ============================================================
   1. Design Tokens (CSS Custom Properties)
   ============================================================ */

:root {
    /* --- Colors: Light Mode --- */
    --color-bg:             #FAFBFE;
    --color-bg-alt:         #F0F2F8;
    --color-surface:        #FFFFFF;
    --color-surface-hover:  #F5F6FA;
    --color-surface-glass:  rgba(255, 255, 255, 0.72);
    --color-border:         rgba(0, 0, 0, 0.08);
    --color-border-strong:  rgba(0, 0, 0, 0.15);

    --color-text:           #1A1D2E;
    --color-text-secondary: #6B7194;
    --color-text-muted:     #9CA3C4;

    --color-primary:        #7C5CFC;
    --color-primary-hover:  #6A48E8;
    --color-primary-light:  rgba(124, 92, 252, 0.12);
    --color-primary-text:   #FFFFFF;

    --color-accent:         #FF6B8A;
    --color-accent-hover:   #E85577;
    --color-accent-light:   rgba(255, 107, 138, 0.12);

    --color-success:        #22C97A;
    --color-success-light:  rgba(34, 201, 122, 0.12);
    --color-warning:        #FFB020;
    --color-warning-light:  rgba(255, 176, 32, 0.12);
    --color-danger:         #F04438;
    --color-danger-light:   rgba(240, 68, 56, 0.12);

    --color-gold:           #F5A623;
    --color-confetti-1:     #7C5CFC;
    --color-confetti-2:     #FF6B8A;
    --color-confetti-3:     #22C97A;
    --color-confetti-4:     #FFB020;
    --color-confetti-5:     #3B82F6;

    /* --- Gradients --- */
    --gradient-primary:     linear-gradient(135deg, #7C5CFC 0%, #FF6B8A 100%);
    --gradient-warm:        linear-gradient(135deg, #FF6B8A 0%, #FFB020 100%);
    --gradient-cool:        linear-gradient(135deg, #3B82F6 0%, #7C5CFC 100%);
    --gradient-surface:     linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);

    /* --- Shadows --- */
    --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg:    0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-xl:    0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow:  0 0 20px rgba(124, 92, 252, 0.25);

    /* --- Typography --- */
    --font-family:    'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-xs:        0.75rem;     /* 12px */
    --font-sm:        0.875rem;    /* 14px */
    --font-md:        1rem;        /* 16px */
    --font-lg:        1.125rem;    /* 18px */
    --font-xl:        1.25rem;     /* 20px */
    --font-2xl:       1.5rem;      /* 24px */
    --font-3xl:       2rem;        /* 32px */
    --font-4xl:       2.5rem;      /* 40px */
    --font-5xl:       3.5rem;      /* 56px */

    --weight-light:   300;
    --weight-regular: 400;
    --weight-medium:  500;
    --weight-semi:    600;
    --weight-bold:    700;

    --line-height:    1.6;
    --line-tight:     1.2;

    /* --- Spacing --- */
    --space-xs:    0.25rem;   /* 4px */
    --space-sm:    0.5rem;    /* 8px */
    --space-md:    1rem;      /* 16px */
    --space-lg:    1.5rem;    /* 24px */
    --space-xl:    2rem;      /* 32px */
    --space-2xl:   3rem;      /* 48px */
    --space-3xl:   4rem;      /* 64px */

    /* --- Radius --- */
    --radius-sm:   0.375rem;   /* 6px */
    --radius-md:   0.75rem;    /* 12px */
    --radius-lg:   1rem;       /* 16px */
    --radius-xl:   1.5rem;     /* 24px */
    --radius-full: 9999px;

    /* --- Z-Index --- */
    --z-dropdown:  100;
    --z-sticky:    200;
    --z-modal:     300;
    --z-toast:     400;
    --z-overlay:   500;

    /* --- Transitions --- */
    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast:   150ms;
    --duration-normal: 250ms;
    --duration-slow:   400ms;

    /* --- Layout --- */
    --max-width:    1200px;
    --nav-height:   64px;
}

/* ============================================================
   2. Dark Mode
   ============================================================ */

[data-theme="dark"] {
    --color-bg:             #0F1117;
    --color-bg-alt:         #181B27;
    --color-surface:        #1E2132;
    --color-surface-hover:  #262A3D;
    --color-surface-glass:  rgba(30, 33, 50, 0.80);
    --color-border:         rgba(255, 255, 255, 0.08);
    --color-border-strong:  rgba(255, 255, 255, 0.15);

    --color-text:           #F0F2F8;
    --color-text-secondary: #9CA3C4;
    --color-text-muted:     #6B7194;

    --color-primary:        #9B82FC;
    --color-primary-hover:  #B09EFF;
    --color-primary-light:  rgba(155, 130, 252, 0.15);

    --color-accent:         #FF85A1;
    --color-accent-light:   rgba(255, 133, 161, 0.15);

    --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.20);
    --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg:    0 8px 24px rgba(0, 0, 0, 0.30);
    --shadow-xl:    0 16px 48px rgba(0, 0, 0, 0.35);
    --shadow-glow:  0 0 20px rgba(155, 130, 252, 0.30);

    color-scheme: dark;
}

[data-theme="dark"] select,
[data-theme="dark"] select option {
    background-color: var(--color-surface);
    color: var(--color-text);
}

/* Auto dark mode from OS preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg:             #0F1117;
        --color-bg-alt:         #181B27;
        --color-surface:        #1E2132;
        --color-surface-hover:  #262A3D;
        --color-surface-glass:  rgba(30, 33, 50, 0.80);
        --color-border:         rgba(255, 255, 255, 0.08);
        --color-border-strong:  rgba(255, 255, 255, 0.15);
        --color-text:           #F0F2F8;
        --color-text-secondary: #9CA3C4;
        --color-text-muted:     #6B7194;
        --color-primary:        #9B82FC;
        --color-primary-hover:  #B09EFF;
        --color-primary-light:  rgba(155, 130, 252, 0.15);
        --color-accent:         #FF85A1;
        --color-accent-light:   rgba(255, 133, 161, 0.15);
        --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.20);
        --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.25);
        --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.30);
        --shadow-xl:  0 16px 48px rgba(0, 0, 0, 0.35);
        --shadow-glow:  0 0 20px rgba(155, 130, 252, 0.30);

        color-scheme: dark;
    }

    :root:not([data-theme="light"]) select,
    :root:not([data-theme="light"]) select option {
        background-color: var(--color-surface);
        color: var(--color-text);
    }
}

/* Respect motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   3. Reset & Base
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-md);
    font-weight: var(--weight-regular);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--gradient-surface);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Global content padding */
#tp-main {
    padding: 0 var(--space-md);
}
.container.page {
    max-width: 600px;
    margin: 0 auto;
    padding-top: var(--space-lg);
    padding-bottom: var(--space-xl);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--color-primary-hover); }

button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ============================================================
   4. Layout Utilities
   ============================================================ */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.page {
    padding-top: var(--space-xl);
    padding-bottom: calc(var(--space-3xl) + 60px); /* room for bottom nav */
}

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs     { gap: var(--space-xs); }
.gap-sm     { gap: var(--space-sm); }
.gap-md     { gap: var(--space-md); }
.gap-lg     { gap: var(--space-lg); }
.gap-xl     { gap: var(--space-xl); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    /* grid-2 stays as 2 columns on mobile for event type cards etc. */
}

.text-center    { text-align: center; }
.text-right     { text-align: right; }
.text-muted     { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }

.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ============================================================
   5. Components
   ============================================================ */

/* --- Card --- */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-normal) var(--ease-out),
                transform var(--duration-normal) var(--ease-out);
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.card-glass {
    background: var(--color-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* --- Button --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.7rem 1.5rem;
    font-size: var(--font-md);
    font-weight: var(--weight-semi);
    border: none;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-primary-text);
    box-shadow: var(--shadow-md);
}
.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    filter: brightness(1.05);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
}
.btn-secondary:hover {
    background: var(--color-surface-hover);
}

.btn-accent {
    background: var(--gradient-warm);
    color: #FFFFFF;
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    padding: 0.5rem 1rem;
}
.btn-ghost:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.btn-sm { padding: 0.45rem 1rem; font-size: var(--font-sm); }
.btn-lg { padding: 0.85rem 2rem; font-size: var(--font-lg); }
.btn-icon {
    width: 40px; height: 40px; padding: 0;
    border-radius: var(--radius-full);
}

/* Button ripple effect */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--duration-fast);
}
.btn:active::after { opacity: 1; }

/* --- Input --- */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
.input-group label {
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
}

.input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: var(--font-md);
    background: var(--color-surface);
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: border-color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
    outline: none;
}
.input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
.input::placeholder { color: var(--color-text-muted); }

.input-error { border-color: var(--color-danger); }
.input-error:focus { box-shadow: 0 0 0 3px var(--color-danger-light); }

textarea.input {
    min-height: 100px;
    resize: vertical;
}

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7194' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Toggle Switch --- */
.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .toggle-track {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-border-strong);
    border-radius: var(--radius-full);
    transition: background var(--duration-fast);
}
.toggle input:checked + .toggle-track {
    background: var(--color-primary);
}
.toggle .toggle-thumb {
    position: absolute;
    left: 3px; top: 3px;
    width: 20px; height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform var(--duration-fast) var(--ease-spring);
}
.toggle input:checked ~ .toggle-thumb {
    transform: translateX(22px);
}

/* --- Badge --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.2rem 0.7rem;
    font-size: var(--font-xs);
    font-weight: var(--weight-semi);
    border-radius: var(--radius-full);
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-light);  color: var(--color-danger); }
.badge-accent  { background: var(--color-accent-light);  color: var(--color-accent); }

/* --- Stat Card --- */
.stat-card {
    text-align: center;
    padding: var(--space-lg);
}
.stat-value {
    font-size: var(--font-3xl);
    font-weight: var(--weight-bold);
    line-height: var(--line-tight);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    font-size: var(--font-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* --- Avatar --- */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-weight: var(--weight-semi);
    font-size: var(--font-sm);
    flex-shrink: 0;
}
.avatar-lg { width: 56px; height: 56px; font-size: var(--font-lg); }

/* --- Toast / Notification --- */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}
.toast {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--color-primary);
    pointer-events: auto;
    animation: slideIn var(--duration-normal) var(--ease-spring);
    max-width: 380px;
}
.toast-success { border-left-color: var(--color-success); }
.toast-error   { border-left-color: var(--color-danger); }
.toast-warning { border-left-color: var(--color-warning); }

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    animation: fadeIn var(--duration-fast) var(--ease-out);
}
.modal {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: scaleIn var(--duration-normal) var(--ease-spring);
}
.modal-title {
    font-size: var(--font-xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-md);
}

/* --- Navigation (Old Navbar - keeping partial for possible reuse, though unused) --- */
.nav {
    display: none; /* hidden globally in favor of sidebar */
}

/* --- App Layout (Sidebar + Main) --- */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 260px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-sticky);
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.nav-section {
    display: flex;
    flex-direction: column;
    padding: 0 var(--space-md);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.sidebar-link:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}
.sidebar-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: var(--weight-semi);
}
.sidebar-link .icon {
    font-size: 18px;
    display: inline-block;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.main-wrapper {
    flex: 1;
    margin-left: 260px; /* match sidebar width */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.mobile-header {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: calc(var(--z-sticky) - 1);
}

.hidden-desktop { display: none !important; }
.hidden-mobile { display: flex !important; }

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .hidden-desktop { display: flex !important; }
    .hidden-mobile { display: none !important; }
    .hidden-mobile.open { display: flex !important; }
}


.nav-brand {
    font-size: var(--font-xl);
    font-weight: var(--weight-bold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Event Sub-Navigation --- */
.event-subnav {
    position: sticky;
    top: var(--nav-height);
    z-index: calc(var(--z-sticky) - 1);
    background: var(--color-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    animation: fadeIn var(--duration-fast) var(--ease-out);
}
.event-subnav-inner {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    overflow: hidden;
}
.event-subnav-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    padding: var(--space-sm) 0;
    min-width: 0;
}
.event-subnav-info h2 {
    font-size: var(--font-md);
    font-weight: var(--weight-bold);
    white-space: nowrap;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.event-subnav-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: var(--space-xs) 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}
.event-subnav-tabs::-webkit-scrollbar { display: none; }

.event-subnav-tab {
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: var(--font-xs);
    font-weight: var(--weight-medium);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}
.event-subnav-tab:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.event-subnav-tab.active {
    background: var(--gradient-primary);
    color: var(--color-primary-text);
    font-weight: var(--weight-semi);
    box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}
@media (max-width: 768px) {
    .event-subnav-inner { gap: var(--space-sm); padding: 0 var(--space-sm); }
    .event-subnav-info h2 { max-width: 120px; font-size: var(--font-sm); }
    .event-subnav-tab { font-size: 11px; padding: 6px 10px; }
}

/* --- Loading Skeleton --- */
.skeleton {
    background: linear-gradient(90deg,
        var(--color-bg-alt) 25%,
        var(--color-surface-hover) 50%,
        var(--color-bg-alt) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: var(--radius-md);
}

/* --- Progress Bar --- */
.progress {
    height: 8px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out);
}

/* --- Pill Toggle --- */
.pill-group {
    display: inline-flex;
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 2px;
}
.pill {
    padding: 0.4rem 1rem;
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    transition: all var(--duration-fast) var(--ease-out);
}
.pill.active, .pill:hover {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   6. Animations
   ============================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}
@keyframes confetti {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.animate-fadeIn  { animation: fadeIn var(--duration-normal) var(--ease-out); }
.animate-slideUp { animation: slideUp var(--duration-normal) var(--ease-out); }
.animate-scaleIn { animation: scaleIn var(--duration-normal) var(--ease-spring); }
.animate-pulse   { animation: pulse 2s infinite; }

/* ============================================================
   7. Page Layouts
   ============================================================ */

.page {
    min-height: calc(100vh - var(--nav-height));
    padding: var(--space-xl) 0;
}

.page-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100vh - var(--nav-height));
    padding: var(--space-xl) var(--space-md);
}

/* --- Login Page --- */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-xl) var(--space-md);
    text-align: center;
}
.login-logo {
    font-size: clamp(2rem, 8vw, var(--font-4xl));
    white-space: nowrap;
    font-weight: var(--weight-bold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}
.login-tagline {
    font-size: var(--font-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}
.login-card {
    width: 100%;
    max-width: 420px;
    padding: var(--space-xl);
}
.phone-input-row {
    display: flex;
    gap: var(--space-sm);
    align-items: stretch;
}
.phone-input-row .input {
    flex: 1;
    min-width: 0;
}
.phone-input-row .btn {
    flex-shrink: 0;
    white-space: nowrap;
    width: auto !important;
}
.login-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    font-size: var(--font-sm);
    color: var(--color-text-muted);
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.social-buttons .btn {
    width: 100%;
    justify-content: center;
}
.social-buttons .btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* --- Dashboard --- */
.dashboard-header {
    margin-bottom: var(--space-xl);
}
.dashboard-header h1 {
    font-size: var(--font-2xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-xs);
}
.dashboard-header p {
    color: var(--color-text-secondary);
}
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}
@media (max-width: 640px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* --- Loading Fade --- */
.fade-out {
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

.hero {
    padding: var(--space-3xl) var(--space-md);
    text-align: center;
}
.hero-title {
    font-size: var(--font-4xl);
    font-weight: var(--weight-bold);
    line-height: var(--line-tight);
    margin-bottom: var(--space-md);
}
.hero-subtitle {
    font-size: var(--font-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero-title { font-size: var(--font-3xl); }
    .hero-subtitle { font-size: var(--font-md); }
}

/* ============================================================
   8. Online Status Indicator
   ============================================================ */

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    display: inline-block;
}
.status-online  { background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.status-offline { background: var(--color-text-muted); }
.status-busy    { background: var(--color-warning); }

/* ============================================================
   9. Mobile Bottom Navigation
   ============================================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    padding: var(--space-sm) 0;
    padding-bottom: max(var(--space-sm), env(safe-area-inset-bottom));
    z-index: var(--z-sticky);
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-xs) var(--space-sm);
    color: var(--color-text-muted);
    font-size: var(--font-xs);
    font-weight: var(--weight-medium);
    border: none;
    background: transparent;
    transition: color var(--duration-fast);
}
.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--color-primary);
}
.bottom-nav-item svg {
    width: 22px;
    height: 22px;
}

@media (min-width: 769px) {
    .bottom-nav { display: none; }
}

/* ============================================================
   10. Scrollbar
   ============================================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* ============================================================
   11. Page Centered Layout
   ============================================================ */

.page-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height));
    padding: var(--space-xl);
    text-align: center;
}

/* ============================================================
   12. Guest Book — Immersive Kiosk & Tab
   ============================================================ */

.gb-cursive {
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
}

/* --- Kiosk: Full-Screen Container --- */
.gb-kiosk {
    position: fixed;
    inset: 0;
    background: #000;
    color: #fff;
    z-index: var(--z-modal);
    overflow: hidden;
    font-family: var(--font-family);
}
.gb-kiosk-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2;
}
.gb-kiosk-hero {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: var(--space-xl);
}
.gb-kiosk-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #FDE68A;
    margin-bottom: var(--space-xl);
    line-height: 1.2;
    text-shadow: 0 4px 30px rgba(253, 230, 138, 0.3);
}
.gb-kiosk-cta {
    background: #FDE68A;
    color: #000;
    font-weight: var(--weight-bold);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    padding: 1.2rem 3rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(253, 230, 138, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: gb-breathe 4s ease-in-out infinite;
}
.gb-kiosk-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 48px rgba(253, 230, 138, 0.5);
}
@keyframes gb-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.gb-kiosk-browse {
    position: absolute;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 4;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-weight: var(--weight-bold);
    font-size: var(--font-lg);
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.3s;
}
.gb-kiosk-browse:hover { background: rgba(0, 0, 0, 0.7); }

/* --- Scrolling Entries Background --- */
.gb-scroll-track {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}
.gb-scroll-inner {
    display: flex;
    flex-direction: column;
}
.gb-scroll-inner.scrolling {
    animation: gb-scroll-up var(--gb-scroll-duration, 60s) linear infinite;
}
@keyframes gb-scroll-up {
    from { transform: translateY(0); }
    to { transform: translateY(var(--gb-scroll-height, -50%)); }
}
/* The entry blocks (and their seamless-scroll clone) tile into responsive
   columns so the wall fills the screen instead of a single left column. */
#gb-scroll-entries,
#gb-scroll-clone {
    column-width: clamp(260px, 22vw, 340px);
    column-gap: var(--space-2xl);
    padding: var(--space-2xl) var(--space-3xl) 0;
}
.gb-scroll-entry {
    break-inside: avoid;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    /* Gentle, staggered drift so the wall feels alive even with a few entries. */
    animation: gbFloat 6s ease-in-out infinite;
    will-change: transform;
}
.gb-scroll-entry:nth-child(3n)   { animation-duration: 7.5s; animation-delay: -1.5s; }
.gb-scroll-entry:nth-child(3n+1) { animation-duration: 8.5s; animation-delay: -3s; }
@keyframes gbFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) {
    .gb-scroll-entry { animation: none; }
}
.gb-scroll-entry-text {
    text-align: center;
}
.gb-scroll-name {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: #FDE68A;
    margin-bottom: var(--space-xs);
}
.gb-scroll-date {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: var(--space-sm);
}
.gb-scroll-message {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-style: italic;
}
.gb-scroll-message::before { content: '\201C'; }
.gb-scroll-message::after { content: '\201D'; }

/* --- Sign Form (Modal over kiosk) --- */
.gb-sign-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: calc(var(--z-modal) + 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    animation: fadeIn var(--duration-fast) var(--ease-out);
}
.gb-sign-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-xl) var(--space-lg);
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: scaleIn var(--duration-normal) var(--ease-spring);
}
.gb-sign-title {
    font-family: 'Dancing Script', cursive;
    font-size: var(--font-3xl);
    color: #FDE68A;
    text-align: center;
    margin-bottom: var(--space-lg);
}
.gb-sign-input {
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: var(--font-lg);
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    color: var(--color-text);
    outline: none;
    transition: border-color var(--duration-fast);
}
.gb-sign-input:focus {
    border-color: #FDE68A;
    box-shadow: 0 0 0 3px rgba(253, 230, 138, 0.2);
}
.gb-sign-input::placeholder { color: var(--color-text-muted); }
.gb-sign-submit {
    width: 100%;
    padding: 1rem;
    font-size: var(--font-lg);
    font-weight: var(--weight-bold);
    background: #FDE68A;
    color: #000;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.gb-sign-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(253, 230, 138, 0.4);
}
.gb-sign-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* --- Thank You Screen --- */
.gb-thanks {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: calc(var(--z-modal) + 2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn var(--duration-normal) var(--ease-out);
}
.gb-thanks-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(3rem, 10vw, 6rem);
    color: #FDE68A;
    margin-bottom: var(--space-md);
}
.gb-thanks-sub {
    font-size: var(--font-xl);
    color: rgba(255, 255, 255, 0.6);
}

/* --- Guest Tab Entry Cards (inside public event page) --- */
.gb-entry-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-sm);
    transition: border-color 0.2s;
}
.gb-entry-card:hover { border-color: var(--color-border-strong); }
.gb-entry-name {
    font-family: 'Dancing Script', cursive;
    font-size: var(--font-xl);
    color: var(--color-primary);
    margin-bottom: 2px;
}
.gb-entry-date {
    font-size: var(--font-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}
.gb-entry-message {
    font-size: var(--font-md);
    line-height: 1.6;
    font-style: italic;
    color: var(--color-text-secondary);
}
.gb-entry-message::before { content: '\201C'; }
.gb-entry-message::after { content: '\201D'; }

/* --- Browse Grid (kiosk) --- */
.gb-grid {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: calc(var(--z-modal) + 1);
    display: flex;
    flex-direction: column;
    animation: fadeIn var(--duration-fast) var(--ease-out);
}
.gb-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    flex-shrink: 0;
}
.gb-grid-header h2 {
    font-family: 'Dancing Script', cursive;
    font-size: var(--font-2xl);
    color: #FDE68A;
}
.gb-grid-body {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
    padding: 0 var(--space-lg) var(--space-lg);
    /* Keep cards at the top sized to content instead of stretching the row. */
    align-content: start;
    align-items: start;
}
.gb-grid-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.gb-grid-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.gb-grid-card-name {
    font-family: 'Dancing Script', cursive;
    font-size: var(--font-lg);
    color: #FDE68A;
    margin-bottom: var(--space-xs);
}
.gb-grid-card-msg {
    font-size: var(--font-sm);
    color: var(--color-text-secondary);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Camera Capture (Kiosk) --- */
.gb-camera-page {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: calc(var(--z-modal) + 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    animation: fadeIn var(--duration-fast) var(--ease-out);
}
.gb-camera-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #FDE68A;
}
/* Text grows in on the camera screen (preferred over a pulsing button). */
.gb-grow-in {
    transform-origin: center;
    animation: gbGrowIn 750ms var(--ease-spring, cubic-bezier(.34,1.56,.64,1)) both;
}
@keyframes gbGrowIn {
    0%   { transform: scale(0.6); opacity: 0; }
    65%  { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); }
}
.gb-camera-mode-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: var(--radius-full);
    gap: 2px;
}
.gb-camera-mode-btn {
    padding: 0.5rem 1.5rem;
    font-size: var(--font-md);
    font-weight: var(--weight-bold);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
}
.gb-camera-mode-btn.active {
    background: #FDE68A;
    color: #000;
}
.gb-camera-preview {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.15);
    background: #111;
}
.gb-camera-preview video,
.gb-camera-preview canvas,
.gb-camera-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gb-camera-rec {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    background: #dc2626;
    color: #fff;
    font-weight: var(--weight-bold);
    font-size: var(--font-sm);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 6px;
}
.gb-camera-rec-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1s infinite;
}
.gb-camera-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    height: 100px;
}
.gb-capture-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    border: 5px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, border-color 0.2s;
}
.gb-capture-btn:hover {
    transform: scale(1.08);
    border-color: #FDE68A;
}
.gb-capture-btn.recording {
    border-color: #dc2626;
}
.gb-capture-btn.recording .gb-capture-inner {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #dc2626;
}
.gb-capture-inner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #dc2626;
    transition: all 0.2s;
}
.gb-capture-inner.photo {
    background: #fff;
    border-radius: 50%;
}
.gb-confirm-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.2s;
}
.gb-confirm-btn:hover { transform: scale(1.1); }
.gb-confirm-btn.accept { background: #22c55e; color: #fff; }
.gb-confirm-btn.retake { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* ============================================================
   8. App Layout (Sidebar & Main Area)
   ============================================================ */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--gradient-surface);
}

.app-sidebar {
    width: 260px;
    background: var(--color-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: var(--z-sticky);
    transition: transform 0.3s var(--ease-out);
}

.sidebar-header {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.sidebar-nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: var(--font-md);
    font-weight: var(--weight-medium);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    width: 100%;
}

.sidebar-link:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.sidebar-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
    font-weight: var(--weight-semi);
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.app-main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.mobile-topbar {
    height: var(--nav-height);
    background: var(--color-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
    .mobile-topbar {
        display: flex !important;
    }
}

/* --- Easy Cards (Dashboard modules) --- */
.easy-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s var(--ease-out);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.easy-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.easy-card .icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: var(--space-md);
    transition: background 0.2s;
}

.easy-card.active-card .icon-wrap,
.easy-card:hover .icon-wrap {
    background: var(--color-primary-light);
}

.easy-card h3 {
    font-size: var(--font-lg);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-xs);
}

.easy-card p {
    font-size: var(--font-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.easy-card .actions {
    margin-top: auto;
    display: flex;
    gap: var(--space-sm);
    width: 100%;
}

.easy-card .btn {
    flex: 1;
}

/* ============================================================ */
/* Wow Factor & Micro-Animations */
/* ============================================================ */

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .glass {
    background: rgba(30, 30, 46, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Skeleton Loading Sweeps */
@keyframes skeletonSweep {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton, .card.skeleton {
    background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-border) 50%, var(--color-surface-2) 75%);
    background-size: 200% 100%;
    animation: skeletonSweep 2s infinite linear;
    border-color: transparent !important;
}

/* Floating Animations (Hearts/Reactions) */
@keyframes floatUp {
    0%   { transform: translate(0, 0) scale(calc(var(--rx-scale, 1) * 0.5)); opacity: 0; }
    10%  { opacity: 1; transform: translate(0, -20px) scale(calc(var(--rx-scale, 1) * 1.1)); }
    100% { transform: translate(var(--rx-drift, 0vw), -150vh) scale(var(--rx-scale, 1)) rotate(var(--rx-rot, 15deg)); opacity: 0; }
}

.reaction-particle {
    position: fixed;
    bottom: -50px;
    font-size: 40px;
    z-index: 99999;
    pointer-events: none;
    will-change: transform, opacity;
    animation: floatUp 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

/* Live Reaction Rail — guest-facing reaction launcher */
@keyframes tpReactionPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.45); }
    100% { transform: scale(1); }
}
.tp-reaction-rail {
    position: fixed;
    right: max(8px, env(safe-area-inset-right));
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    touch-action: none;   /* drag the rail without scrolling the page */
    cursor: grab;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 6px;
    border-radius: var(--radius-full, 999px);
    background: rgba(20, 18, 30, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.32);
}
.tp-reaction-btn {
    width: 44px;
    height: 44px;
    font-size: 24px;
    line-height: 1;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.tp-reaction-btn:hover { background: rgba(255, 255, 255, 0.12); }
.tp-reaction-btn:active { transform: scale(0.9); }
.tp-reaction-rail.tp-reaction-dragging { cursor: grabbing; opacity: 0.92; }
/* Collapse handle — lets a guest tuck the rail away if they don't want it. */
.tp-reaction-toggle {
    border: none; background: transparent; cursor: pointer;
    color: rgba(255, 255, 255, 0.6); font-size: 18px; line-height: 1;
    width: 44px; height: 26px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.tp-reaction-toggle:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.tp-reaction-collapsed .tp-reaction-btn { display: none; }
/* Forced cool-off after a flurry of reactions — dimmed and non-interactive. */
.tp-reaction-rail.tp-reaction-cooldown {
    opacity: 0.4;
    filter: grayscale(0.6);
    pointer-events: none;
    transition: opacity 0.3s ease, filter 0.3s ease;
}
.tp-reaction-pop { animation: tpReactionPop 0.32s ease; }
/* While watching the live wall full-screen, float the rail OVER it at the
   bottom-center (clear of the side nav arrows) so guests can react in context. */
body.ss-live .tp-reaction-rail {
    z-index: 100000;
    top: auto;
    bottom: max(72px, calc(env(safe-area-inset-bottom) + 64px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    flex-direction: row;
}
@media (max-width: 480px) {
    .tp-reaction-btn { width: 38px; height: 38px; font-size: 21px; }
    /* On a phone watching the wall, dock the rail along the BOTTOM (horizontal),
       lifted above the Pause/Mute/Exit control bar so it doesn't cover them. */
    body.ss-live .tp-reaction-rail {
        top: auto;
        bottom: max(72px, calc(env(safe-area-inset-bottom) + 64px));
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 4px;
        padding: 6px 8px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .reaction-particle { animation-duration: 2s !important; }
    .tp-reaction-pop { animation: none; }
}

/* Hover dynamics for interactive elements */
.card { transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.btn { transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease; }

.btn:active { transform: scale(0.96) !important; }

/* Ken Burns TV Slideshow */
@keyframes kenBurnsFull {
    0% { transform: scale(1.0) translate(0, 0); opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { transform: scale(1.15) translate(-2%, -2%); opacity: 0; }
}

.slide-kenburns {
    animation: kenBurnsFull 8s ease-in-out forwards;
}

/* Spotify Audio Visualizer */
@keyframes spotify-eq {
    0% { height: 4px; }
    50% { height: 16px; }
    100% { height: 4px; }
}

.music-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}
.music-eq span {
    width: 3px;
    background-color: #1DB954;
    border-radius: 3px;
    animation: spotify-eq 1.2s ease-in-out infinite;
}
.music-eq span:nth-child(1) { animation-duration: 0.9s; }
.music-eq span:nth-child(2) { animation-duration: 1.1s; animation-delay: 0.2s; }
.music-eq span:nth-child(3) { animation-duration: 1.3s; animation-delay: 0.4s; }
.music-eq span:nth-child(4) { animation-duration: 0.8s; animation-delay: 0.1s; }

/* ============================================================ */
/* New Snapwall — Lightbox & Slideshow */
/* ============================================================ */

/* Lightbox Overlay */
.snap-lb-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    animation: fadeIn var(--duration-fast) var(--ease-out);
    color: #fff;
    outline: none;
}
.snap-lb-close {
    position: absolute; top: var(--space-md); right: var(--space-md);
    background: transparent; border: none; color: #fff;
    font-size: 28px; cursor: pointer; z-index: 10;
    padding: 10px; opacity: 0.8; transition: opacity 0.2s;
}
.snap-lb-close:hover { opacity: 1; }

.snap-lb-counter {
    position: absolute; top: var(--space-lg); left: 50%; transform: translateX(-50%);
    font-size: var(--font-sm); opacity: 0.7; z-index: 10;
}

.snap-lb-content {
    flex: 1; display: flex; align-items: center; justify-content: center;
    width: 100%; padding: var(--space-xl); position: relative;
}

.snap-lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    min-width: 50px; height: 80px; font-size: 40px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s; z-index: 10;
    border-radius: var(--radius-md);
}
.snap-lb-nav:hover { background: rgba(255,255,255,0.2); }
.snap-lb-prev { left: var(--space-md); }
.snap-lb-next { right: var(--space-md); }

.snap-lb-info {
    position: absolute; bottom: calc(var(--space-md) + 60px); left: var(--space-lg); right: var(--space-lg);
    display: flex; justify-content: space-between; align-items: flex-end;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8); pointer-events: none;
}

.snap-lb-toolbar {
    position: absolute; bottom: var(--space-md); left: 50%; transform: translateX(-50%);
    display: flex; gap: var(--space-md); z-index: 10;
}

@media (max-width: 768px) {
    .snap-lb-nav { display: none; /* Prefer swipe on mobile */ }
    .snap-lb-content { padding: 0; }
    .snap-lb-content img, .snap-lb-content video { border-radius: 0 !important; }
}

/* Full-Screen Slideshow */
.ss-slide {
    position: absolute; inset: 0;
    background-size: contain; background-position: center; background-repeat: no-repeat;
    display: flex; align-items: center; justify-content: center;
}

.ss-hud {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    transform: translateY(100%); transition: transform 0.3s ease;
    z-index: 100;
}
.ss-hud-visible { transform: translateY(0); }

/* Slideshow Transitions */
@keyframes ssFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ssFadeOut { from { opacity: 1; } to { opacity: 0; } }
.ss-fade-in { animation: ssFadeIn 1s ease forwards; }
.ss-fade-out { animation: ssFadeOut 1s ease forwards; }

@keyframes ssSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes ssSlideOut { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.ss-slide-in { animation: ssSlideIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.ss-slide-out { animation: ssSlideOut 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards; }

@keyframes ssZoomIn { from { transform: scale(1); opacity: 0; } to { transform: scale(1.05); opacity: 1; } }
@keyframes ssZoomOut { from { transform: scale(1.05); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }
.ss-zoom-in { animation: ssZoomIn 1.5s ease-out forwards; }
.ss-zoom-out { animation: ssZoomOut 1.5s ease-in forwards; }

.ss-kenburns-in { animation: kenBurnsFull 8s ease-in-out forwards; }
.ss-kenburns-out { opacity: 0; transition: opacity 1s; }

/* Real-time Flash */
.ss-flash {
    position: absolute; inset: 0; background: white; z-index: 999;
    pointer-events: none; animation: flashFade 1s ease forwards;
}
@keyframes flashFade { 0% { opacity: 1; } 100% { opacity: 0; } }

/* Grid specific */
.snap-pending { border: 2px solid #fbbf24; border-radius: calc(var(--radius-lg) + 2px); }
.snap-play-icon { font-family: monospace; }
