/* ═══════════════════════════════════════════════════════════════════════
   livelog — Discord-inspired Design System
   Warm dark grays · Blurple · Clean flat UI
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
    /* Backgrounds — Discord warm gray scale */
    --bg:          #313338;
    --surface:     #2b2d31;
    --surface-2:   #232428;
    --surface-3:   #1e1f22;

    /* Borders */
    --border:      rgba(255,255,255,0.06);
    --border-2:    rgba(255,255,255,0.10);

    /* Primary accent — blurple */
    --accent:      #5865F2;
    --accent-hover:#4752C4;
    --accent-dim:  rgba(88,101,242,0.15);
    --accent-glow: rgba(88,101,242,0.30);

    /* Legacy multi-accent aliases — keeps templates that use --teal/--coral compiling */
    --teal:        #5865F2;
    --teal-dim:    rgba(88,101,242,0.15);
    --teal-glow:   rgba(88,101,242,0.30);
    --coral:       #ed4245;
    --coral-dim:   rgba(237,66,69,0.15);
    --coral-glow:  rgba(237,66,69,0.28);
    --violet:      #5865F2;
    --violet-dim:  rgba(88,101,242,0.15);
    --violet-glow: rgba(88,101,242,0.30);
    --accent-2:    var(--accent);

    /* Text — Discord gray scale */
    --text:        #f2f3f5;
    --text-2:      #b5bac1;
    --text-3:      #80848e;

    /* Status */
    --green:       #23a55a;
    --green-dim:   rgba(35,165,90,0.15);
    --yellow:      #f0b232;
    --yellow-dim:  rgba(240,178,50,0.15);
    --blue:        #00aaff;
    --blue-dim:    rgba(0,170,255,0.15);

    /* Typography */
    --font-display: 'Inter', system-ui, sans-serif;
    --font-ui:      'Inter', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    /* Spacing / radii — Discord uses 8px as base */
    --r-sm:   4px;
    --r-md:   8px;
    --r-lg:   8px;
    --r-xl:   12px;
    --r-2xl:  16px;

    /* Layout */
    --nav-h:        60px;
    --tab-bar-h:    64px;
    --content-max:  1800px;
}

/* ── Base reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    font-size: 16px;
}

/* Everything above base layer */
.rr-container, nav, #mobile-tab-bar, #nav-drawer, #toast-container, #btt,
.auth-wrap, [id^="site-"] { position: relative; z-index: 1; }

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text);
}

.mono, code, pre { font-family: var(--font-mono); }

a { color: inherit; text-decoration: none; }

/* ── Page container ─────────────────────────────────────────────────────── */
.rr-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 24px 16px 48px;
}

@media (max-width: 767px) {
    .rr-container {
        padding-bottom: calc(var(--tab-bar-h) + env(safe-area-inset-bottom, 0px) + 24px);
    }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px;
    border-radius: var(--r-md);
    font-family: var(--font-ui);
    font-size: 0.9em; font-weight: 500;
    cursor: pointer; border: none;
    text-decoration: none;
    transition: background 0.15s, filter 0.15s;
    white-space: nowrap;
    line-height: 1;
}

/* Primary — blurple */
.btn-primary {
    background: var(--accent);
    color: #ffffff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { filter: brightness(0.92); }

/* Danger — for live / destructive actions */
.btn-coral {
    background: var(--coral);
    color: #ffffff;
}
.btn-coral:hover { filter: brightness(0.92); }

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-surface {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}
.btn-surface:hover { background: var(--surface-3); color: var(--text); }

.btn-sm { padding: 6px 12px; font-size: 0.82em; border-radius: var(--r-sm); }
.btn-lg { padding: 12px 24px; font-size: 0.95em; }

/* ── Inputs ─────────────────────────────────────────────────────────────── */
.rr-input {
    width: 100%; padding: 10px 12px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 0.92em;
    outline: none;
    transition: border-color 0.15s;
}
.rr-input:focus {
    border-color: var(--accent);
}
.rr-input::placeholder { color: var(--text-3); }

.rr-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(181,186,193,0.6)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding: 10px 32px 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 0.92em;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}
.rr-select:focus { border-color: var(--accent); }
.rr-select option { background: var(--surface-2); color: var(--text); }

label.rr-label {
    display: block;
    font-size: 0.75em; font-weight: 600; letter-spacing: 0.07em;
    text-transform: uppercase; color: var(--text-3);
    margin-bottom: 6px;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.rr-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
}
.rr-card:hover {
    border-color: rgba(88,101,242,0.3);
    transform: translateY(-2px);
}

/* ── Badges / Pills ─────────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 3px;
    font-size: 0.72em; font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-red    { background: rgba(237,66,69,0.2);   color: #ed4245; }
.badge-green  { background: rgba(35,165,90,0.2);   color: #23a55a; }
.badge-blue   { background: rgba(0,170,255,0.2);   color: #00aaff; }
.badge-yellow { background: rgba(240,178,50,0.2);  color: #f0b232; }
.badge-teal   { background: var(--accent-dim);     color: var(--accent); }
.badge-violet { background: var(--accent-dim);     color: var(--accent); }
.badge-coral  { background: rgba(237,66,69,0.2);   color: #ed4245; }
.badge-dim    { background: var(--surface-2);      color: var(--text-2); border: 1px solid var(--border); }
.badge-mono   { font-family: var(--font-mono);     font-size: 0.68em; }

/* ── Live indicator ─────────────────────────────────────────────────────── */

.live-dot {
    display: inline-block;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--coral);
    flex-shrink: 0;
}
.live-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--coral); color: #ffffff;
    font-size: 0.65em; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 2px 8px; border-radius: 3px;
}

/* ── Skeleton / loading ─────────────────────────────────────────────────── */
@keyframes shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(200%); }
}
.skeleton {
    background: var(--surface-2);
    border-radius: var(--r-sm);
    position: relative; overflow: hidden;
}
.skeleton::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.03) 50%, transparent 75%);
    transform: translateX(-100%);
    will-change: transform;
    animation: shimmer 2s ease-in-out infinite;
}

/* ── Stats strip ────────────────────────────────────────────────────────── */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}
@media (max-width: 700px) {
    .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px 14px;
    text-align: center;
    position: relative;
    transition: border-color 0.15s;
    overflow: hidden;
}
.stat-card:hover { border-color: var(--border-2); }

.stat-num {
    font-family: var(--font-mono);
    font-size: clamp(1.3em, 3vw, 1.9em);
    font-weight: 600;
    color: var(--text);
    line-height: 1; margin-bottom: 4px;
}
.stat-label { font-size: 0.7em; color: var(--text-3); font-weight: 500; }
.stat-card.loading { min-height: 72px; }
.stat-card.loading::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.02) 50%, transparent 75%);
    transform: translateX(-100%);
    will-change: transform;
    animation: shimmer 2s ease-in-out infinite;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
.rr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rr-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.88em;
}
.rr-table th {
    font-family: var(--font-mono);
    font-size: 0.72em; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-3);
    padding: 10px 14px; text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky; top: 0;
    background: var(--surface);
}
.rr-table td {
    padding: 10px 14px; color: var(--text-2);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.rr-table tr:last-child td { border-bottom: none; }
.rr-table tr:hover td { background: rgba(255,255,255,0.03); color: var(--text); }
.rr-table tr { transition: background 0.12s; }

/* ── Section header ─────────────────────────────────────────────────────── */
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 16px;
}
.section-head h2 {
    font-size: clamp(0.95em, 2.5vw, 1.15em);
    font-weight: 600;
}
.section-rule { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.rr-tabs {
    display: flex; gap: 2px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.rr-tabs::-webkit-scrollbar { display: none; }
.rr-tab {
    flex-shrink: 0;
    padding: 8px 16px; border-radius: 0;
    border: none; border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-3);
    font-family: var(--font-ui);
    font-size: 0.88em; font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: -1px;
}
.rr-tab:hover { color: var(--text-2); border-bottom-color: var(--border-2); }
.rr-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ── Toast ──────────────────────────────────────────────────────────────── */
#toast-container {
    position: fixed; bottom: calc(var(--tab-bar-h) + 16px); left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; gap: 8px;
    z-index: 9000; pointer-events: none;
    width: max-content; max-width: calc(100vw - 32px);
}
@media (min-width: 768px) { #toast-container { bottom: 24px; } }
.toast {
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: var(--r-lg);
    padding: 10px 18px;
    font-size: 0.88em; font-weight: 500;
    color: var(--text);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    animation: toast-in 0.2s ease;
    pointer-events: auto;
    white-space: nowrap;
}
.toast.ok  { border-color: rgba(35,165,90,0.4);  color: #23a55a; }
.toast.err { border-color: rgba(237,66,69,0.4);  color: #ed4245; }
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* ── Back link ──────────────────────────────────────────────────────────── */
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--text-2); font-size: 0.85em; font-weight: 500;
    padding: 6px 12px 6px 10px; border-radius: var(--r-md);
    background: var(--surface); border: 1px solid var(--border);
    transition: all 0.15s; margin-bottom: 16px;
    text-decoration: none;
}
.back-link:hover { background: var(--surface-2); color: var(--text); }

/* ── Error/success banners ──────────────────────────────────────────────── */
.msg-error {
    background: rgba(237,66,69,0.1);
    border: 1px solid rgba(237,66,69,0.25);
    color: #ed4245; font-size: 0.87em;
    padding: 10px 14px; border-radius: var(--r-md); margin-bottom: 16px;
}
.msg-ok {
    background: rgba(35,165,90,0.1);
    border: 1px solid rgba(35,165,90,0.25);
    color: #23a55a; font-size: 0.87em;
    padding: 10px 14px; border-radius: var(--r-md); margin-bottom: 16px;
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 10px;
    padding: 60px 20px; text-align: center;
    color: var(--text-3);
    grid-column: 1 / -1;
}
.empty-state svg, .empty-state .empty-icon { font-size: 2.5em; opacity: 0.4; margin-bottom: 4px; }
.empty-state h3 { font-size: 1em; color: var(--text-2); }
.empty-state p  { font-size: 0.85em; }

/* ── Paywall / no access ─────────────────────────────────────────────────── */
.paywall-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-2xl);
    padding: 36px 28px;
    max-width: 460px;
    margin: 0 auto;
    text-align: center;
}

/* ── Back-to-top button ─────────────────────────────────────────────────── */
#btt {
    position: fixed; bottom: calc(var(--tab-bar-h) + 16px); right: 20px;
    z-index: 8000; width: 40px; height: 40px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--border-2);
    color: var(--text-2); font-size: 16px; line-height: 40px;
    text-align: center; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s, background 0.15s;
}
#btt:hover { background: var(--surface-3); color: var(--text); }
#btt.vis { opacity: 1; pointer-events: auto; }
@media (min-width: 768px) { #btt { bottom: 24px; } }

/* ── Search bar ─────────────────────────────────────────────────────────── */
.search-bar {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 20px;
}
.search-bar .rr-input { flex: 1 1 200px; min-width: 0; }

/* ── Profile header ─────────────────────────────────────────────────────── */
.profile-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 20px 16px;
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 20px;
}
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8em; flex-shrink: 0; overflow: hidden; position: relative;
}
.profile-avatar img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity 0.3s; z-index: 2;
}
/* overflow:hidden clips pseudo-elements, so the ring effect lives on .av-ring instead */
.profile-avatar.is-live { border-color: var(--coral); }
.profile-info { flex: 1; min-width: 0; }
.profile-name {
    font-size: clamp(1.1em, 4vw, 1.5em);
    font-weight: 700; line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-handle {
    font-size: 0.85em; color: var(--text-3); margin-top: 3px;
    font-family: var(--font-mono);
}

/* ── Video card ─────────────────────────────────────────────────────────── */
.video-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden; cursor: pointer;
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column;
    transition: border-color 0.15s, transform 0.15s;
}
.video-card:hover {
    border-color: rgba(88,101,242,0.35);
    transform: translateY(-2px);
}
@media (hover: none) { .video-card:hover { transform: none; } }

.video-thumb {
    aspect-ratio: 9/16;
    background: var(--surface-2);
    position: relative; overflow: hidden;
}
.video-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 0.3s;
}
.video-thumb img.loaded { opacity: 1; }
.video-thumb-wide { aspect-ratio: 16/9; }

.video-info { padding: 10px 12px 12px; flex: 1; }
.video-title-text {
    font-size: 0.88em; font-weight: 500;
    color: var(--text); margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.35;
}
.video-meta-row {
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
    font-size: 0.72em; color: var(--text-3); font-family: var(--font-mono);
}

/* ── Streamer card ──────────────────────────────────────────────────────── */
.streamer-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden; cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    display: flex; flex-direction: column;
}
.streamer-card:hover {
    border-color: rgba(88,101,242,0.35);
    transform: translateY(-2px);
}
@media (hover: none) { .streamer-card:hover { transform: none; } }

.streamer-card-top {
    background: var(--surface-2);
    padding: 20px 12px 14px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    position: relative;
}
.av-ring {
    width: 64px; height: 64px; border-radius: 50%;
    border: 2px solid var(--border-2);
    position: relative; flex-shrink: 0;
}
@media (min-width: 700px) { .av-ring { width: 72px; height: 72px; } }
.av-ring.is-live {
    border-color: var(--coral);
}
/* Expanding ring on ::before — transform+opacity only, no repaint */
.av-ring.is-live::before {
    content: '';
    position: absolute; inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--coral);
    pointer-events: none;
}
.av-ring.is-live::after {
    content: '';
    position: absolute; inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(237,66,69,0.25);
    pointer-events: none;
}
.av-circle {
    width: 100%; height: 100%; border-radius: 50%;
    background: var(--surface-3);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3); font-size: 1.7em;
    overflow: hidden; position: relative;
}
.av-circle img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute; inset: 0;
    opacity: 0; transition: opacity 0.3s; z-index: 2;
}

.streamer-card-body { padding: 10px 12px 12px; }
.streamer-name {
    font-size: 0.9em; font-weight: 600;
    color: var(--text); margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.streamer-handle {
    font-family: var(--font-mono); font-size: 0.7em;
    color: var(--text-3); margin-bottom: 8px;
}
.streamer-badges { display: flex; gap: 4px; flex-wrap: wrap; }

/* Join live */
.join-live-btn {
    display: block; margin-top: 8px;
    background: var(--coral); color: #ffffff;
    font-weight: 600; font-size: 0.78em; text-align: center;
    padding: 7px 10px; border-radius: var(--r-sm);
    text-decoration: none; letter-spacing: 0.01em;
    transition: filter 0.15s;
}
.join-live-btn:hover { filter: brightness(0.92); }

/* ── Grid layouts ───────────────────────────────────────────────────────── */
.grid-streamers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 480px)  { .grid-streamers { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (min-width: 700px)  { .grid-streamers { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; } }
@media (min-width: 1100px) { .grid-streamers { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }

.grid-videos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 480px)  { .grid-videos { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (min-width: 700px)  { .grid-videos { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; } }
@media (min-width: 1100px) { .grid-videos { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }

/* ── Form group ─────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

/* ── Auth card ──────────────────────────────────────────────────────────── */
.auth-wrap {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 40px 16px; position: relative; z-index: 1;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--r-2xl);
    padding: 32px 28px;
    width: 100%; max-width: 420px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
.auth-icon {
    width: 48px; height: 48px; border-radius: var(--r-lg);
    background: var(--accent-dim);
    border: 1px solid rgba(88,101,242,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3em; margin: 0 auto 18px;
}
.auth-title {
    text-align: center;
    font-size: 1.4em; font-weight: 700;
    margin-bottom: 4px;
}
.auth-sub {
    text-align: center; font-size: 0.87em;
    color: var(--text-3); margin-bottom: 24px;
    line-height: 1.5;
}
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0; color: var(--text-3); font-size: 0.82em;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-link-row {
    text-align: center; font-size: 0.875em; color: var(--text-3); margin-top: 12px;
}
.auth-link-row a { color: var(--accent); font-weight: 500; }
.auth-link-row a:hover { text-decoration: underline; }

@media (max-width: 480px) { .auth-card { padding: 24px 18px; } }

/* ── Preloader override ─────────────────────────────────────────────────── */
#site-preloader { background: var(--bg) !important; }
#spl-icon-wrap  { background: var(--accent-dim) !important; border: 1px solid rgba(88,101,242,0.25) !important; }
#spl-bar        { background: var(--accent) !important; }

/* ── Mobile bottom tab bar ──────────────────────────────────────────────── */
#mobile-tab-bar { display: none; }
@media (max-width: 767px) {
    #mobile-tab-bar {
        display: flex;
        position: fixed; bottom: 0; left: 0; right: 0;
        height: calc(var(--tab-bar-h) + env(safe-area-inset-bottom, 0px));
        background: var(--surface);
        border-top: 1px solid var(--border);
        z-index: 1000;
        align-items: stretch;
        padding: 0 2px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}
.tab-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; padding: 6px 4px;
    text-decoration: none; color: var(--text-3);
    font-size: 0.62em; font-weight: 500;
    font-family: var(--font-ui);
    letter-spacing: 0.01em;
    transition: color 0.15s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.tab-item svg { width: 22px; height: 22px; flex-shrink: 0; }
.tab-item.active { color: var(--accent); }
.tab-item.active::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 24px; height: 2px;
    background: var(--accent);
    border-radius: 0 0 2px 2px;
}
.tab-item:not(.active):hover { color: var(--text-2); }

/* ── Responsive nav hide on mobile ──────────────────────────────────────── */
@media (max-width: 767px) {
    .nav-desktop { display: none !important; }
}
