/* ============================================================
   GameHub — Premium Dark-Tech Design System
   Awwwards & Linear-tier visual aesthetic (Anti-Slop Redesign)
   Fonts: Space Grotesk (display/headings) + Outfit (body text)
   ============================================================ */

@import url('/vendor/@fontsource/space-grotesk/400.css');
@import url('/vendor/@fontsource/space-grotesk/500.css');
@import url('/vendor/@fontsource/space-grotesk/600.css');
@import url('/vendor/@fontsource/space-grotesk/700.css');
@import url('/vendor/@fontsource/outfit/300.css');
@import url('/vendor/@fontsource/outfit/400.css');
@import url('/vendor/@fontsource/outfit/500.css');
@import url('/vendor/@fontsource/outfit/600.css');

/* ── Custom Properties ────────────────────────────────────── */
:root {
  /* Colors */
  --bg-color:                 #08080a;
  --surface:                  #0f0f13;
  --surface-low:              #0b0b0e;
  --surface-high:             #14141a;
  --surface-highest:          #1a1a24;
  --outline:                  rgba(255, 255, 255, 0.04);
  --outline-hover:            rgba(255, 255, 255, 0.1);
  
  /* Text */
  --text-primary:             #f3f4f6;
  --text-secondary:           #9ca3af;
  --text-muted:               #6b7280;
  
  /* Primary Accent - Tech Indigo */
  --accent:                   #6366f1;
  --accent-muted:             #312e81;
  --accent-text:              #e0e7ff;
  
  /* Status/States (No neon glow, clean semantic fills) */
  --success:                  #10b981;
  --success-bg:               rgba(16, 185, 129, 0.08);
  --warning:                  #f59e0b;
  --warning-bg:               rgba(245, 158, 11, 0.08);
  --error:                    #ef4444;
  --error-bg:                 rgba(239, 68, 68, 0.08);

  /* Spacing system - visual density 3 (airy and breathable) */
  --gap-xs:                   8px;
  --gap-sm:                   16px;
  --gap-md:                   24px;
  --gap-lg:                   40px;
  --gap-xl:                   64px;
  
  /* Radii - squircle feel */
  --radius-sm:                6px;
  --radius-md:                10px;
  --radius-lg:                14px;
  --radius-xl:                20px;
  --radius-full:              9999px;

  /* Subtle card highlight shadow */
  --inner-highlight:          inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

html, body {
  height: 100%;
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; object-fit: cover; }
button { cursor: pointer; font-family: inherit; border: none; background: none; outline: none; }
ul { list-style: none; }

/* ── Typography ────────────────────────────────────────────── */
.display-lg {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.headline-md {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.headline-sm {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.body-md {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
}

.body-sm {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-secondary);
}

.label-caps {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.stats-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}

/* ── Layout & Grid Structure ────────────────────────────────── */
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* Floating minimalist sidebar */
#sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface-low);
  border-right: 1px solid var(--outline);
  display: flex;
  flex-direction: column;
  padding: var(--gap-md);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-logo {
  padding: 8px 12px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--outline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.sidebar-logo .logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.nav-section {
  padding-bottom: 24px;
}

.nav-label {
  padding: 4px 12px 12px;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  margin-bottom: 4px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
  border-color: rgba(99, 102, 241, 0.15);
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: stroke 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: var(--gap-sm);
  border-top: 1px solid var(--outline);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Content Pane */
#main-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: radial-gradient(circle at 50% 0%, #0d0d12 0%, var(--bg-color) 100%);
}

.page {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--gap-lg) var(--gap-md);
}

/* ── Interactive CTAs (Button-in-Button Architecture) ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15), var(--inner-highlight);
}

.btn-primary:hover {
  background: #4f46e5;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  border: 1px solid var(--outline);
  box-shadow: var(--inner-highlight);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--outline-hover);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-primary);
  border-color: var(--outline);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.03);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.06);
  border-color: var(--error);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 11px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 13px;
}

.btn-discord {
  background: #5865f2;
  color: #fff;
  font-size: 13px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.15);
}

.btn-discord:hover {
  background: #4752c4;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.25);
  transform: translateY(-2px);
}

/* ── Bento-Grid & Visual Containers ─────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--gap-md);
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), var(--inner-highlight);
}

.card:hover {
  border-color: var(--outline-hover);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.card-glass {
  background: rgba(15, 15, 19, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--outline);
  border-radius: var(--radius-xl);
}

/* Bento Card Style */
.bento-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18), var(--inner-highlight);
}

.bento-card:hover {
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}

/* Game Card XP Display */
.game-card-xp {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.game-card-xp .xp-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ── Form Inputs ────────────────────────────────────────────── */
.input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.input:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.3);
}

.input::placeholder {
  color: var(--text-muted);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Minimalist Table Layout ────────────────────────────────── */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 18px 24px;
  text-align: left;
  border-bottom: 1px solid var(--outline);
  background: rgba(0, 0, 0, 0.08);
}

.leaderboard-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--outline);
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 300;
}

.leaderboard-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.rank-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.rank-1 { color: #facc15; background: rgba(250, 204, 21, 0.05); border: 1px solid rgba(250, 204, 21, 0.1); }
.rank-2 { color: #9ca3af; background: rgba(156, 163, 175, 0.05); border: 1px solid rgba(156, 163, 175, 0.1); }
.rank-3 { color: #d97706; background: rgba(217, 119, 6, 0.05); border: 1px solid rgba(217, 119, 6, 0.1); }

.user-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--outline);
  flex-shrink: 0;
  background: var(--surface);
}

.avatar-lg {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.xp-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

/* ── Control Deck Tabs ──────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-full);
  padding: 4px;
  width: fit-content;
  border: 1px solid var(--outline);
}

.tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: var(--outline);
  box-shadow: var(--inner-highlight);
}

/* ── Section Dividers & Headers ─────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-divider {
  height: 1px;
  background: var(--outline);
  margin: 32px 0;
  border: none;
}

/* Stat Counters */
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}

/* ── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface-low);
  border: 1px solid var(--outline);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), var(--inner-highlight);
  border-radius: var(--radius-xl);
  padding: 32px;
  min-width: 340px;
  max-width: 480px;
  width: 90%;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }

/* ── Responsive Bento Grid Layouts ──────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}

/* ── Toast notifications ────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  min-width: 240px;
  max-width: 380px;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: slideInToast 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-success { background: var(--surface-high); border-color: rgba(16, 185, 129, 0.2); color: var(--success); backdrop-filter: blur(10px); }
.toast-error   { background: var(--surface-high); border-color: rgba(239, 68, 68, 0.2); color: var(--error); backdrop-filter: blur(10px); }
.toast-info    { background: var(--surface-high); border-color: rgba(99, 102, 241, 0.2); color: var(--accent); backdrop-filter: blur(10px); }

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

/* Skeletons */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-high) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

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

.loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 24px;
  color: var(--text-secondary);
  text-align: center;
}

.empty-state-icon { font-size: 52px; opacity: 0.3; }

/* Utilities */
.text-primary  { color: var(--text-primary); }
.text-secondary{ color: var(--text-secondary); }
.text-muted    { color: var(--text-muted); }
.text-error    { color: var(--error); }
.text-right    { text-align: right; }

/* Minimalist HUD progress bars */
.hud-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.hud-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.06); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.12); }

/* Admin switch toggle visual styling */
.admin-toggle-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  width: fit-content;
  user-select: none;
}

.admin-toggle-wrap {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.admin-toggle-wrap input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.admin-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--outline);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.admin-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-toggle-wrap input:checked + .admin-toggle-track {
  background: var(--accent);
}

.admin-toggle-wrap input:checked + .admin-toggle-track .admin-toggle-thumb {
  left: 22px;
  background: white;
}

.admin-toggle-label-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
}

/* ── Responsive ─────────────────────────────────────────────── */
#mobile-header { display: none; }

@media (max-width: 1024px) {
  #sidebar {
    width: 230px;
  }
}

@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    transform: translateX(-100%);
    width: 260px;
    background: var(--bg-color);
  }

  #sidebar.open {
    transform: translateX(0);
    box-shadow: 6px 0 40px rgba(0,0,0,0.8);
  }

  #mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(8, 8, 10, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--outline);
    position: sticky;
    top: 0;
  }
}

/* Admin Config Panel Styles - CSP Compliant */
.admin-config-field {
  padding: 18px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
}

.admin-config-field-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-config-field-type-chip {
  font-size: 9px;
  padding: 2px 8px;
}

.admin-config-field-desc {
  margin-top: 4px;
}

.admin-config-field-input {
  margin-top: 8px;
}

.admin-config-number-input,
.admin-config-string-input {
  max-width: 220px;
}

.admin-config-string-input-wide {
  max-width: 440px;
}

.admin-config-select-input {
  max-width: 260px;
}

.admin-config-range-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-config-range-input {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
  border-radius: 2px;
  cursor: pointer;
}

/* ── Custom range slider thumb (Webkit) ───────────────────── */
.admin-config-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--surface-high);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
  margin-top: -7px; /* pull up to center on 4px track */
}

.admin-config-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.6);
}

.admin-config-range-input::-webkit-slider-thumb:active {
  transform: scale(0.95);
}

/* ── Custom range slider track (Webkit) ───────────────────── */
.admin-config-range-input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Custom range slider thumb (Firefox) ──────────────────── */
.admin-config-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--surface-high);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}

.admin-config-range-input::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.6);
}

.admin-config-range-input::-moz-range-thumb:active {
  transform: scale(0.95);
}

/* ── Custom range slider track (Firefox) ──────────────────── */
.admin-config-range-input::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
}

.admin-config-range-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  min-width: 36px;
  text-align: right;
}

.admin-config-range-hint {
  margin-top: 4px;
  z-index: 100;
}

/* ── Responsive ─────────────────────────────────────────────── */
#mobile-header { display: none; }

@media (max-width: 1024px) {
  #sidebar { width: 230px; }
}

@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    transform: translateX(-100%);
    width: 260px;
    background: var(--bg-color);
  }

  #sidebar.open {
    transform: translateX(0);
    box-shadow: 6px 0 40px rgba(0,0,0,0.8);
  }

  #mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(8, 8, 10, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--outline);
    position: sticky;
    top: 0;
  }

  .page { padding: 32px 20px; }
  .display-lg { font-size: 34px; }
  .games-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .tabs { width: 100%; }
  .tab-btn { flex: 1; text-align: center; }
}

/* Utility Helpers */
.hidden  { display: none !important; }
.flex    { display: flex; }
.flex-col{ display: flex; flex-direction: column; }
.gap-4   { gap: 4px; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }
.gap-20  { gap: 20px; }
.gap-24  { gap: 24px; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full{ width: 100%; }
.overflow-hidden { overflow: hidden; }
