﻿/* ================================================================
   ASTRO DARTS — style.css  »  Ballistic HUD Design System
   Fonts loaded via <link> in every HTML page (Space Grotesk + Lexend)
   ================================================================ */

/* ─── 1. Design Tokens ──────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:              #0c0e11;
  --surface-low:     #111417;
  --surface:         #171a1d;
  --surface-high:    #1d2024;
  --surface-highest: #23262a;
  --surface-bright:  #292c31;
  /* Text */
  --on-surface:      #f9f9fd;
  --on-surface-var:  #aaabaf;
  /* Borders */
  --outline:         #3a3d40;
  --outline-var:     #46484b;
  /* Brand — Ballistic HUD palette (exact Stitch values) */
  --primary:            #f3ffca; /* pale lime — text accent */
  --primary-container:  #cafd00; /* solid lime — fills, buttons */
  --primary-dim:        #beee00; /* slightly darker lime — gradient end */
  --primary-glow:       rgba(202,253,0,0.12); /* subtle bg tint */
  --on-primary:         #516700; /* dark olive on lime fill */
  --secondary:          #ff7436;
  --secondary-dim:      rgba(255,116,54,0.12);
  --tertiary:           #81ecff;
  /* Glow shadows */
  --glow-lime:   0 0 40px rgba(202,253,0,0.15);
  --glow-lime-md: 0 0 20px rgba(202,253,0,0.2);
  --glow-orange: 0 0 30px rgba(255,116,54,0.18);
  --glow-btn:    0 10px 30px rgba(202,253,0,0.28);
  /* Status */
  --danger:          #f87171;
  --danger-dim:      rgba(248,113,113,0.12);
  --success:         #4ade80;
  --success-dim:     rgba(74,222,128,0.12);
  --warning:         #fbbf24;
  --warning-dim:     rgba(251,191,36,0.12);
  /* Legacy aliases */
  --sl-950:          var(--bg);
  --sl-900:          var(--surface-low);
  --sl-800:          var(--surface);
  --sl-700:          var(--surface-high);
  --sl-600:          var(--surface-highest);
  --menu-bg:         var(--surface-low);
  --menu-sidebar-bg: var(--surface);
  --menu-card-bg:    var(--surface-high);
  --menu-ink:        var(--on-surface);
  --menu-soft:       rgba(249,249,253,0.75);
  --menu-muted:      var(--on-surface-var);
  --menu-glass:      rgba(17,20,23,0.96);
  --menu-glass-strong: rgba(12,14,17,0.98);
  --menu-border:     rgba(255,255,255,0.06);
  --menu-accent:     var(--primary-container);
  --menu-accent-2:   var(--secondary);
  --menu-accent-glow: var(--primary-dim);
  /* Layout */
  --auth-footer-height: 56px;
  /* Typography */
  --app-font-size-base:      16px;
  --app-font-size-small:     13px;
  --app-font-size-h1:        32px;
  --app-font-size-h2:        24px;
  --app-font-size-h3:        20px;
  --app-font-size-nav-brand: 16px;
  --app-font-size-button:    15px;
}

/* ─── 2. Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  min-height: 100vh;
  font-family: 'Lexend', 'Segoe UI', system-ui, sans-serif;
  font-size: var(--app-font-size-base);
  color: var(--on-surface);
  position: relative;
  display: flex;
  flex-direction: column;
  /* Ambient light sources (Stitch: Chromatic Depth) */
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(202,253,0,0.05) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 85%, rgba(255,116,54,0.05) 0%, transparent 40%);
}
h1,.h1 { font-size: var(--app-font-size-h1); }
h2,.h2 { font-size: var(--app-font-size-h2); }
h3,.h3 { font-size: var(--app-font-size-h3); }
small,.small { font-size: var(--app-font-size-small); }
h1,h2,h3,h4,h5,h6 { font-family: 'Space Grotesk', 'Lexend', sans-serif; }
.navbar-brand { font-size: var(--app-font-size-nav-brand); }
.form-control::placeholder,.form-select::placeholder,textarea::placeholder,input::placeholder { color: var(--on-surface-var) !important; opacity: 1; }
.form-control,.form-select,textarea,input { color: var(--on-surface); border: 1px solid rgba(255,255,255,0.07); background: var(--surface-high); border-radius: 8px; }
.form-select option { color: var(--on-surface); background: var(--surface-highest); }
.text-muted { color: var(--on-surface-var) !important; }
a { color: var(--primary-container); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: underline; }

/* ─── 3. Utility shim ───────────────────────────────────────────── */
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-grid { display: grid !important; }
.d-inline-flex { display: inline-flex !important; }
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.flex-1 { flex: 1 1 0 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.gap-0 { gap: 0 !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }
.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 24px !important; }
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }
.ms-1 { margin-left: 4px !important; }
.ms-2 { margin-left: 8px !important; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 12px !important; }
.p-4 { padding: 16px !important; }
.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-white { color: #fff !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.rounded { border-radius: 8px !important; }
.rounded-circle { border-radius: 50% !important; }
.position-relative { position: relative !important; }
.overflow-hidden { overflow: hidden !important; }

/* Badge shim */
.badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 1.2; background: var(--surface-bright); color: var(--on-surface); }
.badge.bg-success { background: var(--success-dim) !important; color: var(--success) !important; }
.badge.bg-danger { background: var(--danger-dim) !important; color: var(--danger) !important; }
.badge.bg-warning { background: var(--warning-dim) !important; color: var(--warning) !important; }
.badge.bg-primary { background: var(--primary-dim) !important; color: var(--primary) !important; }
.badge.bg-secondary { background: var(--secondary-dim) !important; color: var(--secondary) !important; }
.badge.bg-dark { background: var(--surface-highest) !important; color: var(--on-surface) !important; }

/* List group shim */
.list-group { padding-left: 0; margin-bottom: 0; }
.list-group-item { background: var(--surface-high); border: 1px solid var(--outline); color: var(--on-surface); padding: 10px 14px; }
.list-group-item-action { cursor: pointer; transition: background 0.15s; }
.list-group-item-action:hover { background: var(--surface-highest); }
.list-group-item-action.active { background: var(--primary-dim); border-color: rgba(202,253,0,0.35); color: var(--primary); }

/* Nav tabs shim */
.nav,
.nav-tabs,
.nav-pills {
  list-style: none;
  margin: 0;
  padding-left: 0;
}
.nav-item {
  list-style: none;
}
.nav-item::marker {
  content: '';
}
.nav-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--outline); }
.nav-tabs .nav-link { padding: 8px 16px; border-radius: 6px 6px 0 0; border: 1px solid transparent; background: transparent; color: var(--on-surface-var); font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: color 0.15s, background 0.15s; text-decoration: none; }
.nav-tabs .nav-link:hover { color: var(--on-surface); background: rgba(255,255,255,0.05); }
.nav-tabs .nav-link.active { background: rgba(202,253,0,0.08); color: var(--primary-container); border-color: rgba(202,253,0,0.2); }

/* Nav pills shim */
.nav-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-fill .nav-item { flex: 1 1 0; }
.nav-fill .nav-link { width: 100%; }
.nav-pills .nav-link { padding: 8px 16px; border-radius: 20px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); color: var(--on-surface-var); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.nav-pills .nav-link:hover { background: rgba(255,255,255,0.09); color: var(--on-surface); }
.nav-pills .nav-link.active { background: rgba(202,253,0,0.1); border-color: rgba(202,253,0,0.25); color: var(--primary-container); font-weight: 700; }

/* Tab content */
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active, .tab-content > .show { display: block; }
.collapse { display: none; }
.collapse.show, .collapsing { display: block; }

/* Modal backdrop */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1040; }
.modal-backdrop.show { opacity: 1; }

/* Modal shim */
.modal { position: fixed; inset: 0; z-index: 1050; display: none; overflow-x: hidden; overflow-y: auto; outline: 0; }
.modal.show { display: flex; align-items: center; justify-content: center; }
.modal-dialog { margin: 24px auto; max-width: 500px; width: calc(100% - 48px); pointer-events: none; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 48px); }
.modal-dialog-scrollable .modal-body { overflow-y: auto; }
.modal-dialog.modal-lg { max-width: 800px; }
.modal-dialog.modal-xl { max-width: 1140px; }
.modal-content { pointer-events: all; background: var(--surface-high); border: 1px solid rgba(255,255,255,0.07); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,0.55); color: var(--on-surface); position: relative; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); background: var(--surface); border-radius: 16px 16px 0 0; }
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.06); border-radius: 0 0 16px 16px; }
.btn-close { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--on-surface-var); font-size: 0.9rem; transition: background 0.15s, color 0.15s; padding: 0; }
.btn-close::before { content: '×'; font-size: 1.3rem; line-height: 1; }
.btn-close:hover { background: var(--danger-dim); color: var(--danger); border-color: rgba(248,113,113,0.3); }

/* ─── 4. Buttons ────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; padding: 9px 18px; border-radius: 8px; border: none; font-family: inherit; font-size: var(--app-font-size-button); font-weight: 600; cursor: pointer; transition: all 0.15s ease; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
/* Kinetic gradient — exact Stitch CTA style */
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%); color: var(--on-primary); font-weight: 700; box-shadow: var(--glow-btn); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 14px 36px rgba(202,253,0,0.35); }
.btn-secondary { background: linear-gradient(135deg, #f3ffca 0%, #cafd00 100%); color: #516700; font-weight: 700; box-shadow: 0 6px 18px rgba(202,253,0,0.22); }
.btn-secondary:hover { filter: brightness(1.07); box-shadow: 0 10px 28px rgba(202,253,0,0.35); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #fca5a5; }
.btn-success { background: var(--success); color: #052e0a; }
.btn-outline-secondary { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: var(--on-surface-var); }
.btn-outline-secondary:hover { background: rgba(255,255,255,0.05); color: var(--on-surface); }
.btn-outline-danger { background: transparent; border: 1px solid rgba(248,113,113,0.35); color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger-dim); }
.btn-outline-primary { background: transparent; border: 1px solid rgba(202,253,0,0.3); color: var(--primary-container); }
.btn-outline-primary:hover { background: rgba(202,253,0,0.06); }
.btn-dark { background: var(--surface-highest); color: var(--on-surface); border: 1px solid rgba(255,255,255,0.07); }
.btn-dark:hover { background: var(--surface-bright); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 6px; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; border-radius: 10px; }
.btn-cta-orange { background: linear-gradient(135deg, #f3ffca 0%, #cafd00 100%); color: #516700 !important; border: none; font-weight: 800; border-radius: 12px; padding: 10px 18px; box-shadow: 0 8px 24px rgba(202,253,0,0.28); }
.btn-cta-orange:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(202,253,0,0.38); }
.btn-cta-dark { background: var(--surface-highest); color: var(--on-surface); border: 1px solid rgba(255,255,255,0.07); font-weight: 700; border-radius: 12px; padding: 10px 18px; }
.btn-cta-dark:hover { background: var(--surface-bright); transform: translateY(-1px); }
.btn-link { background: none; border: none; color: var(--primary-container); padding: 0; cursor: pointer; text-decoration: none; font-family: inherit; font-size: inherit; }
.btn-link:hover { color: var(--primary); text-decoration: underline; }

/* ─── 5. Form controls ──────────────────────────────────────────── */
.form-control { display: block; width: 100%; padding: 10px 14px; background: var(--surface); border: 1px solid var(--outline); border-radius: 8px; color: var(--on-surface); font-size: 0.95rem; font-family: inherit; line-height: 1.4; transition: border-color 0.15s, box-shadow 0.15s; }
.form-control:focus { outline: none; border-color: rgba(202,253,0,0.5); box-shadow: 0 0 0 3px rgba(202,253,0,0.12); background: var(--surface-high); }
.form-select { display: block; width: 100%; padding: 10px 14px; background: var(--surface); border: 1px solid var(--outline); border-radius: 8px; color: var(--on-surface); font-family: inherit; cursor: pointer; transition: border-color 0.15s; }
.form-select:focus { outline: none; border-color: rgba(202,253,0,0.5); box-shadow: 0 0 0 3px rgba(202,253,0,0.12); }
.form-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.88rem; color: var(--on-surface-var); }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check-input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.input-dark, .form-control.input-dark { background: var(--bg); border-color: var(--outline); color: var(--on-surface); }
.input-dark:focus, .form-control.input-dark:focus { border-color: rgba(202,253,0,0.5); box-shadow: 0 0 0 3px rgba(202,253,0,0.12); }

/* ─── 6. Footer ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  color: var(--on-surface-var);
  padding: 12px 0 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(202,253,0,0.08), transparent 36%),
    radial-gradient(circle at 88% 100%, rgba(255,116,54,0.08), transparent 34%),
    linear-gradient(180deg, rgba(17,20,23,0.98), rgba(12,14,17,0.98));
  border-top: 1px solid rgba(255,255,255,0.06);
}
.site-footer .footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  grid-template-areas:
    "brand links meta";
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(29,32,36,0.86) 0%, rgba(23,26,29,0.86) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 12px 28px rgba(0,0,0,0.3);
  padding: 14px 16px;
}
.site-footer .footer-brand-wrap {
  grid-area: brand;
  min-width: 0;
}
.site-footer .footer-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-footer .footer-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-container);
  box-shadow: 0 0 12px rgba(202,253,0,0.65);
  flex-shrink: 0;
}
.site-footer .footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--on-surface);
}
.site-footer .footer-tagline {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--on-surface-var);
}
.site-footer .footer-links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-self: center;
  justify-self: center;
}
.site-footer .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: var(--on-surface-var);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.site-footer .footer-links a:hover {
  color: var(--on-surface);
  border-color: rgba(202,253,0,0.32);
  background: rgba(202,253,0,0.08);
}
.site-footer .footer-meta {
  grid-area: meta;
  text-align: right;
  justify-self: end;
  font-size: 0.74rem;
  color: rgba(170,171,175,0.9);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .site-footer .footer-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "links"
      "meta";
    gap: 12px;
    text-align: left;
  }
  .site-footer .footer-meta {
    text-align: left;
    justify-self: start;
    white-space: normal;
  }
}

/* ─── 7. Auth container ─────────────────────────────────────────── */
#guest-landing {
  min-height: calc(100vh - var(--auth-footer-height));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 24px;
  overflow: hidden;
}
.guest-landing-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(202,253,0,0.14), transparent 36%),
    radial-gradient(circle at 85% 75%, rgba(255,116,54,0.14), transparent 34%),
    linear-gradient(165deg, rgba(12,14,17,0.98) 0%, rgba(17,20,23,0.98) 65%, rgba(23,26,29,0.98) 100%);
}
.guest-landing-inner {
  position: relative;
  width: min(940px, 100%);
  text-align: center;
  background: rgba(23,26,29,0.82);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.45), 0 0 0 1px rgba(202,253,0,0.05) inset;
  padding: 44px 34px;
  backdrop-filter: blur(8px);
}
.guest-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-container);
  border: 1px solid rgba(202,253,0,0.25);
  border-radius: 999px;
  background: rgba(202,253,0,0.08);
  padding: 7px 12px;
  margin-bottom: 18px;
}
.guest-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #f7f9fc;
}
.guest-subtitle {
  margin: 16px auto 0;
  max-width: 760px;
  color: var(--on-surface-var);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.65;
}
.guest-features-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.guest-feature-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(165deg, rgba(29,32,36,0.9) 0%, rgba(23,26,29,0.9) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.guest-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--primary-container);
  background: rgba(202,253,0,0.1);
  border: 1px solid rgba(202,253,0,0.2);
  flex-shrink: 0;
}
.guest-feature-text {
  margin: 0;
  color: #f8fafc;
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.guest-actions {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.auth-back-btn {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--on-surface-var);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.auth-back-btn:hover {
  background: rgba(202,253,0,0.08);
  color: var(--primary-container);
  border-color: rgba(202,253,0,0.25);
}
#auth-container { min-height: calc(100vh - var(--auth-footer-height)); display: flex; align-items: center; padding: 24px 16px 16px; flex: 1; background: radial-gradient(ellipse at 20% 30%, rgba(202,253,0,0.06), transparent 50%), radial-gradient(ellipse at 80% 70%, rgba(255,116,54,0.06), transparent 50%), var(--surface-low); }
#app-container { flex: 1; }
#auth-container > .row { width: 100%; justify-content: center; margin: 0; }
#auth-container .card { background: var(--surface-high); border: 1px solid var(--outline); border-radius: 22px; color: var(--on-surface); box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
#auth-container .card-body { padding: 44px 52px; }
#auth-container .form-label { font-size: 0.95rem; }
#auth-container .form-control { min-height: 48px; font-size: 1.02rem; background: var(--surface); border-color: var(--outline); color: var(--on-surface); }
#auth-container .form-control:focus { border-color: rgba(202,253,0,0.5); box-shadow: 0 0 0 3px rgba(202,253,0,0.12); background: var(--surface-highest); }
#auth-container .btn { padding: 14px 18px; font-size: 1.02rem; }
#auth-container h4 { font-size: 1.3rem; }
#auth-container .text-muted { font-size: 0.95rem; }
#auth-container .nav-pills .nav-link { padding: 10px 14px; font-size: 1rem; border-radius: 12px; }
@media (min-width: 992px) { #auth-container .col-lg-5 { flex: 0 1 760px; width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; } #auth-container .card-body { padding: 64px 72px; } #auth-container .form-control { min-height: 56px; font-size: 1.1rem; } }
@media (min-width: 1400px) { #auth-container { padding-top: 40px; } #auth-container .col-lg-5 { max-width: 840px; } #auth-container .card-body { padding: 76px 90px; } #auth-container .btn { font-size: 1.15rem; padding: 16px 20px; } }
@media (max-width: 576px) { #auth-container .card-body { padding: 28px 24px; } }
@media (max-width: 768px) {
  .guest-landing-inner { padding: 30px 18px; border-radius: 18px; }
  .guest-features-grid { grid-template-columns: 1fr; gap: 10px; }
  .guest-feature-card { padding: 14px 12px; }
  .guest-actions .btn { width: 100%; }
}

/* ─── 8. Navbar ─────────────────────────────────────────────────── */
.nav-dark-gradient { background: var(--surface) !important; color: var(--on-surface) !important; border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-dark-gradient .navbar-brand,.nav-dark-gradient .nav-link,.nav-dark-gradient .navbar-text,.nav-dark-gradient a { color: var(--on-surface) !important; }
.navbar-brand { font-weight: bold; font-size: 1.3rem; }

/* ─── 9. App Shell ──────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; background: var(--bg); width: 100%; overflow-x: clip; }
.mobile-nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); opacity: 0; pointer-events: none; transition: opacity 0.24s ease; z-index: 90; }
body.nav-open { overflow: hidden; }
#app-container { position: relative; }
.app-sidebar-column { width: 240px; min-width: 240px; flex-shrink: 0; background: var(--surface-low); border-right: 1px solid rgba(255,255,255,0.05); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); overflow-x: clip; }

/* ─── 10. Topbar ────────────────────────────────────────────────── */
.app-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; height: 60px; background: var(--surface-low); border-bottom: 1px solid rgba(202,253,0,0.06); box-shadow: 0 4px 20px rgba(0,0,0,0.4); flex-shrink: 0; backdrop-filter: blur(12px); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-menu-btn { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.04); color: var(--on-surface); cursor: pointer; transition: background 0.15s; flex-shrink: 0; }
.topbar-menu-btn:hover { background: rgba(255,255,255,0.08); }
.topbar-title { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; color: var(--primary-container); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.notification-bell.topbar-bell { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); color: var(--on-surface-var); transition: background 0.15s, color 0.15s; font-size: 1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.notification-bell.topbar-bell:hover { background: rgba(255,255,255,0.08); color: var(--on-surface); }
.topbar-user-pill { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.04); cursor: pointer; text-decoration: none; color: var(--on-surface); transition: background 0.15s, border-color 0.15s; min-width: 0; }
.topbar-user-pill:hover { background: rgba(255,255,255,0.08); border-color: rgba(202,253,0,0.18); color: #fff; text-decoration: none; }
.topbar-av { width: 28px; height: 28px; border-radius: 6px; background: var(--surface-highest); color: var(--primary-container); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; flex-shrink: 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.topbar-av img { width: 100%; height: 100%; object-fit: cover; }
.topbar-uname { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.topbar-chevron { font-size: 0.65rem; color: var(--on-surface-var); flex-shrink: 0; }

/* ─── 11. Sidebar ───────────────────────────────────────────────── */
.sidebar-card { min-height: 100vh; height: 100vh; border-radius: 0; padding: 0; gap: 0; background: var(--surface-low); border: none; border-right: 1px solid rgba(255,255,255,0.05); box-shadow: none; position: sticky; top: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; }
.sidebar-logo img { max-height: 36px; width: auto; flex-shrink: 0; }
.sidebar-kicker { display: block; font-size: 0.82rem; font-weight: 700; color: var(--primary-container); letter-spacing: 0.03em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-card { padding: 16px 20px; border-radius: 0; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; }
.sidebar-profile { display: flex; flex-direction: row; align-items: center; gap: 10px; margin-bottom: 0; padding: 0; }
.sidebar-user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.sidebar-avatar { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-highest); color: var(--primary-container); display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; flex-shrink: 0; overflow: hidden; border: 1px solid rgba(202,253,0,0.15); }
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.sidebar-name { font-size: 0.88rem; font-weight: 600; color: var(--on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-caption { display: block; font-size: 0.72rem; color: var(--on-surface-var); }
.sidebar-promo { margin: 14px 12px; background: linear-gradient(135deg, rgba(202,253,0,0.08) 0%, rgba(255,116,54,0.06) 100%); border: 1px solid rgba(202,253,0,0.12); border-radius: 12px; padding: 14px; }
.promo-title { font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 14px; text-transform: uppercase; color: var(--primary-container); }
.promo-text { font-size: 12px; margin: 6px 0 10px; color: var(--on-surface-var); }
.promo-btn { width: 100%; border: none; border-radius: 10px; padding: 10px 12px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%); color: var(--on-primary); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; justify-content: center; cursor: pointer; transition: all 0.15s; font-family: inherit; box-shadow: 0 6px 18px rgba(202,253,0,0.2); }
.promo-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.sidebar-menu { display: flex; flex-direction: column; gap: 2px; flex: 0 0 auto; padding: 6px 10px 0; }
.sidebar-menu.sidebar-menu-secondary { flex: 1; padding: 6px 10px 16px; }
.sidebar-nav-label { margin: 18px 0 6px; padding: 0 10px; font-size: 0.63rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(170,171,175,0.4); display: block; flex-shrink: 0; }
.sidebar-item { margin-bottom: 1px; padding: 9px 10px; border-radius: 8px; border: none; background: transparent; box-shadow: none; font-size: 0.875rem; font-weight: 500; text-transform: none; color: rgba(170,171,175,0.85); display: flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease; width: 100%; }
.sidebar-item::before { display: none; }
.sidebar-item i { font-size: 15px; min-width: 20px; text-align: center; color: rgba(170,171,175,0.5); transition: color 0.15s ease; flex-shrink: 0; }
.sidebar-item span { text-align: left; font-size: 0.875rem; color: inherit; font-weight: 500; flex: 1; }
.sidebar-item:hover { background: rgba(202,253,0,0.06); color: var(--on-surface); transform: none; box-shadow: none; }
.sidebar-item:hover i { color: var(--primary-container); }
.sidebar-item.active { background: rgba(202,253,0,0.1); color: var(--on-surface); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(202,253,0,0.15); }
.sidebar-item.active i { color: var(--primary-container); }
.sidebar-item.active span { color: var(--primary); }
.sidebar-item:hover::before,.sidebar-item.active::before { display: none; }
.sidebar-item.center-btn { justify-content: flex-start; }
.sidebar-item.premium-entry { background: rgba(255,167,26,0.08); color: #ffd65a; }
.sidebar-item.premium-entry i,.sidebar-item.premium-entry span { color: #ffd65a; }
.sidebar-item.premium-entry:hover { background: rgba(255,167,26,0.15); color: #ffe780; }
.sidebar-item.danger { color: rgba(248,113,113,0.75); }
.sidebar-item.danger i { color: rgba(248,113,113,0.55); }
.sidebar-item.danger:hover { background: var(--danger-dim); color: var(--danger); }
.sidebar-item.danger:hover i,.sidebar-item.danger:hover span { color: var(--danger); }
.sidebar-mobile-head { display: none; align-items: center; justify-content: space-between; padding: 14px 14px 10px; border-bottom: 1px solid var(--outline); margin-bottom: 0; }
.sidebar-mobile-label { font-size: 0.76rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--on-surface-var); }
.sidebar-close-btn { width: 34px; height: 34px; border: 1px solid var(--outline); border-radius: 8px; background: rgba(255,255,255,0.04); color: var(--on-surface); display: flex; align-items: center; justify-content: center; font-size: 1rem; cursor: pointer; transition: background 0.15s; }
.sidebar-close-btn:hover { background: rgba(255,255,255,0.08); }
.sidebar-subcopy,.sidebar-status-row,.sidebar-status-pill,.sidebar-status-pill.muted { display: none; }

/* ─── 12. Main content ──────────────────────────────────────────── */
.main-content { flex: 1; padding: 28px 32px; min-width: 0; overflow-x: clip; }
.main-layout { min-height: 100vh; padding: 0; }
.main-layout > .row { margin: 0; }
.main-layout > .row > [class^="col-"] { padding: 0; }
.content-section { animation: fadeIn 0.25s ease; max-width: 1200px; margin: 0 auto; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ─── 13. Home dashboard ────────────────────────────────────────── */
.home-dashboard { display: flex; flex-direction: column; gap: 24px; }
.home-greeting { padding-bottom: 4px; }
.home-greeting-title { font-size: 1.35rem; font-weight: 700; color: var(--on-surface); margin-bottom: 5px; font-family: 'Space Grotesk', sans-serif; }
.home-greeting-sub { font-size: 0.875rem; color: var(--on-surface-var); line-height: 1.5; }
.home-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.home-stats-row > * { min-width: 0; }
.hstat-tile { background: var(--surface-high); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.hstat-tile:hover { background: var(--surface-highest); border-color: rgba(202,253,0,0.20); box-shadow: 0 0 28px rgba(202,253,0,0.09), 0 4px 16px rgba(0,0,0,0.3); }
.hstat-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(202,253,0,0.10); color: var(--primary-container); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.hstat-icon--orange { background: var(--secondary-dim); color: var(--secondary); }
.hstat-icon--green { background: var(--success-dim); color: var(--success); }
.hstat-icon--purple { background: rgba(139,92,246,0.12); color: #a78bfa; }
.hstat-body { min-width: 0; }
.hstat-label { font-size: 0.75rem; color: var(--on-surface-var); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hstat-value { font-size: 1.5rem; font-weight: 700; color: var(--primary-container); line-height: 1.2; margin-top: 2px; font-family: 'Space Grotesk', sans-serif; }
.home-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.home-actions-grid > * { min-width: 0; }
.home-action-card { background: var(--surface-high); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 20px 22px; display: flex; align-items: flex-start; gap: 14px; cursor: pointer; text-decoration: none; color: var(--on-surface); transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s; }
.home-action-card:hover { background: var(--surface-highest); border-color: rgba(202,253,0,0.20); transform: translateY(-1px); text-decoration: none; color: var(--on-surface); box-shadow: 0 0 28px rgba(202,253,0,0.08), 0 8px 24px rgba(0,0,0,0.25); }
.hac-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; background: rgba(202,253,0,0.10); color: var(--primary-container); }
.home-action-card--orange .hac-icon { background: var(--secondary-dim); color: var(--secondary); }
.home-action-card--amber .hac-icon { background: var(--warning-dim); color: var(--warning); }
.home-action-card--teal .hac-icon { background: rgba(129,236,255,0.1); color: var(--tertiary); }
.hac-body { flex: 1; min-width: 0; }
.hac-kicker { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-surface-var); margin-bottom: 4px; }
.hac-title { font-size: 1rem; font-weight: 700; color: var(--on-surface); margin-bottom: 4px; font-family: 'Space Grotesk', sans-serif; }
.hac-desc { font-size: 0.82rem; color: var(--on-surface-var); line-height: 1.5; }
.hac-arrow { color: var(--on-surface-var); font-size: 0.8rem; margin-top: 2px; transition: color 0.15s, transform 0.15s; flex-shrink: 0; }
.home-action-card:hover .hac-arrow { color: var(--on-surface); transform: translateX(3px); }
.home-quicklinks { display: flex; gap: 8px; flex-wrap: wrap; }
.hql-item { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.03); color: var(--on-surface-var); font-size: 0.84rem; font-weight: 500; cursor: pointer; text-decoration: none; transition: background 0.12s, color 0.12s, border-color 0.12s; }
.hql-item:hover { background: rgba(202,253,0,0.06); color: var(--primary-container); border-color: rgba(202,253,0,0.25); text-decoration: none; }
.home-header { display: flex; align-items: center; gap: 14px; background: var(--surface-high); padding: 12px 14px; border-radius: 14px; color: var(--on-surface); border: 1px solid rgba(255,255,255,0.06); }
.home-avatar { width: 56px; height: 56px; border-radius: 14px; background: var(--surface-highest); display: grid; place-items: center; font-weight: 800; color: var(--primary-container); }
.home-name { font-weight: 800; font-size: 18px; font-family: 'Space Grotesk', sans-serif; }
.home-meta { font-size: 13px; color: var(--on-surface-var); }
.home-cta-grid { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; }
.home-cta-grid .cta-card { min-height: 120px; }
.home-cta-grid .cta-card.cta-full,.home-cta-grid > .cta-full { grid-column: 1 / span 2 !important; }
@media (max-width: 640px) { .home-cta-grid { grid-template-columns: 1fr; } .home-cta-grid .cta-card.cta-full { grid-column: 1 / -1 !important; } }
.cta-card { border-radius: 14px; padding: 16px; color: var(--on-surface); background: var(--surface-high); border: 1px solid rgba(255,255,255,0.06); cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.cta-card:hover { transform: translateY(-2px); box-shadow: 0 0 24px rgba(202,253,0,0.07), 0 6px 18px rgba(0,0,0,0.22); }
.cta-card.orange { background: linear-gradient(135deg, var(--secondary) 0%, #e0532a 100%); color: #fff; border-color: transparent; }
.cta-card.amber { background: linear-gradient(135deg, #f8b133 0%, #f39c12 100%); color: #fff; border-color: transparent; }
.cta-card.dark { background: var(--surface-high); color: var(--on-surface); border: 1px solid var(--outline); }
.cta-title { font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; font-size: 16px; font-family: 'Space Grotesk', sans-serif; }
.cta-sub { margin-top: 6px; opacity: 0.9; font-size: 13px; }
.cta-banner { border-radius: 14px; padding: 18px; background: linear-gradient(135deg, rgba(202,253,0,0.12) 0%, rgba(255,116,54,0.08) 100%); border: 1px solid rgba(202,253,0,0.22); color: var(--on-surface); }
.header-orange { background: linear-gradient(135deg, var(--secondary) 0%, #e0532a 100%); color: #fff; }
.stats-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.stats-item { background: var(--surface-high); border-radius: 10px; padding: 12px 14px; color: var(--on-surface); display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 700; border: 1px solid rgba(255,255,255,0.06); transition: border-color 0.15s; }
.stats-link { font-weight: 800; color: var(--primary-container); }

/* ─── 14. Cards ─────────────────────────────────────────────────── */
.card { border-radius: 14px; background: var(--surface-high); border: 1px solid rgba(255,255,255,0.06); color: var(--on-surface); }
.card-body { padding: 20px; }
.card-header { background: var(--surface); border-bottom: 1px solid rgba(255,255,255,0.06); padding: 14px 18px 14px 20px; font-weight: 700; border-radius: 14px 14px 0 0; color: var(--on-surface); border-left: 3px solid rgba(202,253,0,0.5); }
.card-dark { background: var(--surface-high); border: 1px solid rgba(255,255,255,0.06); color: var(--on-surface); transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.card-dark:hover { box-shadow: 0 0 24px rgba(202,253,0,0.07), 0 8px 24px rgba(0,0,0,0.22); border-color: rgba(202,253,0,0.12); }
.card-dark .card-header,.modal-content.modal-dark .modal-header { background: var(--surface); color: var(--on-surface); border-bottom: 1px solid rgba(255,255,255,0.06); }
.card-dark p,.card-dark small,.card-dark label,.card-dark .text-muted,.modal-dark p,.modal-dark small,.modal-dark label,.modal-dark .text-muted,.nav-dark-gradient .text-muted { color: var(--on-surface-var) !important; }
.modal-content.modal-dark { --bs-modal-bg: transparent; background: var(--surface-high) !important; border: 1px solid var(--outline); color: var(--on-surface); }
.modal-content.modal-dark .modal-body,.modal-content.modal-dark .modal-footer { background: transparent !important; color: var(--on-surface); }
#localGameModal .modal-content,#localGameModal .modal-header,#localGameModal .modal-body,#localGameModal .modal-footer { background: var(--surface-high) !important; color: var(--on-surface) !important; border-color: var(--outline) !important; }
#localGameModal .form-control,#localGameModal .form-select { background: var(--surface); color: var(--on-surface); border: 1px solid var(--outline); }
#roundLimitModal .modal-content,#roundLimitModal .modal-header,#roundLimitModal .modal-body,#roundLimitModal .modal-footer { background: var(--surface-high) !important; color: var(--on-surface) !important; border-color: var(--outline) !important; }
#roundLimitModal .btn { background: var(--secondary) !important; border: none !important; color: #fff !important; }
#inviteFriendModal .modal-content,
#userStatsModal .modal-content {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: 2px solid rgba(202, 253, 0, 0.45) !important;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(23,26,29,0.98), rgba(29,32,36,0.98)) !important;
}

#inviteFriendModal .modal-header,
#userStatsModal .modal-header {
  background: linear-gradient(180deg, rgba(17,20,23,0.95) 0%, rgba(17,20,23,0.75) 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#inviteFriendModal .modal-title,
#userStatsModal .modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
}

.invite-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.invite-field {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.invite-field-wide {
  grid-column: 1 / -1;
}

.invite-field .form-label {
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  color: var(--on-surface-var) !important;
}

#inviteFriendModal .form-control {
  min-height: 44px;
  border-radius: 10px;
}

.user-stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.user-kpi-card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(32,37,43,0.95), rgba(24,28,33,0.98));
  padding: 12px;
}

.user-kpi-label {
  color: var(--on-surface-var);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 700;
}

.user-kpi-value {
  color: var(--primary-container);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 900;
}

.user-stats-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.user-mini-card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.user-mini-label {
  color: var(--on-surface-var);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 700;
}

.user-mini-value {
  color: var(--on-surface);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  line-height: 1.05;
  font-weight: 800;
}

@media (max-width: 700px) {
  .invite-modal-grid,
  .user-stats-kpi-grid,
  .user-stats-mini-grid {
    grid-template-columns: 1fr;
  }
}
#botModal .modal-dialog {
  max-width: 560px;
}

#botModal .bot-modal-content {
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 2px solid rgba(202,253,0,0.5);
  background: linear-gradient(165deg, rgba(29,32,36,0.98), rgba(20,23,27,0.98));
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(202,253,0,0.05) inset;
}

#botModal .bot-modal-body {
  padding: 18px 20px;
}

#botModal .bot-modal-intro {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(202,253,0,0.09), rgba(255,116,54,0.05));
  padding: 10px 12px;
  margin-bottom: 12px;
}

#botModal .bot-modal-intro-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--on-surface);
}

#botModal .bot-modal-intro-subtitle {
  margin-top: 2px;
  font-size: 0.76rem;
  color: var(--on-surface-var);
}

#botModal .bot-modal-section {
  margin-top: 10px;
}

#botModal .bot-modal-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-surface-var);
  margin-bottom: 6px;
  font-weight: 700;
}

#botModal .bot-inline-label {
  font-size: 0.68rem;
  color: var(--on-surface-var);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

#botModal .bot-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#botModal .bot-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: var(--surface-high);
  color: var(--on-surface);
  padding: 9px 10px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

#botModal .bot-card:hover {
  transform: translateY(-1px);
  border-color: rgba(202,253,0,0.28);
  background: var(--surface-highest);
}

#botModal .bot-card.is-active {
  border-color: rgba(202,253,0,0.42);
  background: linear-gradient(145deg, rgba(202,253,0,0.18), rgba(202,253,0,0.1));
  box-shadow: 0 10px 24px rgba(202,253,0,0.16);
}

#botModal .bot-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

#botModal .bot-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.15;
}

#botModal .bot-card-meta {
  margin-top: 2px;
  font-size: 0.76rem;
  color: var(--on-surface-var);
}

@media (max-width: 560px) {
  #botModal .bot-list-grid {
    grid-template-columns: 1fr;
  }
}
#friendsModal .nav-pills .nav-link { background: rgba(255,255,255,0.04); color: var(--on-surface); border: 1px solid var(--outline); }
#friendsModal .nav-pills .nav-link.active { background: var(--secondary-dim); border-color: rgba(255,116,54,0.4); color: var(--secondary); }
#friendsModal .list-group-item { background: var(--surface-high); border: 1px solid var(--outline); color: var(--on-surface); }
#friendsModal .list-group-item:hover { background: var(--surface-highest); }
#friendsModal .form-control { background: var(--surface); border: 1px solid var(--outline); color: var(--on-surface); }
#friendsModal .form-control:focus { border-color: rgba(202,253,0,0.5); box-shadow: 0 0 0 3px rgba(202,253,0,0.12); }

/* Tournament create modal */
#createTournamentModal .modal-dialog {
  max-width: 680px;
}

#createTournamentModal .tournament-create-modal {
  border: 1px solid rgba(255,255,255,0.09);
  border-top: 2px solid rgba(202,253,0,0.5);
  background: linear-gradient(160deg, rgba(25,29,34,0.98), rgba(17,20,24,0.98)) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,0.52), 0 0 0 1px rgba(202,253,0,0.05) inset;
}

#createTournamentModal .modal-header {
  background: linear-gradient(180deg, rgba(17,20,23,0.95) 0%, rgba(17,20,23,0.78) 100%) !important;
}

#createTournamentModal .modal-title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

#createTournamentModal .modal-body {
  padding: 22px;
}

#createTournamentModal .form-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-surface-var) !important;
  font-weight: 700;
}

#createTournamentModal .form-control,
#createTournamentModal .form-select {
  min-height: 44px;
  border-radius: 10px;
  background: rgba(12,14,17,0.92);
  border-color: rgba(255,255,255,0.1);
}

#createTournamentModal .form-check {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}

#createTournamentModal .btn-cta-orange.w-100 {
  min-height: 46px;
  border-radius: 12px;
  font-weight: 800;
}

/* ─── 15. Hero cards ────────────────────────────────────────────── */
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.hero-card { position: relative; border-radius: 12px; padding: 20px; color: var(--on-surface); background: var(--surface-high); border: 1px solid rgba(255,255,255,0.06); overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-height: 160px; transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.hero-card::after { display: none; }
.hero-card:hover { box-shadow: 0 0 40px rgba(202,253,0,0.10), 0 12px 32px rgba(0,0,0,0.3); border-color: rgba(202,253,0,0.14); }
.hero-card.light { background: var(--surface-high); border: 1px solid rgba(255,255,255,0.07); border-top: 2px solid rgba(202,253,0,0.45); box-shadow: 0 8px 28px rgba(0,0,0,0.25); }
.hero-card.light:hover { border-top-color: rgba(202,253,0,0.7); box-shadow: 0 0 30px rgba(202,253,0,0.10), 0 12px 32px rgba(0,0,0,0.3); }
.hero-card.lime { background: linear-gradient(135deg, #f3ffca 0%, #cafd00 100%); color: #516700; border-color: transparent; box-shadow: 0 20px 40px rgba(202,253,0,0.20); }
.hero-card.accent { background: linear-gradient(145deg, rgba(255,116,54,0.92) 0%, rgba(224,83,42,0.96) 100%); border-color: rgba(255,116,54,0.3); color: #fff; }
.hero-card.warm { background: linear-gradient(145deg, rgba(248,177,51,0.92) 0%, rgba(243,156,18,0.96) 100%); border-color: rgba(248,177,51,0.3); color: #fff; }
.hero-title { font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.9rem; font-family: 'Space Grotesk', sans-serif; }
.hero-sub { margin: 0; opacity: 0.82; font-size: 0.95rem; line-height: 1.4; }
.hero-metric { font-size: 28px; font-weight: 800; display: flex; align-items: baseline; gap: 8px; font-family: 'Space Grotesk', sans-serif; }
.hero-metric small { font-size: 12px; opacity: 0.8; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.pill-btn { border: none; border-radius: 20px; padding: 9px 16px; font-weight: 700; background: rgba(0,0,0,0.35); color: #fff; cursor: pointer; transition: all 0.15s ease; font-family: inherit; font-size: 0.85rem; }
.pill-btn.secondary { background: rgba(255,255,255,0.1); color: var(--on-surface); border: 1px solid rgba(255,255,255,0.15); }
.pill-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }

/* ─── 16. Stat card ─────────────────────────────────────────────── */
.stat-card { background: var(--surface-high); border-radius: 12px; padding: 18px; text-align: center; color: var(--on-surface); border: 1px solid rgba(255,255,255,0.06); }
.stat-value { font-size: 2.3rem; font-weight: 800; margin-bottom: 5px; font-family: 'Space Grotesk', sans-serif; color: var(--primary-container); }
.stat-label { font-size: 0.95rem; color: var(--on-surface-var); }

/* Player stats redesign */
.player-stats-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.player-kpi-card {
  background: linear-gradient(170deg, rgba(35,39,44,0.95), rgba(26,29,33,0.95));
  border: 1px solid rgba(255,116,54,0.24);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.player-kpi-value {
  color: var(--primary-container);
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 900;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 5px;
}
.player-kpi-label {
  color: var(--on-surface-var);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.player-stats-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.player-metric-card {
  background: linear-gradient(165deg, rgba(30,33,37,0.96), rgba(20,23,27,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.player-metric-card h6 {
  margin: 0;
  font-size: 0.82rem;
  color: var(--on-surface-var);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.player-metric-value {
  margin-top: 8px;
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 800;
  color: var(--on-surface);
  font-family: 'Space Grotesk', sans-serif;
}

.player-metric-card[data-container="stats-best"] { border-color: rgba(255,116,54,0.28); }
.player-metric-card[data-container="stats-180"] { border-color: rgba(248,113,113,0.28); }
.player-metric-card[data-container="stats-140"] { border-color: rgba(251,191,36,0.3); }
.player-metric-card[data-container="stats-100"] { border-color: rgba(129,236,255,0.28); }

/* Training stats redesign */
.training-stats-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.training-kpi-card {
  background: linear-gradient(170deg, rgba(35,39,44,0.95), rgba(26,29,33,0.95));
  border: 1px solid rgba(202,253,0,0.2);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.training-kpi-value {
  color: var(--primary-container);
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 900;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 5px;
}
.training-kpi-label {
  color: var(--on-surface-var);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.training-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.training-mode-stat {
  background: linear-gradient(165deg, rgba(30,33,37,0.96), rgba(20,23,27,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
}
.training-mode-stat header {
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.training-mode-stat h6 {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
.training-mode-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.training-mode-metrics div {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.training-mode-metrics span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-surface-var);
  font-weight: 700;
}
.training-mode-metrics strong {
  font-size: 1.08rem;
  color: var(--on-surface);
  font-family: 'Space Grotesk', sans-serif;
}
.training-mode-stat--around { border-color: rgba(129,236,255,0.25); }
.training-mode-stat--doubles { border-color: rgba(255,116,54,0.28); }
.training-mode-stat--checkout { border-color: rgba(202,253,0,0.25); }

@media (max-width: 1100px) {
  .player-stats-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-stats-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .training-stats-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .training-mode-grid { grid-template-columns: 1fr; }
}

/* ─── 17. Tables ────────────────────────────────────────────────── */
.table-dark-modern { background: transparent; color: var(--on-surface); border-color: var(--outline); width: 100%; border-collapse: collapse; }
.table-dark-modern thead,.table-dark-modern thead th { background: var(--surface) !important; color: var(--primary) !important; border-bottom: 1px solid var(--outline) !important; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 10px; }
.table-dark-modern tbody tr { border-color: rgba(255,255,255,0.04) !important; background: rgba(255,255,255,0.02) !important; color: var(--on-surface) !important; transition: background 0.1s; }
.table-dark-modern tbody tr:nth-child(odd) { background: rgba(255,255,255,0.04) !important; }
.table-dark-modern tbody tr:hover { background: rgba(202,253,0,0.04) !important; }
.table-dark-modern tbody tr td,.table-dark-modern tbody tr th { color: var(--on-surface) !important; padding: 10px; border-color: var(--outline) !important; }
.card-dark .table { background: transparent !important; color: var(--on-surface) !important; }
.card-dark .table thead th { background: var(--surface) !important; color: var(--primary) !important; border-color: var(--outline) !important; }
.card-dark .table tbody tr { background: rgba(255,255,255,0.02) !important; color: var(--on-surface) !important; border-color: var(--outline) !important; }
.card-dark .table tbody tr:nth-child(odd) { background: rgba(255,255,255,0.04) !important; }
.card-dark .table tbody td,.card-dark .table tbody th { color: var(--on-surface) !important; border-color: var(--outline) !important; }
.content-section .table.table-striped thead { background: var(--surface); color: var(--primary); border-bottom: 1px solid var(--outline); }
.content-section .table.table-striped tbody tr { background: rgba(255,255,255,0.02); border-color: var(--outline); }
.content-section .table.table-striped tbody tr:nth-child(odd) { background: rgba(255,255,255,0.04); }
.content-section .table.table-striped tbody tr td,.content-section .table.table-striped tbody tr th { color: var(--on-surface); }

/* ─── 18. Lobby / Lob Panel ─────────────────────────────────────── */
.lob-panel { background: var(--surface-high); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; overflow: hidden; }
.lob-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: var(--surface); border-bottom: 1px solid rgba(255,255,255,0.06); gap: 8px; }
.lob-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.lob-tabs::-webkit-scrollbar { display: none; }
.lob-tab { padding: 12px 16px; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--on-surface-var); font-size: 0.83rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: color 0.15s, border-color 0.15s; font-family: inherit; }
.lob-tab:hover { color: var(--on-surface); }
.lob-tab.active { color: var(--secondary); border-bottom-color: var(--secondary); }
.lob-refresh-btn { background: var(--primary-dim); border: 1px solid rgba(202,253,0,0.25); color: var(--primary); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 0.82rem; flex-shrink: 0; transition: background 0.15s; font-family: inherit; }
.lob-refresh-btn:hover { background: rgba(202,253,0,0.18); }
.lob-body { padding: 14px; }
.lob-pane { display: none; }
.lob-pane.active { display: block; }
.lob-empty { text-align: center; color: var(--on-surface-var); padding: 28px 16px; font-size: 0.88rem; }
.lobby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.lobby-card { background: var(--surface-highest); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.lobby-card:hover { border-color: rgba(202,253,0,0.18); transform: translateY(-1px); box-shadow: 0 0 20px rgba(202,253,0,0.07); }
.lobby-card .meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.lobby-card .title { font-weight: 800; color: var(--on-surface); font-size: 1rem; letter-spacing: 0.4px; font-family: 'Space Grotesk', sans-serif; }
.lobby-card .badge { background: rgba(255,255,255,0.07); color: var(--on-surface-var); border-radius: 6px; padding: 2px 8px; font-size: 11px; border: 1px solid rgba(255,255,255,0.06); font-weight: 600; }
.camera-badge { background: var(--danger-dim) !important; color: var(--danger) !important; border-color: rgba(248,113,113,0.35) !important; }
.lobby-card .host { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--on-surface-var); }
.lobby-card .host img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid var(--outline); }
.lobby-card .footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.btn-join { border: none; border-radius: 20px; padding: 7px 16px; font-weight: 700; background: linear-gradient(135deg, #f3ffca 0%, #cafd00 100%); color: #516700; font-size: 0.83rem; cursor: pointer; transition: all 0.15s ease; font-family: inherit; box-shadow: 0 4px 14px rgba(202,253,0,0.25); }
.btn-join:hover { filter: brightness(1.07); transform: translateY(-1px); }
#active-ranked-room .lobby-card,#active-casual-room .lobby-card { border-color: rgba(251,191,36,0.5); background: rgba(251,191,36,0.04); }
#lobby-section .card { background: var(--surface-high); border: 1px solid var(--outline); color: var(--on-surface); }
#lobby-section .nav-tabs { border-bottom: 1px solid var(--outline); }
#lobby-section .nav-tabs .nav-link { background: rgba(255,255,255,0.03); color: var(--on-surface); border: 1px solid var(--outline); border-bottom: none; }
#lobby-section .nav-tabs .nav-link.active { background: var(--secondary-dim); border-color: rgba(255,116,54,0.4); color: var(--secondary); }
#lobby-section .list-group-item { background: var(--surface-high) !important; border: 1px solid var(--outline) !important; color: var(--on-surface) !important; }
#lobby-section .list-group-item:hover { background: var(--surface-highest) !important; }
#lobby-section .list-group-item-warning { background: rgba(251,191,36,0.06) !important; border: 2px solid rgba(251,191,36,0.4) !important; }
#lobby-section .badge { padding: 4px 10px; border-radius: 6px; font-weight: 600; }
#lobby-section .text-muted { color: var(--on-surface-var) !important; }
#tournaments-section .nav-tabs { border-bottom: 1px solid var(--outline); }
#tournaments-section .nav-tabs .nav-link { background: rgba(255,255,255,0.03); color: var(--on-surface); border: 1px solid rgba(255,255,255,0.06); border-bottom: none; }
#tournaments-section .nav-tabs .nav-link.active { background: var(--secondary-dim); border-color: rgba(255,116,54,0.4); color: var(--secondary); }
#tournaments-section .list-group-item { background: var(--surface-high) !important; border: 1px solid rgba(255,255,255,0.06) !important; color: var(--on-surface) !important; }
#tournaments-section .list-group-item:hover { background: var(--surface-highest) !important; }
.tournament-list .btn-primary { background: var(--secondary) !important; border: none !important; color: #fff !important; }

.tournaments-shell {
  padding-top: 18px;
}

.tournaments-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.tournaments-toolbar-copy {
  min-width: 260px;
}

.tournaments-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--on-surface);
}

.tournaments-subtitle {
  font-size: 0.83rem;
  color: var(--on-surface-var);
  max-width: 620px;
}

.tournaments-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tournaments-kpi {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 11px;
  background: linear-gradient(165deg, rgba(30,34,39,0.95), rgba(20,23,27,0.96));
  padding: 11px 12px;
}

.tournaments-kpi-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--on-surface-var);
  font-weight: 700;
}

.tournaments-kpi-value {
  display: block;
  margin-top: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--primary-container);
}

#tournaments-section .nav-tabs {
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

#tournaments-section .nav-tabs .nav-link {
  border-radius: 11px 11px 0 0;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
}

#tournaments-section .tab-content {
  padding-top: 2px;
}

.tournament-list {
  display: grid;
  gap: 10px;
}

.tournament-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(165deg, rgba(30,34,39,0.95), rgba(22,25,30,0.96));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.tournament-item:hover {
  border-color: rgba(202,253,0,0.28);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

.tournament-item-main {
  min-width: 0;
}

.tournament-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--on-surface);
}

.tournament-item-meta {
  margin-top: 6px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.tournament-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: var(--on-surface-var);
}

.tournament-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tournament-empty {
  border: 1px dashed rgba(255,255,255,0.13);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  color: var(--on-surface-var);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.015);
}

@media (max-width: 980px) {
  .tournaments-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tournament-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .tournament-item-actions {
    width: 100%;
  }
  .tournament-item-actions .btn {
    flex: 1;
  }
}

/* ─── 19. Notifications ─────────────────────────────────────────── */
.notification-bell { position: relative; background: none; border: none; color: var(--on-surface); font-size: 1.2rem; cursor: pointer; padding: 8px; border-radius: 50%; transition: background 0.15s; flex-shrink: 0; }
.notification-bell:hover { background: rgba(255,255,255,0.08); }
.notification-badge { position: absolute; top: -3px; right: -3px; background: var(--secondary); color: #fff; border-radius: 10px; padding: 2px 5px; font-size: 0.68rem; font-weight: bold; min-width: 17px; text-align: center; animation: pulseBadge 2s infinite; }
@keyframes pulseBadge { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.notifications-panel { position: fixed; top: 70px; right: 24px; left: auto; margin-left: 0; width: 380px; max-width: calc(100vw - 40px); max-height: calc(100vh - 90px); background: var(--surface-high); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; box-shadow: 0 16px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(202,253,0,0.04); z-index: 2000; display: none; flex-direction: column; overflow: hidden; }
.notifications-panel.show { display: flex; }
.notifications-header { background: var(--surface); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.06); }
.notifications-header h6 { margin: 0; color: var(--on-surface); font-weight: 700; }
.notifications-header .btn-link { padding: 0 8px; color: var(--primary); font-size: 0.85rem; }
.notifications-body { flex: 1; overflow-y: auto; padding: 10px; }
.notification-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 12px; margin-bottom: 8px; cursor: pointer; transition: background 0.15s; }
.notification-item:hover { background: rgba(255,255,255,0.06); }
.notification-item.unread { border-left: 3px solid var(--secondary); background: var(--secondary-dim); }
.notification-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.notification-item-title { font-weight: 700; color: var(--on-surface); font-size: 0.9rem; }
.notification-item-time { font-size: 0.73rem; color: var(--on-surface-var); }
.notification-item-message { color: var(--on-surface-var); font-size: 0.88rem; margin-bottom: 6px; }
.notification-item-actions { display: flex; gap: 8px; margin-top: 8px; }
.notification-item-actions .btn { font-size: 0.82rem; padding: 4px 12px; }

/* ─── 20. Status dots ───────────────────────────────────────────── */
.status-dot { position: absolute; bottom: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); }
.status-online { background: var(--success); animation: pulseOnline 2s infinite; }
.status-offline { background: var(--on-surface-var); }
@keyframes pulseOnline { 0%,100% { box-shadow: 0 0 6px rgba(74,222,128,0.5); } 50% { box-shadow: 0 0 12px rgba(74,222,128,0.8); } }

/* ─── 21. Chat ──────────────────────────────────────────────────── */
.chat-container { display: flex; flex-direction: column; height: 600px; background: var(--surface-high); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-message { display: flex; gap: 12px; animation: slideIn 0.25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-message-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--secondary); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; flex-shrink: 0; background-size: cover; background-position: center; }
.chat-message-content { flex: 1; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 10px 14px; max-width: 70%; }
.chat-message.own-message { flex-direction: row-reverse; }
.chat-message.own-message .chat-message-content { background: var(--secondary-dim); border-color: rgba(255,116,54,0.25); }
.chat-message-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.chat-message-username { font-weight: 700; color: var(--secondary); font-size: 0.88rem; }
.chat-message-time { font-size: 0.73rem; color: var(--on-surface-var); }
.chat-message-text { color: var(--on-surface); word-break: break-word; line-height: 1.4; }
.chat-input-container { display: flex; gap: 10px; padding: 14px; background: var(--surface); border-top: 1px solid var(--outline); }
.chat-input { flex: 1; background: var(--surface-high); border: 1px solid var(--outline); color: var(--on-surface) !important; border-radius: 8px; padding: 10px 14px; font-family: inherit; }
.chat-input:focus { border-color: rgba(202,253,0,0.45); outline: none; }
.private-chat-modal { position: fixed; bottom: 20px; right: 20px; width: 380px; height: 480px; background: var(--surface-high); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; box-shadow: 0 14px 50px rgba(0,0,0,0.5); z-index: 2000; display: none; flex-direction: column; }
.private-chat-modal.active { display: flex; }
.private-chat-header { background: var(--surface); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--outline); }
.private-chat-header h6 { margin: 0; color: var(--on-surface); font-weight: 700; }
.private-chat-close { background: none; border: none; color: var(--on-surface-var); font-size: 1.2rem; cursor: pointer; padding: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.15s; }
.private-chat-close:hover { background: var(--danger-dim); color: var(--danger); }
.game-chat-bubble { position: fixed; bottom: 20px; right: 20px; width: 340px; max-height: 400px; background: var(--surface-high); border: 1px solid rgba(255,116,54,0.4); border-radius: 16px; box-shadow: 0 10px 36px rgba(0,0,0,0.5); z-index: 1000; display: flex; flex-direction: column; overflow: hidden; }
.game-chat-bubble.minimized { height: 56px; max-height: 56px; }
.game-chat-header { background: var(--secondary); padding: 11px 14px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.game-chat-header h6 { margin: 0; color: #fff; font-weight: 700; font-size: 0.88rem; }
.game-chat-toggle { background: none; border: none; color: #fff; font-size: 1rem; cursor: pointer; padding: 0; transition: transform 0.3s; }
.game-chat-bubble.minimized .game-chat-toggle { transform: rotate(180deg); }
.game-chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 240px; }
.game-chat-message { display: flex; gap: 8px; font-size: 0.85rem; }
.game-chat-message-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--secondary); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; font-size: 0.68rem; flex-shrink: 0; }
.game-chat-message-content { flex: 1; background: rgba(255,255,255,0.04); border-radius: 8px; padding: 6px 10px; }
.game-chat-message-username { font-weight: 700; color: var(--secondary); font-size: 0.74rem; margin-bottom: 2px; }
.game-chat-message-text { color: var(--on-surface); line-height: 1.3; }
.game-chat-input-container { padding: 10px; background: var(--surface); border-top: 1px solid var(--outline); display: flex; gap: 8px; }
.game-chat-input { flex: 1; background: var(--surface-high); border: 1px solid var(--outline); color: var(--on-surface) !important; border-radius: 6px; padding: 8px 12px; font-size: 0.85rem; font-family: inherit; }
.game-chat-input:focus { border-color: rgba(202,253,0,0.45); outline: none; }
.game-chat-send { background: var(--secondary); border: none; color: #fff; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 700; transition: filter 0.15s; font-family: inherit; }
.game-chat-send:hover { filter: brightness(1.1); }

/* ─── 22. Premium ───────────────────────────────────────────────── */
.premium-badge { display: inline-block; background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%); color: #000; font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 4px; margin-left: 6px; letter-spacing: 0.5px; box-shadow: 0 2px 8px rgba(255,215,0,0.35); vertical-align: middle; }
.premium-username { background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 800; }
.premium-username-bg { background: rgba(255,215,0,0.12); padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(255,215,0,0.28); }
.premium-avatar-border { border: 2px solid #ffd700 !important; box-shadow: 0 0 14px rgba(255,215,0,0.35) !important; }
.premium-glow { animation: premiumGlow 2s ease-in-out infinite; }
@keyframes premiumGlow { 0%,100% { box-shadow: 0 0 10px rgba(255,215,0,0.25); } 50% { box-shadow: 0 0 22px rgba(255,215,0,0.45); } }

/* ─── 23. Container bg overlay ──────────────────────────────────── */
[data-container-bg="true"] { position: relative; overflow: hidden; }
[data-container-bg="true"]::before { content: ''; position: absolute; inset: 0; background-image: var(--container-bg-url); background-size: cover; background-position: center; opacity: 0.12; z-index: 0; pointer-events: none; }
[data-container-bg="true"] > * { position: relative; z-index: 1; }

/* ─── 24. Training section ──────────────────────────────────────── */
.training-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.training-mode-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 2px solid rgba(202,253,0,0.45);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(23,26,29,0.98) 0%, rgba(29,32,36,0.98) 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.24);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.training-mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(202,253,0,0.2);
  box-shadow: 0 0 28px rgba(202,253,0,0.09), 0 12px 30px rgba(0,0,0,0.28);
}
.training-mode-card--coming {
  border-top-color: rgba(255, 116, 54, 0.4);
}
.tmc-ghost-label {
  position: absolute;
  right: 14px;
  top: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 2.1rem;
  letter-spacing: 0.03em;
  color: rgba(249,249,253,0.08);
  pointer-events: none;
}
.tmc-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-container);
  background: rgba(202,253,0,0.1);
  font-size: 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(202,253,0,0.18);
}
.tmc-icon--orange {
  color: var(--secondary);
  background: rgba(255,116,54,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,116,54,0.24);
}
.tmc-icon--teal {
  color: var(--tertiary);
  background: rgba(129,236,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(129,236,255,0.24);
}
.tmc-icon--amber {
  color: #ffd65a;
  background: rgba(255,214,90,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,214,90,0.24);
}
.tmc-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--on-surface);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tmc-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #3f2a00;
  background: linear-gradient(135deg, #ffe27a 0%, #ffc83d 100%);
}
.tmc-desc {
  color: var(--on-surface-var);
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0;
  min-height: 0;
}
.tmc-usage {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-surface-var);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 9px;
  padding: 7px 10px;
}
.tmc-usage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,116,54,0.12);
  border: 1px solid rgba(255,116,54,0.24);
  color: var(--secondary);
  font-weight: 800;
  letter-spacing: 0;
}
.tmc-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f3ffca 0%, #cafd00 100%);
  color: #516700;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(202,253,0,0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.tmc-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 30px rgba(202,253,0,0.36);
}
.tmc-btn:disabled,
.tmc-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.75;
}
.tmc-btn.tmc-btn--ghost {
  background: rgba(255,255,255,0.05);
  color: var(--on-surface);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: none;
}
.tmc-btn.tmc-btn--ghost:hover {
  filter: none;
  box-shadow: none;
}
.tmc-hint {
  display: block;
  margin-top: 6px;
  color: var(--on-surface-var);
  font-size: 0.74rem;
}

@media (max-width: 1100px) {
  .training-mode-card {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .training-cards-grid {
    grid-template-columns: 1fr;
  }

  .training-mode-card {
    min-height: 0;
  }
}

.training-usage { padding: 8px; background: rgba(255,255,255,0.03); border-radius: 8px; border: 1px solid rgba(255,255,255,0.06); }
.training-history { max-height: 200px; overflow-y: auto; padding: 10px; background: rgba(255,255,255,0.02); border-radius: 8px; border: 1px solid var(--outline); }
.training-history::-webkit-scrollbar { width: 5px; }
.training-history::-webkit-scrollbar-thumb { background: rgba(202,253,0,0.35); border-radius: 3px; }
.training-history::-webkit-scrollbar-thumb:hover { background: rgba(202,253,0,0.55); }
#training-feedback-panel { animation: slideInUp 0.4s ease; }
@keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
#training-game-ui { animation: fadeIn 0.3s ease; }

/* ─── 24B. Unified menu tiles ───────────────────────────────────── */
#playonline-section .hero-card,
#lobby-section .hero-card,
#training-section .hero-card,
#playlocal-section .card.card-dark,
#tournaments-section .card.card-dark,
#leaderboard-section .card.card-dark,
#stats-section .card.card-dark,
#friends-section .card.card-dark {
  background: linear-gradient(135deg, rgba(23,26,29,0.98) 0%, rgba(29,32,36,0.98) 100%) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-top: 2px solid rgba(202,253,0,0.45) !important;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#playonline-section .hero-card:hover,
#lobby-section .hero-card:hover,
#training-section .hero-card:hover,
#playlocal-section .card.card-dark:hover,
#tournaments-section .card.card-dark:hover,
#leaderboard-section .card.card-dark:hover,
#stats-section .card.card-dark:hover,
#friends-section .card.card-dark:hover {
  transform: translateY(-2px);
  border-color: rgba(202,253,0,0.2) !important;
  box-shadow: 0 0 30px rgba(202,253,0,0.09), 0 12px 30px rgba(0,0,0,0.28);
}

#playonline-section .hero-card.accent,
#playonline-section .hero-card.warm,
#lobby-section .hero-card.accent,
#lobby-section .hero-card.warm,
#training-section .hero-card.accent {
  color: var(--on-surface) !important;
}

#playonline-section .hero-card.accent,
#lobby-section .hero-card.accent,
#training-section .hero-card.accent {
  border-top-color: rgba(255,116,54,0.55) !important;
}

#playonline-section .hero-card.warm,
#lobby-section .hero-card.warm {
  border-top-color: rgba(129,236,255,0.55) !important;
}

#playonline-section .hero-card.accent .hero-title,
#lobby-section .hero-card.accent .hero-title,
#training-section .hero-card.accent .hero-title {
  color: var(--secondary);
}

#playonline-section .hero-card.warm .hero-title,
#lobby-section .hero-card.warm .hero-title {
  color: var(--tertiary);
}

#playonline-section .hero-grid,
#lobby-section .hero-grid,
#training-section .hero-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

/* Play online redesign */
.playonline-layout {
  display: grid;
  grid-template-columns: 1.1fr 1.05fr 0.9fr;
  gap: 14px;
}

.playonline-card {
  background: linear-gradient(135deg, rgba(23,26,29,0.98) 0%, rgba(29,32,36,0.98) 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 2px solid rgba(202,253,0,0.45);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.24);
  padding: 18px;
}

.playonline-card-title {
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.playonline-card-title-accent { color: var(--secondary); }
.playonline-card-title-tertiary { color: var(--tertiary); }

.playonline-card-sub {
  margin: 0 0 14px;
  color: var(--on-surface-var);
  line-height: 1.45;
  font-size: 0.9rem;
}

.playonline-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.playonline-actions-grid .action-wide {
  grid-column: 1 / -1;
}

.playonline-actions-grid .btn,
.playonline-lobby-btn {
  width: 100%;
  justify-content: center;
}

.playonline-stats-table {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.playonline-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}

.playonline-stats-row span {
  color: var(--on-surface-var);
  font-size: 0.86rem;
}

.playonline-stats-row strong {
  color: var(--primary-container);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.playonline-friends {
  display: flex;
  flex-direction: column;
}

.playonline-friends-metric {
  margin: 8px 0 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.playonline-friends-metric span {
  color: var(--primary-container);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 900;
}

.playonline-friends-metric small {
  color: var(--on-surface-var);
  font-size: 0.82rem;
}

.playonline-friends .btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

#playonline-section .hero-metric,
#lobby-section .hero-metric,
#training-section .hero-metric {
  font-size: 2rem;
}

#playonline-section .hero-metric small,
#lobby-section .hero-metric small,
#training-section .hero-metric small {
  color: var(--on-surface-var);
}

#playlocal-section .card .card-body {
  background: transparent;
}

#playlocal-section .card .card-body.d-flex {
  gap: 14px;
}

#playlocal-section .card .card-body .btn,
#playonline-section .hero-actions .btn,
#lobby-section .hero-actions .btn {
  border-radius: 10px;
}

#tournaments-section .card-header,
#leaderboard-section .card-header,
#stats-section .card-header,
#friends-section .card-header,
#playlocal-section .card-header {
  background: linear-gradient(180deg, rgba(17,20,23,0.95) 0%, rgba(17,20,23,0.7) 100%) !important;
  color: var(--on-surface) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

#tournaments-section .nav-tabs,
#lobby-section .nav-tabs {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

#tournaments-section .nav-tabs .nav-link,
#lobby-section .nav-tabs .nav-link {
  border-radius: 9px 9px 0 0;
}

/* Friends section redesign */
#friends-section .friends-shell {
  padding-top: 6px;
}

#friends-section .friends-tabs {
  list-style: none;
  margin: 0 0 12px;
  padding-left: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 8px;
}

#friends-section .friends-tabs .nav-item {
  margin: 0;
}

#friends-section .friends-tabs .nav-link {
  border-radius: 10px 10px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--on-surface-var);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 14px;
}

#friends-section .friends-tabs .nav-link.active {
  color: #2f3e00;
  background: linear-gradient(135deg, #f3ffca 0%, #cafd00 100%);
  border-color: rgba(202, 253, 0, 0.35);
}

#friends-section .friends-tab-content {
  padding-top: 4px;
}

#friends-section .friends-search-wrap {
  margin-bottom: 12px;
}

#friends-search-input {
  border-radius: 10px;
  min-height: 44px;
}

.friends-state {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  text-align: center;
  color: var(--on-surface-var);
  padding: 16px;
  font-weight: 600;
}

.friends-state i {
  margin-right: 8px;
}

.friends-state.is-error {
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--danger);
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(12, 28, 42, 0.95) 0%, rgba(13, 38, 58, 0.85) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  margin-bottom: 10px;
}

.friend-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.friend-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.friend-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.friend-meta {
  min-width: 0;
}

.friend-name {
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--on-surface);
}

.friend-sub {
  color: var(--on-surface-var);
  font-size: 0.82rem;
}

.friend-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.friend-status-badge.is-online {
  color: #0d3a20;
  background: rgba(74, 222, 128, 0.85);
}

.friend-status-badge.is-offline {
  color: #b9c0c7;
  background: rgba(148, 163, 184, 0.2);
}

.friend-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.friend-actions-wide {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.friend-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  min-width: 42px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.friend-action-btn:hover {
  transform: translateY(-1px);
}

.friend-action-btn.action-chat {
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
}

.friend-action-btn.action-stats {
  background: rgba(74, 222, 128, 0.9);
  color: #0f3220;
}

.friend-action-btn.action-invite,
.friend-action-btn.action-add {
  background: linear-gradient(135deg, #f3ffca 0%, #cafd00 100%);
  color: #516700;
  border-color: rgba(202, 253, 0, 0.45);
}

.friend-action-btn.action-remove,
.friend-action-btn.action-reject {
  background: rgba(248, 113, 113, 0.92);
  color: #fff;
  border-color: rgba(248, 113, 113, 0.5);
}

.friend-action-btn.action-accept {
  background: rgba(74, 222, 128, 0.92);
  color: #062914;
  border-color: rgba(74, 222, 128, 0.5);
}

.friend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.friend-pill.is-success {
  background: rgba(74, 222, 128, 0.18);
  color: var(--success);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.friend-pill.is-warning {
  background: rgba(251, 191, 36, 0.16);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.friend-pill.is-info {
  background: rgba(129, 236, 255, 0.14);
  color: var(--tertiary);
  border: 1px solid rgba(129, 236, 255, 0.35);
}

@media (max-width: 880px) {
  .friend-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .friend-actions {

@media (max-width: 1100px) {
  .playonline-layout {
    grid-template-columns: 1fr;
  }

  .playonline-actions-grid {
    grid-template-columns: 1fr;
  }

  .playonline-actions-grid .action-wide {
    grid-column: auto;
  }
}
    width: 100%;
    justify-content: flex-start;
  }

  .friend-action-btn.action-add,
  .friend-action-btn.action-accept,
  .friend-action-btn.action-reject {
    flex: 1 1 auto;
    min-width: 132px;
  }
}

/* ─── 24C. Leaderboard premium podium ─────────────────────────── */
#leaderboard-section .card-header h5 i {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251,191,36,0.4);
}

.lb-podium-wrap {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(202,253,0,0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% -10%, rgba(251,191,36,0.22), transparent 58%),
    linear-gradient(160deg, rgba(11,16,24,0.96), rgba(21,30,40,0.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.28);
}

.lb-podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  gap: 12px;
  align-items: end;
}

.lb-place {
  position: relative;
  text-align: center;
  padding: 12px 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(202,253,0,0.12);
  background: linear-gradient(180deg, rgba(26,32,41,0.92), rgba(15,21,29,0.92));
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
}

.lb-place--1 {
  min-height: 238px;
  transform: translateY(-10px);
  border-color: rgba(251,191,36,0.5);
  box-shadow: 0 0 28px rgba(251,191,36,0.2), 0 14px 26px rgba(0,0,0,0.35);
}

.lb-place--2 {
  min-height: 206px;
  border-color: rgba(192,197,206,0.35);
}

.lb-place--3 {
  min-height: 184px;
  border-color: rgba(255,146,43,0.35);
}

.lb-place-cup {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.lb-place--1 .lb-place-cup { color: #fbbf24; text-shadow: 0 0 14px rgba(251,191,36,0.6); }
.lb-place--2 .lb-place-cup { color: #d1d5db; }
.lb-place--3 .lb-place-cup { color: #fb923c; }

.lb-place-rank {
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  color: #a3a6ad;
  margin-bottom: 8px;
}

.lb-place-avatar {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(202,253,0,0.35);
  box-shadow: 0 0 0 2px rgba(11,16,24,0.8), 0 0 18px rgba(202,253,0,0.25);
}

.lb-place-name {
  margin-top: 8px;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-place-metrics {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #cad4df;
}

.lb-podium-empty {
  padding: 12px;
  text-align: center;
  color: #a3a6ad;
  font-weight: 600;
}

.lb-overall-note {
  margin-bottom: 12px;
  font-size: 0.86rem;
  color: #cbd5e1;
  opacity: 0.9;
}

.lb-podium-empty i {
  margin-right: 6px;
  color: #fbbf24;
}

.lb-podium-empty--error,
.lb-podium-empty--error i {
  color: #f87171;
}

.leaderboard-table tbody tr {
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.leaderboard-table tbody tr:hover {
  background: rgba(202,253,0,0.06) !important;
  box-shadow: inset 0 0 0 1px rgba(202,253,0,0.2);
}

.lb-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-weight: 800;
  color: #c8ccd3;
  gap: 5px;
}

.lb-rank--1 {
  border-color: rgba(251,191,36,0.55);
  color: #fbbf24;
  background: rgba(251,191,36,0.1);
  box-shadow: 0 0 12px rgba(251,191,36,0.2);
}

.lb-rank--2 {
  border-color: rgba(209,213,219,0.45);
  color: #e5e7eb;
  background: rgba(209,213,219,0.08);
}

.lb-rank--3 {
  border-color: rgba(251,146,60,0.5);
  color: #fb923c;
  background: rgba(251,146,60,0.1);
}

@media (max-width: 768px) {
  .lb-podium-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .lb-place--1 {
    transform: none;
  }
}

/* ─── 25. Misc ──────────────────────────────────────────────────── */
body::before { display: none; }
.badge-password { background: var(--warning); color: #000; }
.badge-ranking { background: var(--success); color: #052e0a; }
.room-item { transition: all 0.2s; }
.room-item:hover { transform: translateX(5px); }

/* ─── 26. Responsive ────────────────────────────────────────────── */
@media (max-width: 1199px) { .app-sidebar-column { width: 220px; min-width: 220px; } .home-stats-row { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 991px) {
  .app-sidebar-column { position: fixed; inset: 0 auto 0 0; z-index: 120; width: min(88vw, 280px); min-width: unset; transform: translateX(-105%); transition: transform 0.28s ease; }
  #app-container.nav-open .app-sidebar-column { transform: translateX(0); }
  #app-container.nav-open .mobile-nav-overlay { opacity: 1; pointer-events: auto; }
  .sidebar-card { position: relative; top: 0; height: 100vh; min-height: 100vh; overflow-y: auto; border-radius: 0; }
  .sidebar-mobile-head { display: flex !important; }
  .topbar-menu-btn { display: flex !important; }
  .notifications-panel { top: 70px; right: 10px; left: 10px; width: auto; max-width: none; }
}

@media (max-width: 768px) {
  #app-container .row { margin-left: 0; margin-right: 0; }
  .main-content { padding: 16px; }
  .home-stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .home-actions-grid { grid-template-columns: 1fr; }
  .app-topbar { padding: 0 12px; gap: 8px; }
  .topbar-user-pill { padding-right: 8px; }
  .topbar-uname { max-width: 100px; }
  .chat-container { height: 480px; }
  .private-chat-modal { width: calc(100% - 20px); right: 10px; left: 10px; }
  .game-chat-bubble { width: calc(100% - 20px); right: 10px; left: 10px; }
  #playlocal-section .card .card-body.d-flex { flex-direction: column; align-items: flex-start !important; }
  #playonline-section .hero-actions .btn,
  #lobby-section .hero-actions .btn { width: 100%; }
}

@media (max-width: 576px) {
  .home-stats-row { grid-template-columns: 1fr 1fr; }
  .hstat-value { font-size: 1.2rem; }
  .main-content { padding: 12px; }
  .topbar-uname { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
}
