/* ═══════════════════════════════════════════════════════════════════════════
   WHOSETHEMOD — Premium Dark UI
   Aesthetic: Refined dark with purple depth, glass surfaces, crisp type
═══════════════════════════════════════════════════════════════════════════ */

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

:root {
  --bg:          #08080f;
  --bg-2:        #0d0d17;
  --surface:     #11111e;
  --surface-2:   #181828;
  --surface-3:   #1e1e30;
  --surface-4:   #252538;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);
  --purple:      #9147ff;
  --purple-2:    #a855f7;
  --purple-3:    #c084fc;
  --purple-glow: rgba(145, 71, 255, 0.25);
  --purple-dim:  rgba(145, 71, 255, 0.1);
  --text:        #f0f0f8;
  --text-2:      #a0a0c0;
  --text-3:      #60607a;
  --text-4:      #383852;
  --green:       #10b981;
  --green-dim:   rgba(16, 185, 129, 0.12);
  --red:         #f43f5e;
  --red-dim:     rgba(244, 63, 94, 0.12);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245, 158, 11, 0.1);
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --font:        'Sora', sans-serif;
  --font-mono:   'DM Mono', monospace;
  --shadow:      0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
  --shadow-purple: 0 0 40px rgba(145,71,255,0.12);
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --t:           200ms;
  --t-slow:      350ms;
}

/* ── Light Mode ──────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:          #f4f4f8;
  --bg-2:        #eeeef4;
  --surface:     #ffffff;
  --surface-2:   #f0f0f6;
  --surface-3:   #e8e8f0;
  --surface-4:   #dcdce8;
  --border:      rgba(0,0,0,0.08);
  --border-2:    rgba(0,0,0,0.14);
  --purple:      #7c3aed;
  --purple-2:    #6d28d9;
  --purple-3:    #5b21b6;
  --purple-glow: rgba(124, 58, 237, 0.15);
  --purple-dim:  rgba(124, 58, 237, 0.08);
  --text:        #1a1a2e;
  --text-2:      #4a4a6a;
  --text-3:      #8080a0;
  --text-4:      #b0b0c8;
  --green:       #059669;
  --green-dim:   rgba(5, 150, 105, 0.1);
  --red:         #e11d48;
  --red-dim:     rgba(225, 29, 72, 0.1);
  --amber:       #d97706;
  --amber-dim:   rgba(217, 119, 6, 0.1);
  --shadow:      0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.15);
  --shadow-purple: 0 0 40px rgba(124,58,237,0.08);
}

[data-theme="light"] body {
  background-image: none;
}

[data-theme="light"] .site-header {
  background: rgba(244,244,248,0.88);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { transition: background var(--t) var(--ease), color var(--t) var(--ease); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(145,71,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(145,71,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; }
a { color: var(--purple-3); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
.hidden { display: none !important; }

/* ── Page Loader ─────────────────────────────────────────────────────────── */
.page-loader { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); z-index: 999; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,8,15,0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 2.5rem;
  height: 72px;
  gap: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: start;
}
.plugin-download-group { display: flex; align-items: center; gap: 0.25rem; margin-left: 0.625rem; }
.btn-plugin-download { display: flex; align-items: center; gap: 0.35rem; background: rgba(180,30,30,0.15); border: 1px solid rgba(220,50,50,0.35); border-radius: var(--radius-lg); padding: 0.3rem 0.75rem; font-size: 0.72rem; font-weight: 700; color: #f87171; text-decoration: none; letter-spacing: 0.02em; transition: background var(--t) var(--ease), border-color var(--t) var(--ease); white-space: nowrap; }
.btn-plugin-download:hover { background: rgba(180,30,30,0.28); border-color: rgba(220,50,50,0.6); }
.btn-plugin-info { background: rgba(180,30,30,0.12); border: 1px solid rgba(220,50,50,0.3); border-radius: var(--radius-lg); width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: #f87171; cursor: pointer; transition: background var(--t) var(--ease); line-height: 1; flex-shrink: 0; }
.btn-plugin-info:hover { background: rgba(180,30,30,0.28); }
.plugin-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 500; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.15s var(--ease); }
.plugin-modal { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-xl); width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); animation: fadeUp 0.18s var(--ease); }
.plugin-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.plugin-modal-title { font-size: 0.9rem; font-weight: 700; color: var(--text-1); }
.plugin-modal-close { background: none; border: none; color: var(--text-4); font-size: 1rem; cursor: pointer; padding: 0.1rem 0.3rem; border-radius: var(--radius-sm); transition: color var(--t) var(--ease); }
.plugin-modal-close:hover { color: var(--text-1); }
.plugin-modal-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.plugin-step { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.82rem; color: var(--text-2); line-height: 1.5; margin: 0; }
.plugin-step-num { background: var(--purple); color: #fff; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 800; flex-shrink: 0; margin-top: 1px; }
.plugin-commands { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.plugin-cmd { display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; }
.plugin-cmd code { background: var(--surface-3); padding: 0.1rem 0.4rem; border-radius: var(--radius-sm); font-family: monospace; color: var(--purple-light, #c084fc); font-size: 0.78rem; flex-shrink: 0; }
.plugin-cmd span { color: var(--text-3); font-size: 0.75rem; }
.plugin-modbtns { border-top: 1px solid var(--border); padding-top: 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; }

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

.logo-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: #0d0d17; border: 1.5px solid #4834d4;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; animation: pulse-logo 2.5s ease-in-out infinite;
}

@keyframes pulse-logo {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(145,71,255,0.3)); }
  50% { filter: drop-shadow(0 0 8px rgba(192,132,252,0.7)) drop-shadow(0 0 18px rgba(145,71,255,0.3)); }
}

.brand-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.04em; background: linear-gradient(135deg, #fff 20%, var(--purple-3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-user { display: flex; align-items: center; gap: 0.75rem; position: relative; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--purple); box-shadow: 0 0 10px var(--purple-glow); }
.user-name { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; background: linear-gradient(135deg, #fff 20%, var(--purple-3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.user-profile-trigger { display: flex; align-items: center; gap: 0.625rem; background: transparent; border-radius: var(--radius); padding: 0.25rem 0.5rem; transition: background var(--t) var(--ease); cursor: pointer; }
.user-profile-trigger:hover { background: var(--surface-2); }
.user-profile-text { display: flex; flex-direction: column; align-items: center; gap: 0.05rem; }
.user-team-badge { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; background: linear-gradient(135deg, #ff4e4e, #c0392b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-top: 0.2rem; }

.user-menu { position: absolute; top: calc(100% + 0.625rem); right: 0; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 0.375rem; min-width: 230px; box-shadow: var(--shadow-lg); z-index: 200; animation: fadeUp 0.15s var(--ease); }
.user-menu-item { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.625rem 0.875rem; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; color: var(--text-2); background: transparent; text-align: left; transition: all var(--t) var(--ease); }
.user-menu-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.user-menu-item:hover { background: var(--surface-2); color: var(--text); }
.user-menu-item--danger { color: var(--red); }
.user-menu-item--danger:hover { background: var(--red-dim); color: var(--red); }
.user-menu-item--toggle.active { color: var(--purple-3); }
.user-menu-item--toggle.active:hover { background: var(--purple-dim); }
.user-menu-divider { height: 1px; background: var(--border); margin: 0.25rem 0; }
.user-menu-accounts { display: flex; flex-direction: column; padding: 0.25rem 0; }
.user-menu-accounts-label { font-size: 0.7rem; font-weight: 700; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.25rem 0.875rem 0.375rem; }
.user-menu-account-btn { display: flex; align-items: center; gap: 0.625rem; width: 100%; padding: 0.5rem 0.875rem; background: none; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--t) var(--ease); text-align: left; }
.user-menu-account-btn:hover { background: var(--surface-2); }
.user-menu-account-avatar { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border-2); flex-shrink: 0; }
.user-menu-account-name { font-size: 0.82rem; font-weight: 600; color: var(--text-2); }
.user-menu-legal-divider { display: none; }
.user-menu-legal { display: none; justify-content: center; gap: 0.5rem; padding: 0.5rem 0.875rem; font-size: 0.75rem; color: var(--text-3); }
.user-menu-legal-link { color: var(--text-3); text-decoration: none; }
.user-menu-legal-link:hover { color: var(--purple-3); }
.user-menu-stats { padding: 0.625rem 0.875rem 0.5rem; }
.user-menu-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding: 0.2rem 0; }
.user-menu-stat-label { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; }
.user-menu-stat-value { font-size: 0.82rem; font-weight: 700; color: var(--purple-3); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; border-radius: var(--radius); font-family: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1; white-space: nowrap; transition: all var(--t) var(--ease); }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-2); box-shadow: 0 0 20px var(--purple-glow); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; border-radius: var(--radius-lg); }

/* ── Main Content ────────────────────────────────────────────────────────── */
.main-content { max-width: 1920px; margin: 0 auto; padding: 2rem 2.5rem; }

/* ── Login Page ──────────────────────────────────────────────────────────── */
.login-prompt { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 144px); }
.login-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 3rem 2.5rem; text-align: center; box-shadow: var(--shadow-lg), var(--shadow-purple); animation: fadeUp 0.5s var(--ease); position: relative; }
.login-card::after { content: ''; position: absolute; top: -1px; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, var(--purple), transparent); }
.login-icon { width: 52px; height: 52px; margin: 0 auto 1.5rem; filter: drop-shadow(0 0 20px var(--purple-glow)); }
.login-card h2 { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 0.625rem; background: linear-gradient(135deg, var(--text), var(--purple-3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-card > p { color: var(--text-2); font-size: 0.9rem; line-height: 1.7; margin-bottom: 2rem; }

/* ── App Shell ───────────────────────────────────────────────────────────── */
.app { animation: fadeUp 0.4s var(--ease); }
.app-body { display: flex; flex-direction: row; flex-wrap: nowrap; height: calc(100vh - 72px); overflow: hidden; gap: 2.5rem; }
.app-main { flex: 1; min-width: 0; overflow-y: auto; scrollbar-width: none; }
.app-main::-webkit-scrollbar { display: none; }
.featured-sidebar { width: 300px; flex-shrink: 0; overflow-y: auto; padding: 0 1rem 2rem 0; scrollbar-width: none; }
.featured-sidebar::-webkit-scrollbar { display: none; }
.leaderboard-sidebar { width: 300px; flex-shrink: 0; overflow-y: auto; padding: 0 0 2rem 1rem; scrollbar-width: none; }
.leaderboard-sidebar::-webkit-scrollbar { display: none; }
.leaderboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; padding-bottom: 0.625rem; border-bottom: 1px solid var(--border); }
.leaderboard-icon { width: 13px; height: 13px; color: var(--text-4); flex-shrink: 0; }
.leaderboard-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-4); }
.leaderboard-list { display: flex; flex-direction: column; gap: 0.625rem; padding: 3px; }
.leaderboard-item { display: flex; align-items: center; gap: 0.625rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 0.625rem; cursor: pointer; transition: border-color var(--t) var(--ease), background var(--t) var(--ease); }
.leaderboard-item:hover { border-color: rgba(145,71,255,0.4); background: var(--surface-2); }
.leaderboard-item--self { border-color: rgba(145,71,255,0.35); }
.leaderboard-divider { height: 1px; background: var(--border); margin: 0.25rem 3px; }
.leaderboard-rank { font-size: 0.65rem; font-weight: 800; color: var(--text-4); min-width: 1.2rem; text-align: center; flex-shrink: 0; }
.leaderboard-rank--gold   { color: #f5c542; }
.leaderboard-rank--silver { color: #b0b8c1; }
.leaderboard-rank--bronze { color: #cd7f32; }
.leaderboard-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-name { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard-followers { font-size: 0.7rem; color: var(--purple-3); font-weight: 700; white-space: nowrap; }
.leaderboard-empty { font-size: 0.78rem; color: var(--text-4); text-align: center; padding: 1.5rem 0; }
@media (max-width: 1100px) {
  .featured-sidebar { display: none; }
  .leaderboard-sidebar { display: none; }
  .app-body { height: auto; overflow: visible; }
  .app-main { overflow-y: visible; }
}
.featured-sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; padding-bottom: 0.625rem; border-bottom: 1px solid var(--border); }
.featured-sidebar-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-4); }
.featured-view-toggle { display: flex; gap: 2px; }
.featured-view-btn { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--radius-sm); background: none; color: var(--text-4); transition: color var(--t) var(--ease), background var(--t) var(--ease); }
.featured-view-btn svg { width: 14px; height: 14px; }
.featured-view-btn:hover { color: var(--text-2); background: var(--surface-2); }
.featured-view-btn.active { color: var(--purple); background: var(--purple-dim); }
.lb-btn { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--radius-sm); background: none; color: var(--text-4); transition: color var(--t) var(--ease), background var(--t) var(--ease); }
.lb-btn svg { width: 14px; height: 14px; }
.lb-btn:hover { color: var(--text-2); background: var(--surface-2); }
.lb-btn.active { color: var(--purple); background: var(--purple-dim); }
/* Grid view */
.featured-channels-list.featured-channels-list--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.featured-channel-card--grid { flex-direction: column; align-items: center; justify-content: center; padding: 0.75rem 0.5rem 0.625rem; text-align: center; position: relative; gap: 0.375rem; min-width: 0; }
.featured-channel-card--grid .featured-drag-handle { display: none; }
.featured-channel-card--grid .featured-channel-info { align-items: center; width: 100%; }
.featured-channel-card--grid .featured-channel-avatar { width: 40px; height: 40px; }
.featured-channel-card--grid .featured-channel-login { display: none; }
.featured-channel-card--grid .featured-remove-btn { position: absolute; top: 4px; right: 4px; opacity: 0; }
.featured-channel-card--grid:hover .featured-remove-btn { opacity: 1; }
.featured-channels-list { display: flex; flex-direction: column; gap: 0.625rem; padding: 3px; }
.featured-add-card { display: flex; align-items: center; justify-content: center; gap: 0.375rem; border: 1.5px dashed var(--border-2); border-radius: var(--radius); padding: 0.625rem; cursor: pointer; transition: border-color var(--t) var(--ease), background var(--t) var(--ease); color: var(--text-4); font-size: 0.78rem; font-weight: 600; }
.featured-add-card:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-dim); }
.featured-add-card svg { width: 15px; height: 15px; }
.featured-drag-handle { width: 14px; height: 14px; color: var(--text-4); flex-shrink: 0; cursor: grab; opacity: 0; transition: opacity var(--t) var(--ease); }
.featured-channel-card:hover .featured-drag-handle { opacity: 1; }
.featured-channel-card.featured-dragging { opacity: 0.4; }
.featured-drop-indicator { height: 2px; background: var(--purple); border-radius: 1px; margin: 1px 0; pointer-events: none; box-shadow: 0 0 6px rgba(145,71,255,0.5); }
.featured-add-form { display: flex; }
.featured-add-input { width: 100%; background: var(--surface); border: 1.5px dashed var(--purple); border-radius: var(--radius); padding: 0.6rem 0.75rem; font-size: 0.82rem; color: var(--text); font-family: var(--font); outline: none; }
.featured-add-input::placeholder { color: var(--text-4); }
.featured-channel-card { display: flex; align-items: center; gap: 0.625rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 0.625rem; cursor: pointer; transition: border-color var(--t) var(--ease), background var(--t) var(--ease); position: relative; }
.featured-channel-card:hover { border-color: rgba(145,71,255,0.4); background: var(--surface-2); }
.featured-channel-card.is-live { border-color: var(--red); animation: pulse-border 1.8s ease-in-out infinite; z-index: 1; }
.featured-avatar-wrap { position: relative; flex-shrink: 0; }
/* Grid equal height */
.featured-channels-list.featured-channels-list--grid { align-items: stretch; }
.featured-channel-card--grid { height: 100%; box-sizing: border-box; }
.featured-channel-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.featured-channel-info { flex: 1; min-width: 0; }
.featured-channel-name { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.featured-channel-login { font-size: 0.7rem; color: var(--text-4); }
.featured-remove-btn { background: none; border: none; color: var(--text-4); cursor: pointer; padding: 0.2rem; border-radius: var(--radius-sm); display: flex; align-items: center; flex-shrink: 0; transition: color var(--t) var(--ease); }
.featured-remove-btn svg { width: 13px; height: 13px; }
.featured-remove-btn:hover { color: var(--red); }

/* ── Tab Navigation ──────────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.3rem;
  justify-self: center;
}

.tab-btn { display: flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; background: transparent; border-radius: calc(var(--radius-lg) - 4px); color: var(--text-3); font-size: 0.85rem; font-weight: 600; transition: all var(--t) var(--ease); }
.tab-btn svg { width: 15px; height: 15px; }
.tab-btn:hover { color: var(--text-2); background: var(--surface-2); }
.tab-btn.active { background: var(--purple); color: #fff; box-shadow: 0 0 16px var(--purple-glow); }

/* Admin tab placeholder — hält die Leiste zentriert auch wenn Admin Tab unsichtbar */
.tab-btn--admin { margin-right: 0.5rem; }

/* ── Panel ───────────────────────────────────────────────────────────────── */
.tab-panel { animation: fadeIn var(--t-slow) var(--ease); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.panel-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 0.3rem; }
.panel-desc { font-size: 0.85rem; color: var(--text-2); line-height: 1.6; }
.panel-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ── State Area ──────────────────────────────────────────────────────────── */
.state-area { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 1rem; gap: 1rem; text-align: center; }
.state-message { color: var(--text-3); font-size: 0.875rem; }
.state-error { color: var(--red); font-size: 0.875rem; max-width: 400px; line-height: 1.6; }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner { width: 28px; height: 28px; border: 2.5px solid var(--surface-3); border-top-color: var(--purple); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner--lg { width: 40px; height: 40px; border-width: 3px; }
.spinner--sm { width: 16px; height: 16px; border-width: 2px; }

/* ── User Grid ───────────────────────────────────────────────────────────── */
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.875rem; margin-bottom: 1.5rem; padding: 3px; }

.user-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; display: flex; align-items: center; gap: 0.75rem; transition: all var(--t) var(--ease); animation: fadeUp 0.3s var(--ease) both; position: relative; }
.user-card:hover { border-color: rgba(145,71,255,0.3); background: var(--surface-2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(145,71,255,0.12); }
.user-card-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-3); flex-shrink: 0; border: 1.5px solid var(--border-2); }
.user-card-info { overflow: hidden; min-width: 0; }
.user-card-name { font-size: 0.875rem; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-login { font-size: 0.75rem; color: var(--text-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-date { font-size: 0.7rem; color: var(--text-4); margin-top: 2px; }
.user-card-removed { font-size: 0.7rem; color: var(--red); margin-top: 2px; }
.user-card-followers { font-size: 0.72rem; color: var(--purple); margin-top: 2px; }
.user-card--removed { opacity: 0.65; border-color: var(--red-dim); }
.user-card--removed .user-card-name { color: var(--text-3); }
.user-card--not-mod { border-color: rgba(244,63,94,0.6); background: rgba(244,63,94,0.05); animation: pulse-border 1.8s ease-in-out infinite; }
.user-card--not-mod .user-card-name { color: var(--red); }
.user-card--head-mod { border-color: rgba(255, 185, 0, 0.75); box-shadow: inset 0 0 0 1px rgba(255,185,0,0.35); }
.user-card-crown { position: absolute; top: 0.3rem; left: 0.35rem; font-size: 0.8rem; line-height: 1; }
.user-card-crown--btn { cursor: pointer; border: none; background: none; padding: 0; opacity: 0.25; transition: opacity 0.15s; }
.user-card-crown--btn:hover { opacity: 0.7; }
.user-card-crown--btn.active { opacity: 1; }
.user-card-remove { position: absolute; top: 0.3rem; right: 0.35rem; background: none; border: none; font-size: 1rem; line-height: 1; color: var(--text-4); cursor: pointer; padding: 0.15rem 0.3rem; border-radius: var(--radius-sm); transition: color var(--t) var(--ease), background var(--t) var(--ease); }
.user-card-remove:hover { color: var(--red); background: rgba(255,0,0,0.08); }
.channel-crown { position: absolute; top: 0.4rem; left: 0.85rem; font-size: 0.65rem; line-height: 1; pointer-events: none; }

.irc-filter-wrap { margin-bottom: 1rem; }
.irc-filter-input { max-width: 280px; }
.irc-channel-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.irc-channel-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.irc-channel-meta { display: flex; flex-direction: column; gap: 0.15rem; }
.irc-channel-displayname { font-size: 0.95rem; font-weight: 700; color: var(--text-1); }
.irc-channel-followers { font-size: 0.75rem; color: var(--text-4); }
.irc-add-mod-form { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.irc-add-mod-form .form-input--sm { flex: 1; height: 32px; font-size: 0.8rem; padding: 0 0.6rem; }
.irc-removed-section { margin-top: 1.5rem; }
.irc-removed-toggle { display: flex; align-items: center; gap: 0.5rem; background: none; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.5rem 1rem; font-size: 0.82rem; font-weight: 600; color: var(--text-3); cursor: pointer; transition: all var(--t) var(--ease); }
.irc-removed-toggle:hover { border-color: var(--border-2); color: var(--text-2); }
.irc-removed-toggle svg { transition: transform 0.2s var(--ease); }
.irc-removed-toggle.open svg { transform: rotate(180deg); }
.irc-removed-badge { background: var(--surface-3); color: var(--text-3); font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 99px; }
.irc-removed-grid { margin-top: 1rem; }

.user-card:nth-child(1)  { animation-delay: 0ms; }
.user-card:nth-child(2)  { animation-delay: 25ms; }
.user-card:nth-child(3)  { animation-delay: 50ms; }
.user-card:nth-child(4)  { animation-delay: 75ms; }
.user-card:nth-child(5)  { animation-delay: 100ms; }
.user-card:nth-child(6)  { animation-delay: 125ms; }
.user-card:nth-child(7)  { animation-delay: 150ms; }
.user-card:nth-child(8)  { animation-delay: 175ms; }
.user-card:nth-child(9)  { animation-delay: 200ms; }
.user-card:nth-child(10) { animation-delay: 225ms; }

/* ── List Footer ─────────────────────────────────────────────────────────── */
.list-footer { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; border-top: 1px solid var(--border); gap: 1rem; }
.count-badge { font-size: 0.8rem; color: var(--text-3); }

/* ── Info Boxes ──────────────────────────────────────────────────────────── */
.info-box { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.25rem; border-radius: var(--radius-lg); margin-bottom: 1.75rem; font-size: 0.85rem; }
.info-box svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.info-box strong { display: block; font-weight: 700; margin-bottom: 0.25rem; font-size: 0.875rem; }
.info-box p { color: var(--text-2); line-height: 1.65; }
.info-box--warning { background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2); }
.info-box--warning svg { color: var(--amber); }
.info-box--warning strong { color: var(--amber); }
.info-box--irc { background: rgba(145,71,255,0.07); border: 1px solid rgba(145,71,255,0.2); }
.info-box--irc svg { color: var(--purple-3); }
.info-box--irc strong { color: var(--purple-3); }

/* ── Search Forms ────────────────────────────────────────────────────────── */
.search-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.75rem; margin-bottom: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.search-form--inline { padding: 1.25rem 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group--row { flex-direction: row; align-items: center; gap: 0.5rem; }
.form-group--row .form-input { flex: 1; }
.form-label { font-size: 0.8rem; font-weight: 700; color: var(--text-2); letter-spacing: 0.01em; }
.form-input, .form-textarea { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-family: inherit; font-size: 0.875rem; padding: 0.625rem 0.875rem; transition: all var(--t) var(--ease); width: 100%; resize: vertical; outline: none; }
.form-input:focus, .form-textarea:focus { border-color: rgba(145,71,255,0.5); background: var(--surface); box-shadow: 0 0 0 3px rgba(145,71,255,0.1); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-4); }
.form-input.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(244,63,94,0.1); }
.form-hint { font-size: 0.78rem; color: var(--text-3); }
.form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Check Results ───────────────────────────────────────────────────────── */
.check-results { margin-top: 1.5rem; }
.check-target { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 1.25rem; }
.check-target-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--purple); box-shadow: 0 0 12px var(--purple-glow); }
.check-target-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; }
.check-target-login { color: var(--text-3); font-size: 0.82rem; margin-top: 1px; }
.check-limitation { background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.18); border-radius: var(--radius); padding: 0.875rem 1rem; font-size: 0.82rem; color: var(--text-2); margin-bottom: 1.25rem; line-height: 1.6; }
.check-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.check-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.check-table th { text-align: left; padding: 0.75rem 1.25rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.check-table td { padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.check-table tr:last-child td { border-bottom: none; }
.check-table tr:hover td { background: var(--surface-2); }
.check-table .channel-cell { display: flex; align-items: center; gap: 0.625rem; }
.channel-avatar-sm { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; font-size: 0.75rem; font-weight: 700; }
.badge svg { width: 11px; height: 11px; }
.badge--mod        { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.badge--nomod      { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(244,63,94,0.2); }
.badge--restricted { background: var(--surface-3); color: var(--text-3); border: 1px solid var(--border); }
.badge--removed    { background: var(--surface-3); color: var(--text-3); border: 1px solid var(--border); }

/* ── History ─────────────────────────────────────────────────────────────── */
.history-panel { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.history-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.875rem; }
.history-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); }
.history-list { display: flex; flex-direction: column; gap: 0.375rem; }
.history-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.82rem; cursor: pointer; transition: all var(--t) var(--ease); }
.history-item:hover { border-color: rgba(145,71,255,0.3); background: var(--surface-2); }
.history-type-wrap { min-width: 7rem; flex-shrink: 0; }
.history-type-badge { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-3); font-weight: 600; }
.history-query { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.history-time { font-size: 0.72rem; color: var(--text-4); flex-shrink: 0; font-family: var(--font-mono); }

/* ── Toasts ──────────────────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { background: var(--surface-3); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 0.75rem 1rem; font-size: 0.85rem; max-width: 320px; pointer-events: auto; animation: slideIn 0.3s var(--ease); display: flex; align-items: center; gap: 0.625rem; box-shadow: var(--shadow); }
.toast svg { width: 15px; height: 15px; flex-shrink: 0; }
.toast span { color: var(--text-2); }
.toast--success { border-color: rgba(16,185,129,0.3); color: var(--green); }
.toast--error   { border-color: rgba(244,63,94,0.3);  color: var(--red); }
.toast--info    { border-color: rgba(145,71,255,0.3); color: var(--purple-3); }

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes spin       { to { transform: rotate(360deg); } }
@keyframes fadeIn     { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp     { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn    { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

/* ── Admin Management ────────────────────────────────────────────────────── */
.admin-mgmt-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.75rem; }
.admin-mgmt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.admin-mgmt-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 0.875rem; }
.admin-mgmt-list { display: flex; flex-direction: column; gap: 0.375rem; }
.admin-mgmt-item { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 0.85rem; }
.admin-mgmt-login { font-weight: 600; color: var(--text); }
.admin-mgmt-date { font-size: 0.75rem; color: var(--text-3); }
.admin-mgmt-form { display: flex; flex-direction: column; gap: 0.625rem; }
.admin-remove-btn { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: transparent; color: var(--text-4); border: 1px solid var(--border); transition: all var(--t) var(--ease); flex-shrink: 0; }
.admin-remove-btn svg { width: 12px; height: 12px; }
.admin-remove-btn:hover { background: var(--red-dim); color: var(--red); border-color: rgba(244,63,94,0.3); }

/* ── Admin Filters ───────────────────────────────────────────────────────── */
.admin-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.check-followers-cell { font-size: 0.85rem; color: var(--purple); white-space: nowrap; }
.check-channel-list { display: flex; flex-direction: column; gap: 0.5rem; padding: 3px; }
.check-channel-row--removed { opacity: 0.7; border-color: var(--surface-3); }
.check-channel-row--removed .check-channel-name { color: var(--text-3); }
#check-former-section { margin-top: 1.25rem; }
.check-former-header { margin-bottom: 0; }
#check-former-list { margin-top: 0.75rem; }
.check-channel-row { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.75rem 1rem; transition: border-color var(--t) var(--ease), background var(--t) var(--ease); position: relative; }
.check-channel-row:hover { border-color: rgba(145,71,255,0.3); background: var(--surface-2); }
.check-channel-row.user-card--head-mod { border-color: rgba(255, 185, 0, 0.75); box-shadow: inset 0 0 0 1px rgba(255,185,0,0.35); }
.check-channel-info { display: flex; align-items: center; gap: 0.625rem; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.check-channel-name { font-size: 0.875rem; font-weight: 600; }
.check-channel-login { font-size: 0.75rem; color: var(--text-3); margin-top: 1px; }
.check-channel-date { font-size: 0.7rem; color: var(--text-4); margin-top: 2px; }
.check-channel-status { margin-left: auto; flex-shrink: 0; }
.head-mod-select { appearance: none; -webkit-appearance: none; background: var(--green-dim); border: 1px solid rgba(16,185,129,0.3); border-radius: 99px; color: var(--green); font-size: 0.75rem; font-weight: 600; padding: 0.25rem 1.5rem 0.25rem 0.6rem; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 20 20' fill='%2310b981'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.4rem center; transition: all var(--t) var(--ease); }
.head-mod-select:hover { border-color: var(--green); }
.head-mod-select.is-head { background-color: rgba(255,200,0,0.12); border-color: rgba(255,200,0,0.4); color: #f0b400; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 20 20' fill='%23f0b400'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E"); }

.check-table--admin td { padding: 0.8rem 4rem; vertical-align: top; }
.check-table--admin th { padding: 1rem 4rem; }
.check-table--admin td:nth-child(-n+3),
.check-table--admin th:nth-child(-n+3) { white-space: nowrap; }
.check-table--admin td:last-child { width: 100%; }

/* ── Logout Dialog ───────────────────────────────────────────────────────── */
.logout-dialog-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(4px);
}
.logout-dialog {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); padding: 2rem 1.75rem;
  max-width: 340px; width: 100%; text-align: center;
  box-shadow: var(--shadow-lg); animation: fadeUp 0.25s var(--ease);
}
.logout-dialog p { font-size: 0.95rem; color: var(--text); margin-bottom: 1.5rem; line-height: 1.5; }
.logout-dialog-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* ── Admin Activity Cards ────────────────────────────────────────────────── */
.admin-activity-cards { display: none; flex-direction: column; gap: 0.5rem; }
.admin-table-desktop { display: block; }
.admin-activity-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; }
.admin-activity-card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.25rem; flex-wrap: wrap; }
.admin-activity-action { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.admin-activity-time { font-size: 0.72rem; color: var(--text-3); font-family: var(--font-mono); }
.admin-activity-user { font-size: 0.78rem; color: var(--purple-3); font-weight: 600; }
.admin-activity-details { font-size: 0.75rem; color: var(--text-3); margin-top: 0.25rem; }

/* ── Admin Panel Tile Switcher ───────────────────────────────────────────── */
.admin-tile-switcher { display: none; gap: 0.5rem; margin-bottom: 1.25rem; }
.admin-tile-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.375rem; padding: 0.875rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); font-size: 0.75rem; font-weight: 600; color: var(--text-3); cursor: pointer; transition: all var(--t) var(--ease); }
.admin-tile-btn svg { width: 22px; height: 22px; }
.admin-tile-btn.active { background: var(--purple-dim); border-color: var(--purple); color: var(--purple); }
.admin-tile-btn:not(.active):hover { background: var(--surface-2); color: var(--text); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
/* Mobile Bottom Nav */
.mobile-nav-wrap { display: none; }
.mobile-nav { display: none; }

@media (max-width: 768px) {
  .app-body { height: auto; overflow: visible; flex-direction: column; }
  .app-main { overflow-y: visible; }
  .main-content { padding: 0.875rem; padding-bottom: 110px; }

  /* Header */
  .header-inner { grid-template-columns: 1fr auto; height: 56px; padding: 0 1rem; }
  .header-brand { grid-column: 1; min-width: 0; overflow: hidden; }
  .header-right { grid-column: 2; gap: 0.375rem; flex-shrink: 0; }
  .tab-nav { display: none; }
  .tab-btn--admin { display: none !important; }
  .user-name { display: none; }
  .user-team-badge { display: none; }
  .user-profile-trigger { padding: 0.25rem; }
  #btn-login { font-size: 0.78rem; padding: 0.45rem 0.7rem; }
  .btn-login-full { display: none; }

  /* User menu — position fixed damit overflow:hidden im header nicht clipped */
  .user-menu { position: fixed; top: 64px; right: 0.75rem; left: 0.75rem; width: auto; min-width: unset; max-height: calc(100dvh - 140px); overflow-y: auto; }

  /* Bottom Navigation — Liquid Glass */
  .mobile-nav-wrap {
    display: block;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: max-content;
    max-width: calc(100vw - 2.5rem);
    height: 62px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow:
      0 8px 32px rgba(0,0,0,0.35),
      0 2px 8px rgba(0,0,0,0.2),
      inset 0 1px 0 rgba(255,255,255,0.15),
      inset 0 -1px 0 rgba(0,0,0,0.1);
    padding: 0 0.5rem;
    gap: 0.25rem;
    overflow: hidden;
  }
  [data-theme="light"] .mobile-nav {
    background: rgba(255,255,255,0.55);
    border-color: rgba(255,255,255,0.7);
    box-shadow:
      0 8px 32px rgba(0,0,0,0.12),
      0 2px 8px rgba(0,0,0,0.06),
      inset 0 1px 0 rgba(255,255,255,0.9),
      inset 0 -1px 0 rgba(0,0,0,0.04);
  }
  .mobile-nav-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; background: none; border: none; color: var(--text-3); font-size: 0.58rem;
    font-weight: 600; letter-spacing: 0.03em; cursor: pointer;
    transition: color var(--t) var(--ease), background var(--t) var(--ease);
    padding: 0.5rem 0.375rem;
    border-radius: 9999px;
    min-width: 56px;
  }
  .mobile-nav-btn svg { width: 21px; height: 21px; transition: transform var(--t) var(--ease); }
  .mobile-nav-btn:active svg { transform: scale(0.88); }
  .mobile-nav-btn.active {
    color: var(--purple);
    background: rgba(145,71,255,0.15);
  }
  .mobile-nav-btn.active svg { filter: drop-shadow(0 0 5px var(--purple-glow)); }
  [data-theme="light"] .mobile-nav-btn.active { background: rgba(124,58,237,0.1); }

  /* Sidebar */
  .featured-sidebar { display: none; }

  /* Cards */
  .user-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.625rem; }
  .user-card { padding: 1rem 0.75rem; }

  /* Panel header */
  .panel-header { flex-direction: column; gap: 0.75rem; margin-bottom: 1.25rem; }
  .panel-actions { flex-wrap: wrap; gap: 0.375rem; }
  .panel-actions .btn { font-size: 0.78rem; padding: 0.45rem 0.75rem; }

  /* Forms */
  .search-form { padding: 1.25rem; border-radius: var(--radius-lg); }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; min-width: 0; justify-content: center; }

  /* Check user results — stack followers below channel name */
  .check-channel-row { flex-wrap: wrap; gap: 0.5rem; }
  .check-followers-cell { width: 100%; text-align: right; font-size: 0.78rem; padding-left: calc(40px + 1rem + 0.625rem); }

  /* IRC filter full width */
  .irc-filter-input { max-width: 100%; }
  .irc-filter-wrap { margin-bottom: 0.75rem; }

  /* IRC sort buttons wrap */
  .admin-filters { flex-wrap: wrap; gap: 0.375rem; }

  /* Dialogs full width */
  .logout-dialog { width: calc(100vw - 2.5rem); max-width: 100%; padding: 1.5rem; }
  .logout-dialog-actions { flex-direction: column; gap: 0.5rem; }
  .logout-dialog-actions .btn { width: 100%; justify-content: center; }

  /* Admin: cards visible, table hidden on mobile */
  .admin-activity-cards { display: flex !important; }
  .admin-table-desktop { display: none !important; }

  /* Admin tile switcher hidden on mobile — bottom nav handles navigation */
  .admin-tile-switcher { display: none; }
  .user-menu-legal-divider { display: block; }
  .user-menu-legal { display: flex; }

  /* History panel */
  .history-panel { margin-top: 2rem; }

  /* Login card */
  .login-card { padding: 2rem 1.25rem; }

  /* Toasts */
  .toast-container { bottom: 72px; right: 0.75rem; left: 0.75rem; }
  .toast { max-width: 100%; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
  .site-footer { display: none; }

  /* Autocomplete full width already handled by position:relative on .form-group */
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { padding: 1.5rem; border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1920px; margin: 0 auto; padding: 0 2.5rem; font-size: 0.85rem; color: var(--text-3); }
.footer-inner a { color: var(--text-3); text-decoration: none; transition: color var(--t) var(--ease); }
.footer-inner a:hover { color: var(--purple-3); text-decoration: none; }
.footer-inner span a { color: var(--purple-3); }
.footer-inner span a:hover { color: var(--purple-2); }


/* ── Theme Toggle Header Button ──────────────────────────────────────────── */
.btn-theme-header { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; transition: all var(--t) var(--ease); flex-shrink: 0; }
.btn-theme-header:hover { background: var(--surface-3); color: var(--purple-3); border-color: var(--border-2); }
.btn-theme-header svg { width: 17px; height: 17px; }
.featured-sidebar.sidebar--hidden { display: none; }
.leaderboard-sidebar.sidebar--hidden { display: none; }
.sidebar-expand-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; width: 28px; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-4); cursor: pointer; transition: color var(--t) var(--ease), background var(--t) var(--ease); padding: 0.75rem 0; }
.sidebar-expand-tab:hover { color: var(--text-2); background: var(--surface-3); border-color: var(--border-2); }
.sidebar-expand-tab svg { width: 14px; height: 14px; flex-shrink: 0; }
.sidebar-expand-label { writing-mode: vertical-rl; text-orientation: mixed; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }

/* ── Twitch Links ────────────────────────────────────────────────────────── */
a.user-card { text-decoration: none; color: inherit; cursor: pointer; }
a.user-card:hover { text-decoration: none; }
a.check-channel-info { text-decoration: none; }
a.check-channel-info:hover { text-decoration: none; }


/* ── Autocomplete ────────────────────────────────────────────────────────── */
.form-group { position: relative; }
.autocomplete-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface-3); border: 1px solid var(--border-2); border-radius: var(--radius); list-style: none; z-index: 100; overflow: hidden; box-shadow: var(--shadow); }
.autocomplete-list.hidden { display: none; }
.autocomplete-list li { padding: 0.5rem 0.875rem; font-size: 0.875rem; color: var(--text); cursor: pointer; transition: background var(--t) var(--ease); }
.autocomplete-list li:hover, .autocomplete-list li.active { background: var(--surface-4); color: var(--purple-3); }

/* ── Live Dot ────────────────────────────────────────────────────────────── */
.live-dot { display: none; }
.is-live:not(.user-card--head-mod) { border-color: var(--red); animation: pulse-border 1.8s ease-in-out infinite; z-index: 1; position: relative; }
@keyframes pulse-border { 0%, 100% { box-shadow: 0 0 0 0 rgba(244,63,94,0); } 50% { box-shadow: 0 0 0 5px rgba(244,63,94,0.45); } }
.is-live.user-card--head-mod { border-color: rgba(255,185,0,0.75); animation: pulse-border-headmod 1.8s ease-in-out infinite; }
@keyframes pulse-border-headmod { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(255,185,0,0.35), 0 0 0 0 rgba(244,63,94,0); } 50% { box-shadow: inset 0 0 0 1px rgba(255,185,0,0.35), 0 0 0 5px rgba(244,63,94,0.45); } }
@keyframes pulse-dot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.7; } }
