/* =============================================
   CS2M TRACKER — tracker.css  v2
   Full mobile-first, single source of truth.
   ============================================= */

/* --- Variables --- */
:root {
  --bg:        #060914;
  --bg2:       #0a0d1a;
  --bg3:       #0e1220;
  --surface:   #111827;
  --surface2:  #1a2235;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.13);
  --text:      #f0f4ff;
  --muted:     #8b96b4;
  --dim:       #4d5a7c;
  --blue:      #3b82f6;
  --blue-glow: rgba(59,130,246,0.25);
  --cyan:      #67e8f9;
  --green:     #4ade80;
  --red:       #f87171;
  --gold:      #facc15;
  --radius:    10px;
  --radius-sm: 6px;
  --transition: 0.18s ease;
  --header-h:  64px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; }
img { display: block; max-width: 100%; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(6,9,20,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 201;
}
.site-logo span { color: var(--text); }
.site-logo em { color: var(--blue); font-style: normal; font-size: 13px; letter-spacing: 0.08em; }

/* Desktop nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.nav-active { color: white; background: rgba(255,255,255,0.07); }

/* Auth controls */
.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.user-pill:hover, .user-pill.nav-active { border-color: var(--blue); }
.user-pill img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

.btn-login {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: var(--transition);
}
.btn-login:hover { color: var(--text); border-color: var(--blue); }

.btn-steam {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  font-size: 13px;
  font-weight: 700;
  color: white;
  transition: var(--transition);
  box-shadow: 0 0 24px var(--blue-glow);
  white-space: nowrap;
}
.btn-steam:hover { background: #2563eb; transform: translateY(-1px); }

.btn-logout {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  opacity: 0.7;
  transition: var(--transition);
}
.btn-logout:hover { opacity: 1; }

/* =============================================
   HAMBURGER BUTTON
   ============================================= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  /* Always on the far right, inside header-auth */
  margin-left: 4px;
}
.hamburger:hover { border-color: var(--border2); background: var(--surface2); }
.hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   MOBILE NAV OVERLAY
   ============================================= */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  z-index: 199;
  background: rgba(6,9,20,0.98);
  backdrop-filter: blur(20px);
  padding: 24px 20px 40px;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid transparent;
  transition: var(--transition);
}
.mobile-nav-link:hover, .mobile-nav-link.nav-active {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}
.mobile-nav-link.nav-active { color: white; border-color: var(--blue); }

.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.mobile-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.mobile-user-card img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.mobile-user-info strong { display: block; font-size: 15px; font-weight: 700; }
.mobile-user-info span { font-size: 12px; color: var(--green); }

/* =============================================
   MAIN & FOOTER
   ============================================= */
.site-main {
  min-height: calc(100vh - var(--header-h) - 80px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.site-footer {
  border-top: 1px solid var(--border);
  height: 80px;
  display: flex;
  align-items: center;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}
.footer-inner p { color: var(--dim); font-size: 13px; }
.site-logo-sm { font-size: 14px; font-weight: 900; letter-spacing: -0.02em; white-space: nowrap; }
.site-logo-sm span { color: var(--text); }
.site-logo-sm em { color: var(--blue); font-style: normal; font-size: 11px; }

/* =============================================
   FLASH MESSAGES
   ============================================= */
.flash {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
.flash-error   { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.25); color: var(--red); }
.flash-success { background: rgba(74,222,128,0.08);  border: 1px solid rgba(74,222,128,0.25);  color: var(--green); }

/* =============================================
   PAGE HERO
   ============================================= */
.page-hero { margin-bottom: 28px; }
.page-hero h1 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.page-hero p { color: var(--muted); font-size: 15px; max-width: 600px; }
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--blue);
  margin-bottom: 8px;
}

/* =============================================
   CARDS / PANELS
   ============================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.card-header h2 { font-size: 15px; font-weight: 700; }
.card-header a  { font-size: 13px; font-weight: 600; color: var(--blue); white-space: nowrap; }
.card-body { padding: 18px; }

/* =============================================
   STAT BOXES
   ============================================= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), transparent);
}
.stat-box label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat-box .value {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-box.kd .value { color: var(--cyan); }
.stat-box.wins .value { color: var(--green); }

/* =============================================
   MATCH TABLE
   ============================================= */
.match-list { display: grid; gap: 6px; }
.match-row {
  display: grid;
  grid-template-columns: 38px 1fr 80px 80px 110px 76px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
}
.match-row:hover { border-color: var(--border2); background: var(--surface2); }
.match-row .map-thumb {
  width: 38px; height: 38px;
  border-radius: 4px; object-fit: cover;
  background: var(--bg3);
}
.match-row .map-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row .score { font-weight: 800; font-size: 15px; }
.match-row .kda { color: var(--muted); font-size: 13px; }
.match-row .result-win  { color: var(--green); font-weight: 700; }
.match-row .result-loss { color: var(--red);   font-weight: 700; }
.match-row .result-draw { color: var(--gold);  font-weight: 700; }
.match-row .date { color: var(--dim); font-size: 12px; }
.match-row .btn-view {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.18);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}
.match-row .btn-view:hover { background: rgba(59,130,246,0.18); }

.table-header { display: grid; gap: 10px; padding: 0 14px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); }
.match-table-header { grid-template-columns: 38px 1fr 80px 80px 110px 76px; }

/* =============================================
   PROFILE PAGE
   ============================================= */
.profile-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
.profile-sidebar { position: sticky; top: calc(var(--header-h) + 16px); }

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.profile-card-banner {
  height: 72px;
  background: linear-gradient(135deg, #1d2f6f 0%, #0a1535 100%);
}
.profile-card-avatar {
  margin: -36px auto 0;
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  object-fit: cover;
  display: block;
}
.profile-card-body { padding: 10px 18px 18px; text-align: center; }
.profile-card-body h1 { font-size: 18px; font-weight: 800; margin: 8px 0 4px; }
.steam-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.2);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  margin: 4px 0 10px;
}
.steamid-text { font-size: 10px; color: var(--dim); margin-bottom: 14px; word-break: break-all; }
.profile-divider { height: 1px; background: var(--border); margin: 12px 0; }
.tracker-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 8px; text-align: left; }

.tracker-status-active {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border-radius: var(--radius-sm);
  background: rgba(74,222,128,0.06); border: 1px solid rgba(74,222,128,0.15);
  color: var(--green); font-size: 13px; font-weight: 700; margin-bottom: 8px;
}
.tracker-status-inactive {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: 8px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); position: relative; flex-shrink: 0;
}
.pulse-dot::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: var(--green); opacity: 0.4; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.6); opacity: 0; } }

.btn-setup {
  display: block; width: 100%; padding: 9px;
  border-radius: var(--radius-sm); background: var(--surface2);
  border: 1px solid var(--border); font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: var(--transition); text-align: center;
}
.btn-setup:hover { color: var(--text); border-color: var(--blue); }

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state svg { margin: 0 auto 16px; opacity: 0.3; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; line-height: 1.7; max-width: 380px; margin: 0 auto; }

.empty-state-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.empty-state-hints span {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =============================================
   ALERT BANNER
   ============================================= */
.alert-banner {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 16px 18px; border-radius: var(--radius); margin-bottom: 20px;
  flex-wrap: wrap;
}
.alert-banner.info { background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.18); }
.alert-banner h3 { font-size: 14px; font-weight: 700; color: var(--blue); }
.alert-banner p  { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

.auth-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.auth-help-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

.auth-help-card img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-help-card-body {
  padding: 12px 13px 14px;
}

.auth-help-card-body h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.auth-help-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.tracker-setup-shell {
  max-width: 920px;
  margin: 0 auto;
}

.tracker-setup-card {
  padding: 20px;
}

.tracker-intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(59,130,246,0.08), rgba(255,255,255,0.015));
}

.tracker-intro-panel h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.tracker-intro-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.tracker-fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tracker-fact {
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  text-align: center;
}

.tracker-fact strong {
  display: block;
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
}

.tracker-fact span {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tracker-alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.tracker-alert--error {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
}

.tracker-alert--success {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.22);
  color: #86efac;
}

.tracker-step-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.015);
}

.tracker-step-card--center {
  align-items: center;
}

.tracker-step-card h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.tracker-step-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.tracker-step-index {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(59,130,246,0.12);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.22);
  font-size: 16px;
  font-weight: 900;
}

.tracker-steps {
  display: grid;
  gap: 12px;
}

.tracker-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.015);
}

.tracker-user-card img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.tracker-user-card strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.tracker-user-card span {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font-size: 12px;
}

.tracker-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tracker-login-btn img {
  display: block;
  height: 40px;
}

.tracker-form {
  display: grid;
  gap: 10px;
}

.tracker-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.tracker-input-wrap {
  position: relative;
}

.tracker-input-icon {
  position: absolute;
  inset: 0 auto 0 12px;
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 14px;
}

.tracker-input-wrap input,
.tracker-input-block input {
  width: 100%;
  padding: 12px 14px 12px 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tracker-input-wrap input:focus,
.tracker-input-block input:focus {
  outline: none;
  border-color: var(--blue);
}

.tracker-input-block {
  margin-top: 2px;
}

.tracker-input-block label {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tracker-input-block input {
  padding-left: 14px;
}

.tracker-form-note {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.6;
}

.tracker-mini-note {
  margin: 6px 0 0;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.6;
}

.tracker-help-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.tracker-help-strip-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}

.tracker-help-strip-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.tracker-help-strip-item span {
  display: block;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.6;
}

.tracking-status-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.015);
}

.tracking-status-copy {
  min-width: 0;
}

.tracking-status-label {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tracking-status-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.tracking-status-copy p {
  margin: 0;
  max-width: 660px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.tracking-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.tracking-status-link {
  text-decoration: none;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  background: var(--blue); color: white;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: var(--transition); border: none;
  white-space: nowrap;
}
.btn-primary:hover { background: #2563eb; transform: translateY(-1px); }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 14px; padding: 28px 28px 24px; width: 100%; max-width: 480px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(.96) translateY(8px); } }
.modal-box h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.modal-box p  { font-size: 13px; color: var(--muted); margin-bottom: 22px; line-height: 1.7; }
.modal-box label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.auth-modal-figure {
  margin: 0 0 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.015);
}
.auth-modal-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.auth-modal-figure figcaption {
  padding: 10px 12px 12px;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.5;
}
.modal-box input[type=text] {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text); font-size: 14px; font-weight: 700;
  letter-spacing: 0.06em; margin-bottom: 16px; transition: var(--transition);
}
.modal-box input[type=text]:focus { border-color: var(--blue); }
.modal-row { display: flex; gap: 10px; justify-content: flex-end; }
.btn-cancel {
  padding: 9px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn-cancel:hover { border-color: var(--border2); color: var(--text); }
.modal-box a { color: var(--blue); text-decoration: underline; }

/* =============================================
   HOME PAGE GRID
   ============================================= */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
.home-sidebar { display: grid; gap: 20px; align-content: start; }

/* =============================================
   LEADERBOARD — CHART
   ============================================= */
.lb-hero-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.lb-hero-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.lb-hero-head h2 {
  margin-top: 2px;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.lb-hero-head p {
  margin-top: 6px;
  max-width: 700px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.lb-hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lb-mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.lb-summary-card {
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.022), rgba(255,255,255,0.012));
}

.lb-summary-card span {
  display: block;
  color: var(--dim);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lb-summary-card strong {
  display: block;
  margin-top: 7px;
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.lb-summary-card:nth-child(2) strong { color: var(--green); }
.lb-summary-card:nth-child(3) strong { color: var(--cyan); }
.lb-summary-card:nth-child(4) strong { color: var(--gold); }

.lb-chart-wrap {
  padding: 22px 20px;
  background: rgba(30, 34, 45, 0.4);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 20px;
}

.lb-chart-wrap--live {
  padding: 16px;
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.015);
}
.lb-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.lb-chart-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin: 0;
}
.lb-chart-sub {
  font-size: 12px;
  color: var(--dim);
}
.lb-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 176px;
  padding-bottom: 6px;
}
.lb-chart-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lb-chart-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lb-chart-column {
  display: grid;
  align-items: end;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.lb-chart-count {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}
.lb-chart-count.is-zero {
  opacity: 0.6;
}
.lb-chart-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 132px;
  padding: 6px 6px 0;
  border: 1px solid var(--border);
  border-radius: 12px 12px 8px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0.025));
}
.lb-chart-track span {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 0 18px rgba(59,130,246,0.08);
}
.lb-chart-range {
  color: var(--dim);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}
.lb-chart-foot {
  margin-top: 10px;
  color: var(--dim);
  font-size: 11px;
}
.lb-chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--dim);
  margin-top: 7px;
}

/* =============================================
   LEADERBOARD — TABLE (DESKTOP)
   ============================================= */
.lb-table-wrap { display: block; }
.lb-cards-wrap { display: none; }

.lb-row, .lb-header {
  display: grid;
  grid-template-columns: 44px 1fr 100px 90px 90px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}
.lb-header-grid,
.lb-row-grid {
  grid-template-columns: 44px minmax(0, 1.4fr) 96px 88px 88px 72px 132px 92px;
}
.lb-table-card {
  overflow: hidden;
}
.lb-header {
  height: 40px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim);
  border-bottom: 1px solid var(--border);
}
.lb-row {
  height: 56px; border-bottom: 1px solid var(--border);
  font-size: 14px; transition: var(--transition); cursor: default;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: color-mix(in srgb, var(--surface2) 64%, transparent); }
.lb-row-grid { cursor: pointer; }
.lb-row--top {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.035) 0%, transparent 36%);
}
.lb-row--top:hover {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.055) 0%, color-mix(in srgb, var(--surface2) 62%, transparent) 36%);
}
.lb-row .rank-num { font-size: 13px; font-weight: 800; color: var(--dim); }
.lb-row .rank-num.top { color: var(--gold); }
.player-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-cell img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border2); box-shadow: 0 0 0 1px rgba(0,0,0,0.14) inset; }
.player-cell strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-tracked-yes { color: var(--green); font-weight: 700; }
.lb-tracked-no  { color: var(--dim); }
.lb-score-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.lb-score-label::after {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0%, rgba(250, 204, 21, 0.35) 65%, transparent 70%);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.28);
  content: '';
}
.lb-score-cell {
  display: flex;
  justify-content: flex-end;
}
.lb-score-cell .cs2rating {
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.08));
  transition: transform var(--transition), filter var(--transition);
}
.lb-row:hover .lb-score-cell .cs2rating {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 12px rgba(74, 222, 128, 0.14));
}

/* =============================================
   LEADERBOARD — MOBILE CARDS
   ============================================= */
.lb-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.lb-card:last-child { border-bottom: none; }
.lb-card:hover { background: var(--surface2); }
.lb-card--top {
  background: linear-gradient(90deg, rgba(234,179,8,0.04) 0%, transparent 70%);
}
.lb-card-rank {
  min-width: 28px;
  font-size: 13px;
  font-weight: 900;
  color: var(--dim);
  text-align: center;
  flex-shrink: 0;
}
.lb-card-rank--top { color: var(--gold); }
.lb-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border2);
}
.lb-card-info {
  flex: 1;
  min-width: 0;
}
.lb-card-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  text-decoration: none;
}
.lb-card-name:hover { color: var(--blue); }
.lb-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.lb-card-dot { color: var(--border2); }
.lb-card-tracked {
  color: var(--green);
  font-weight: 700;
  font-size: 11px;
}
.lb-card-rating {
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.08));
}

/* =============================================
   LEADERBOARD — PAGINATION
   ============================================= */
.lb-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 18px 14px;
  border-top: 1px solid var(--border);
}
.lb-page-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: var(--transition);
  text-decoration: none;
  min-width: 34px;
  justify-content: center;
}
.lb-page-btn:hover { border-color: var(--blue); color: var(--blue); }
.lb-page-btn--active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  font-weight: 700;
}
.lb-page-btn--active:hover { color: white; }
.lb-page-ellipsis {
  color: var(--dim);
  padding: 0 4px;
  font-size: 13px;
}

/* =============================================
   LOGIN / REGISTER
   ============================================= */
.auth-wrap { max-width: 420px; margin: 32px auto 0; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.auth-card-top { padding: 28px 28px 0; text-align: center; }
.auth-card-top h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.auth-card-top p  { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin: 18px 0; padding: 0 28px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-form { padding: 0 28px 28px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text); font-size: 14px; transition: var(--transition);
}
.form-input:focus { border-color: var(--blue); }
.auth-link { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }
.auth-link a { color: var(--blue); font-weight: 600; }
.btn-steam-lg {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: calc(100% - 56px); margin: 0 28px 18px; padding: 12px;
  border-radius: var(--radius-sm); background: #1b2838;
  border: 1px solid rgba(255,255,255,0.08); color: white;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: var(--transition);
}
.btn-steam-lg:hover { background: #233652; border-color: rgba(255,255,255,0.15); }

/* =============================================
   MATCH DETAIL
   ============================================= */
.match-hero {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
.scoreboard { margin-bottom: 16px; }
.scoreboard-header, .scoreboard-row {
  display: grid;
  grid-template-columns: 1fr 80px 52px 52px 52px 64px;
  align-items: center; gap: 8px; padding: 0 14px;
}
.scoreboard-header {
  height: 38px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim);
  border-bottom: 1px solid var(--border);
}
.scoreboard-row { height: 50px; border-bottom: 1px solid var(--border); font-size: 14px; transition: var(--transition); }
.scoreboard-row:last-child { border-bottom: none; }
.scoreboard-row:hover { background: var(--surface2); }
.player-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-info img { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.player-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }

/* =============================================
   PROFILE MATCH HISTORY
   ============================================= */
.profile-match-table {
  display: grid;
  gap: 6px;
}

.profile-match-head,
.profile-match-row {
  display: grid;
  grid-template-columns: 86px 132px minmax(160px, 1fr) 94px minmax(160px, 1fr) 58px 58px 58px 90px 30px;
  align-items: center;
  gap: 10px;
}

.profile-match-head {
  min-height: 28px;
  padding: 0 14px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.profile-match-row {
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.profile-match-row:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.09);
}

.profile-match-row.is-win {
  box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.85);
}

.profile-match-row.is-loss {
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.85);
}

.profile-match-row.is-draw {
  box-shadow: inset 3px 0 0 rgba(148, 163, 184, 0.7);
}

.profile-match-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.profile-match-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 14px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #f8fafc;
  opacity: 0.95;
}

.match-map-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 0 8px 0 7px;
  min-height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
}

.match-map-chip img {
  width: 13px;
  height: 13px;
  object-fit: contain;
  flex-shrink: 0;
}

.match-map-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-match-date {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-match-date span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.profile-match-date small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
}

.profile-match-team {
  min-width: 0;
}

.match-avatar-stack {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.match-avatar-chip,
.match-avatar-empty {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #101522;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-left: -5px;
  flex-shrink: 0;
}

.match-avatar-chip:first-child,
.match-avatar-empty:first-child {
  margin-left: 0;
}

.match-avatar-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.match-avatar-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  background: linear-gradient(135deg, #334155, #0f172a);
}

.match-avatar-empty {
  margin-left: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 900;
}

.match-avatar-chip.is-fallback .match-avatar-fallback,
.match-avatar-chip img[style*="display: none"] + .match-avatar-fallback {
  display: flex;
}

.profile-match-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.01em;
}

.score-green { color: var(--green); }
.score-red   { color: var(--red); }
.score-dim   { color: var(--muted); }
.score-separator { color: var(--dim); font-weight: 700; }

.profile-match-stat {
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.profile-match-stat span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.profile-match-stat strong {
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
}

.profile-match-rating small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.profile-match-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

/* =============================================
   MATCHES LIST
   ============================================= */
.matches-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
}

.matches-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.matches-toolbar-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matches-card {
  overflow: hidden;
}

.matches-list-shell {
  display: grid;
}

.matches-list-head,
.matches-row {
  display: grid;
  grid-template-columns: 116px 106px minmax(124px, 1fr) 58px minmax(124px, 1fr) 92px 24px;
  align-items: center;
  column-gap: 7px;
}

.matches-list-head {
  min-height: 32px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  color: var(--dim);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  justify-items: center;
  text-align: center;
  text-transform: uppercase;
}

.matches-list-body {
  display: grid;
}

.matches-row {
  position: relative;
  min-height: 50px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition);
  justify-items: center;
  text-align: center;
}

.matches-row:last-child {
  border-bottom: 0;
}

.matches-row::before {
  position: absolute;
  inset: 7px auto 7px 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--dim);
  content: '';
}

.matches-row.is-team1::before {
  background: var(--green);
}

.matches-row.is-team2::before {
  background: var(--red);
}

.matches-row.is-draw::before {
  background: var(--dim);
}

.matches-row:hover {
  background: color-mix(in srgb, var(--surface2) 52%, transparent);
  box-shadow: inset 0 0 0 1px var(--border);
}

.matches-row > * {
  min-width: 0;
}

.matches-result {
  display: flex;
  align-items: center;
  gap: 7px;
}

.matches-result-badge {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}

.matches-row.is-team1 .matches-result-badge {
  border-color: color-mix(in srgb, var(--green) 38%, transparent);
  color: var(--green);
}

.matches-row.is-team2 .matches-result-badge {
  border-color: color-mix(in srgb, var(--red) 38%, transparent);
  color: var(--red);
}

.matches-date {
  display: grid;
  line-height: 1.15;
}

.matches-date strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matches-date small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.matches-map {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.matches-row .match-map-chip {
  justify-self: center;
  width: 100%;
  min-height: 23px;
  padding: 0 7px;
  border-color: var(--border);
  background: transparent;
  font-size: 10px;
}

.matches-row .match-map-chip img {
  width: 16px;
  height: 16px;
  background: transparent;
}

.matches-team {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matches-team-left {
  padding-left: 0;
}

.matches-row .match-avatar-stack {
  gap: 0;
  justify-content: center;
}

.matches-row .match-avatar-chip:first-child,
.matches-row .match-avatar-empty:first-child {
  margin-left: 0;
}

.matches-row .match-avatar-chip,
.matches-row .match-avatar-empty {
  width: 23px;
  height: 23px;
  margin-left: -5px;
  border: 1px solid var(--border2);
  border-radius: 5px;
  background: var(--surface2);
}

.matches-row .match-avatar-fallback {
  font-size: 9px;
}

.matches-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.03em;
}

.matches-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--blue);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  justify-self: center;
}

.matches-chevron {
  justify-self: end;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  transition: transform var(--transition);
}

.matches-row:hover .matches-chevron {
  transform: translateX(2px);
}

.matches-list {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.matches-match-card {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.matches-match-card:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
}

.matches-match-card.is-team1 {
  box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.85);
}

.matches-match-card.is-team2 {
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.85);
}

.matches-match-card.is-draw {
  box-shadow: inset 3px 0 0 rgba(148, 163, 184, 0.7);
}

.matches-match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.matches-match-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.matches-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 13px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #f8fafc;
}

.matches-match-meta {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.matches-match-time {
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
}

.matches-match-date {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.matches-match-mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.matches-side {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.matches-team-label {
  color: var(--dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.matches-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.matches-match-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.matches-match-bottom-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.matches-timehint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

/* =============================================
   PUBLIC PROFILE REDESIGN
   ============================================= */
.public-profile {
  display: grid;
  gap: 16px;
}

.public-profile-hero {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.public-profile-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.public-profile-identity {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-width: 0;
}

.public-profile-avatar-wrap {
  position: relative;
  margin-top: -44px;
  flex-shrink: 0;
}

.public-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  object-fit: cover;
  border: 3px solid var(--bg);
  background: var(--surface2);
}

.public-profile-avatar-fallback {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  border: 3px solid var(--bg);
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
}

.public-profile-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.public-profile-copy h1 {
  font-size: 30px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.public-profile-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.public-profile-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.public-profile-meta a {
  color: var(--blue);
  font-weight: 700;
}

.public-profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
}

.public-profile-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.profile-metric {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.profile-metric span {
  color: var(--dim);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.profile-metric strong {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.03em;
  color: var(--text);
}

.profile-metric.green strong { color: var(--green); }
.profile-metric.red strong { color: var(--red); }
.profile-metric.blue strong { color: var(--blue); }
.profile-metric.gold strong { color: var(--gold); }

.public-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.public-profile-main {
  min-width: 0;
}

.public-profile-side {
  display: grid;
  gap: 16px;
}

.public-match-card-shell {
  overflow: hidden;
}

.public-match-table {
  display: grid;
}

.public-match-head,
.public-match-row {
  display: grid;
  grid-template-columns: 46px 120px 120px minmax(0, 1fr) 74px minmax(0, 1fr) 78px 26px;
  align-items: center;
  gap: 8px;
}

.public-match-head {
  min-height: 28px;
  padding: 0 14px 10px;
  color: var(--dim);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
  justify-items: center;
  text-align: center;
}

.public-match-list {
  display: grid;
  gap: 3px;
  padding: 10px;
}

.public-match-row {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
  grid-template-areas: "brand date map team1 score team2 mode link";
  justify-items: center;
  text-align: center;
}

.public-match-row:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.public-match-row.is-win {
  box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.85);
}

.public-match-row.is-loss {
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.85);
}

.public-match-row.is-draw {
  box-shadow: inset 3px 0 0 rgba(148, 163, 184, 0.7);
}

.public-match-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.public-match-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 14px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #f8fafc;
}

.public-match-row .public-match-logo {
  grid-area: brand;
}

.public-match-row .public-match-dateblock {
  grid-area: date;
}

.public-match-row .profile-map-chip {
  grid-area: map;
}

.public-match-row .public-match-team-left {
  grid-area: team1;
}

.public-match-row .public-match-score {
  grid-area: score;
}

.public-match-row .public-match-team-right {
  grid-area: team2;
}

.public-match-row .public-match-mode {
  grid-area: mode;
}

.public-match-row .public-match-link {
  grid-area: link;
}

.public-match-dateblock {
  display: grid;
  gap: 0;
  min-width: 0;
  justify-items: center;
}

.public-match-dateblock strong {
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
}

.public-match-dateblock small {
  font-size: 8px;
  color: var(--muted);
}

.profile-map-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 0 8px 0 7px;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
}

.profile-map-chip img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

.profile-map-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-match-top-meta {
  display: none;
}

.public-match-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.public-match-team {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 0 2px;
}

.profile-avatar-stack {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.public-match-mid {
  display: none;
}

.profile-avatar-chip,
.profile-avatar-empty {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #101522;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-left: -7px;
  flex-shrink: 0;
}

.profile-avatar-chip:first-child,
.profile-avatar-empty:first-child {
  margin-left: 0;
}

.profile-avatar-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  background: linear-gradient(135deg, #334155, #0f172a);
}

.profile-avatar-empty {
  margin-left: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
  font-weight: 900;
}

.profile-avatar-chip.is-fallback .profile-avatar-fallback,
.profile-avatar-chip img[style*="display: none"] + .profile-avatar-fallback {
  display: flex;
}

.public-match-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.public-match-bottom {
  display: none;
}

.public-match-bottom-meta {
  display: none;
}

.matches-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.public-match-link {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.public-side-card {
  overflow: hidden;
}

.public-overview-grid {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.public-overview-bar {
  display: grid;
  gap: 10px;
}

.public-overview-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
}

.public-overview-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.public-overview-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #22c55e);
}

.public-overview-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.public-side-list {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.public-side-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 9px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.public-side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.public-side-title img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 8px;
  background: transparent;
  flex-shrink: 0;
}

.public-side-title div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.public-side-title strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.public-side-title span {
  font-size: 10px;
  color: var(--muted);
}

.public-side-value {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

/* =============================================
   UTILITIES
   ============================================= */
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.text-muted { color: var(--muted); }
.text-dim   { color: var(--dim); }
.text-blue  { color: var(--blue); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-gold  { color: var(--gold); }
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 11px; }
.font-bold  { font-weight: 700; }
.font-black { font-weight: 900; }

/* =============================================
   RESPONSIVE — TABLET (< 900px)
   ============================================= */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  /* Leaderboard: hide last 2 cols on tablet, keep table view */
  .lb-header-grid,
  .lb-row-grid {
    grid-template-columns: 40px minmax(0, 1fr) 80px 72px 72px 60px 100px 80px !important;
  }

  .profile-match-head {
    display: none;
  }

  .profile-match-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 14px;
  }

  .profile-match-brand,
  .profile-match-date,
  .profile-match-score,
  .profile-match-rating {
    grid-column: 1 / -1;
  }

  .profile-match-team:first-of-type {
    grid-column: 1 / 2;
  }

  .profile-match-team:last-of-type {
    grid-column: 2 / 3;
  }

  .profile-match-action {
    display: none;
  }

  .lb-hero-head {
    align-items: flex-start;
  }

  .lb-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-help-grid {
    grid-template-columns: 1fr;
  }

  .tracker-form-row {
    grid-template-columns: 1fr;
  }

  .lb-chart-bars {
    min-height: 140px;
  }

  .lb-chart-track {
    min-height: 104px;
  }

  .matches-list-head {
    display: none;
  }

  .matches-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .matches-toolbar-action {
    justify-content: center;
  }

  .matches-row {
    grid-template-columns: minmax(104px, 1fr) auto;
    grid-template-areas:
      "result score"
      "map mode"
      "team1 team2";
    gap: 5px 8px;
    align-items: center;
    min-height: 0;
    padding: 7px 10px 7px 12px;
  }

  .matches-result { grid-area: result; }
  .matches-date { grid-area: date; }
  .matches-map { grid-area: map; justify-self: start; }
  .matches-team-left { grid-area: team1; }
  .matches-team-right { grid-area: team2; }
  .matches-score { grid-area: score; }
  .matches-mode { grid-area: mode; }

  .matches-chevron {
    display: none;
  }

  .matches-result-badge {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }

  .matches-date strong {
    font-size: 9px;
  }

  .matches-date small {
    font-size: 7px;
  }

  .matches-row .match-map-chip {
    max-width: 100%;
    width: fit-content;
    justify-self: start;
  }

  .matches-team {
    justify-content: flex-start;
  }

  .matches-row .match-avatar-chip,
  .matches-row .match-avatar-empty {
    width: 24px;
    height: 24px;
    margin-left: -4px;
    border-radius: 5px;
  }

  .matches-row .match-avatar-fallback {
    font-size: 9px;
  }

  .matches-row .match-avatar-chip:first-child,
  .matches-row .match-avatar-empty:first-child {
    margin-left: 0;
  }

  .matches-score {
    justify-self: end;
    font-size: 18px;
  }

  .matches-mode {
    justify-self: start;
  }

  .matches-team-left,
  .matches-team-right {
    padding-left: 0;
  }

  .public-profile-hero-top {
    flex-direction: column;
    align-items: stretch;
  }

  .public-profile-identity {
    align-items: center;
  }

  .public-profile-avatar-wrap {
    margin-top: -36px;
  }

  .public-profile-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-profile-grid {
    grid-template-columns: 1fr;
  }

  .public-match-mid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .public-match-score {
    justify-content: flex-start;
    font-size: 17px;
  }

  .public-match-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-overview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =============================================
   RESPONSIVE — MOBILE (< 640px)
   ============================================= */
@media (max-width: 640px) {
  /* Header */
  .primary-nav { display: none; }
  /* Hide all auth items except hamburger */
  .btn-login, .btn-steam, .btn-logout, .user-pill { display: none !important; }
  .hamburger { display: flex; }
  .header-inner { gap: 12px; }


  /* Main */
  .site-main { padding: 20px 14px 48px; }

  /* Page hero */
  .page-hero { margin-bottom: 20px; }

  /* Profile: stack vertically */
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .profile-card { display: flex; flex-direction: column; }

  /* Stat grid: 2 cols on small, then 1 */
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid .stat-box:last-child { grid-column: 1 / -1; }

  /* Match table: simplified on mobile */
  .match-row {
    grid-template-columns: 36px 1fr 64px auto;
    gap: 8px; padding: 10px 12px;
  }
  .match-row .kda { display: none; }
  .match-row .date { display: none; }
  .table-header { display: none; }

  .profile-match-table {
    gap: 8px;
  }

  .profile-match-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 11px;
    overflow: hidden;
  }

  .profile-match-brand,
  .profile-match-date,
  .profile-match-team,
  .profile-match-score,
  .profile-match-stat,
  .profile-match-rating {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .profile-match-team:first-of-type,
  .profile-match-team:last-of-type {
    grid-column: 1 / -1;
  }

  .match-avatar-stack {
    flex-wrap: wrap;
    gap: 4px 0;
    max-width: 100%;
  }

  .match-avatar-chip,
  .match-avatar-empty {
    width: 24px;
    height: 24px;
    margin-left: -6px;
  }

  .match-avatar-chip:first-child,
  .match-avatar-empty:first-child {
    margin-left: 0;
  }

  .profile-match-row .profile-match-score {
    justify-content: flex-start;
  }

  .profile-match-row .profile-match-stat {
    justify-items: start;
  }

  .profile-match-row .profile-match-rating {
    justify-items: start;
  }

  .public-profile-hero {
    padding: 15px;
  }

  .public-profile-avatar,
  .public-profile-avatar-fallback {
    width: 72px;
    height: 72px;
  }

  .public-profile-copy h1 {
    font-size: 22px;
  }

  .public-profile-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .public-profile-grid {
    gap: 16px;
  }

  .public-match-head {
    display: none;
  }

  .public-match-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas:
      "brand date score"
      "map team1 team2";
    gap: 4px 8px;
    min-height: 0;
    padding: 6px 8px;
  }

  .public-match-row .public-match-logo {
    justify-self: start;
  }

  .public-match-row .public-match-dateblock {
    justify-self: start;
    justify-items: start;
  }

  .public-match-row .profile-map-chip {
    justify-self: start;
  }

  .public-match-row .public-match-team-left {
    justify-self: start;
  }

  .public-match-row .public-match-team-right {
    justify-self: end;
  }

  .public-match-row .public-match-mode,
  .public-match-row .public-match-mini,
  .public-match-row .public-match-link {
    display: none;
  }

  .public-match-row .profile-avatar-chip,
  .public-match-row .profile-avatar-empty {
    width: 20px;
    height: 20px;
    margin-left: -4px;
    border-radius: 5px;
  }

  .public-match-row .profile-avatar-chip:first-child,
  .public-match-row .profile-avatar-empty:first-child {
    margin-left: 0;
  }

  .public-match-row .profile-avatar-fallback {
    font-size: 9px;
  }

  .public-match-row .public-match-score {
    justify-self: end;
    font-size: 15px;
  }

  .public-match-row .public-match-dateblock strong {
    font-size: 11px;
  }

  .public-match-row .public-match-dateblock small {
    font-size: 8px;
  }

  .public-overview-summary {
    grid-template-columns: 1fr 1fr;
  }

  .public-side-row {
    padding: 9px;
  }

  .matches-match-card {
    padding: 12px;
  }

  .matches-match-top,
  .matches-match-mid,
  .matches-match-bottom {
    gap: 8px;
  }

  .matches-match-mid {
    grid-template-columns: 1fr;
  }

  .matches-score {
    justify-content: flex-start;
    font-size: 18px;
  }

  .matches-match-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  /* Home sidebar: single column */
  .home-sidebar { grid-template-columns: 1fr; }

  /* Leaderboard: switch to mobile card layout */
  .lb-table-wrap { display: none; }
  .lb-cards-wrap { display: block; }
  .lb-hero-card { padding: 14px; gap: 14px; }
  .lb-hero-head p { font-size: 13px; }
  .lb-chart-wrap--live { padding: 14px; }
  .lb-summary-card strong { font-size: 20px; }
  .lb-chart-bars { min-height: 120px; gap: 6px; }
  .lb-chart-track { min-height: 94px; padding-inline: 4px; }
  .lb-chart-range { font-size: 9px; }
  .auth-help-card-body { padding: 10px 11px 12px; }
  .auth-help-card-body h3 { font-size: 12px; }
  .auth-help-card-body p { font-size: 11px; }
  .auth-modal-figure figcaption { font-size: 11px; }
  .tracker-setup-card { padding: 14px; }
  .tracker-step-card { grid-template-columns: 36px 1fr; padding: 14px; }
  .tracker-step-index { width: 36px; height: 36px; border-radius: 11px; font-size: 14px; }
  .tracker-intro-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }
  .tracker-fact-grid {
    grid-template-columns: 1fr;
  }
  .tracker-help-strip {
    grid-template-columns: 1fr;
  }
  .tracking-status-bar {
    grid-template-columns: 1fr;
    display: grid;
    gap: 12px;
  }
  .tracking-status-actions {
    justify-content: flex-start;
  }
  .lb-pagination { padding: 14px; gap: 5px; }
  .lb-page-btn { padding: 6px 9px; font-size: 12px; min-width: 30px; }

  /* Match detail hero: stack */
  .match-hero { padding: 16px; }

  /* Scoreboard: simplified */
  .scoreboard-header, .scoreboard-row {
    grid-template-columns: 1fr 52px 42px 42px;
  }
  .scoreboard-header > :nth-child(5),
  .scoreboard-header > :nth-child(6),
  .scoreboard-row > :nth-child(5),
  .scoreboard-row > :nth-child(6) { display: none; }

  /* Auth */
  .auth-wrap { margin-top: 16px; }
  .btn-steam-lg { width: calc(100% - 40px); margin-left: 20px; margin-right: 20px; }
  .auth-divider { padding: 0 20px; }
  .auth-form { padding: 0 20px 24px; }
  .auth-card-top { padding: 24px 20px 0; }

  /* Import page */
  .import-grid { grid-template-columns: 1fr !important; }

  .matches-toolbar {
    margin-bottom: 12px;
  }

  .matches-toolbar-meta {
    gap: 8px;
  }

  .matches-list-head {
    display: none;
  }

  .matches-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "result score"
      "map mode"
      "team1 team2";
    gap: 5px 8px;
    min-height: 0;
    padding: 7px 10px 7px 12px;
  }

  .matches-result {
    grid-area: result;
  }

  .matches-map {
    grid-area: map;
    justify-self: start;
  }

  .matches-team-left {
    grid-area: team1;
  }

  .matches-team-right {
    grid-area: team2;
  }

  .matches-score {
    grid-area: score;
    justify-self: end;
    font-size: 18px;
  }

  .matches-mode {
    grid-area: mode;
    justify-self: start;
  }

  .matches-chevron {
    display: none;
  }

  .matches-result-badge {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }

  .matches-date strong {
    font-size: 9px;
  }

  .matches-date small {
    font-size: 7px;
  }

  .matches-row .match-map-chip {
    width: fit-content;
    max-width: 100%;
    justify-self: start;
  }

  .matches-row .match-avatar-chip,
  .matches-row .match-avatar-empty {
    width: 24px;
    height: 24px;
    margin-left: -4px;
    border-radius: 5px;
  }

  .matches-row .match-avatar-fallback {
    font-size: 9px;
  }

  .matches-row .match-avatar-chip:first-child,
  .matches-row .match-avatar-empty:first-child {
    margin-left: 0;
  }

  /* Footer */
  .site-footer { height: auto; padding: 20px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-grid .stat-box:last-child { grid-column: auto; }
}

/* =============================================
   PUBLIC PROFILE V3 - compact data-first layout
   ============================================= */
.section-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.history-panel { overflow: hidden; }
.history-panel-header { min-height: 58px; }
.history-panel-header h2 { margin-top: 1px; }
.history-count {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.history-table { min-width: 0; }
.history-head,
.history-row {
  display: grid;
  grid-template-columns: 116px 106px 92px 58px 92px minmax(148px, 1fr) 70px 16px;
  align-items: center;
  column-gap: 7px;
}
.history-head {
  min-height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  color: var(--dim);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
  text-align: center;
  text-transform: uppercase;
}
.history-list { display: grid; }
.history-row {
  position: relative;
  min-height: 50px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background var(--transition), box-shadow var(--transition);
}
.history-row:last-child { border-bottom: 0; }
.history-row::before {
  position: absolute;
  inset: 7px auto 7px 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--dim);
  content: '';
}
.history-row.is-win::before { background: var(--green); }
.history-row.is-loss::before { background: var(--red); }
.history-row:hover {
  background: color-mix(in srgb, var(--surface2) 52%, transparent);
  box-shadow: inset 0 0 0 1px var(--border);
}
.history-row > * { min-width: 0; }
.history-result { display: flex; align-items: center; gap: 7px; }
.history-result-badge {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}
.history-row.is-win .history-result-badge { border-color: color-mix(in srgb, var(--green) 38%, transparent); color: var(--green); }
.history-row.is-loss .history-result-badge { border-color: color-mix(in srgb, var(--red) 38%, transparent); color: var(--red); }
.history-date { display: grid; line-height: 1.15; }
.history-date strong { overflow: hidden; font-size: 10px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.history-date small { margin-top: 3px; color: var(--dim); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.history-row .profile-map-chip {
  justify-self: center;
  width: 100%;
  min-height: 23px;
  padding: 0 7px;
  border-color: var(--border);
  background: transparent;
  font-size: 10px;
}
.history-row .profile-map-chip img { width: 16px; height: 16px; background: transparent; }
.history-team { display: flex; justify-content: center; overflow: hidden; }
.history-row .profile-avatar-stack { justify-content: center; }
.history-row .profile-avatar-chip,
.history-row .profile-avatar-empty {
  width: 23px;
  height: 23px;
  margin-left: -5px;
  border: 1px solid var(--border2);
  border-radius: 5px;
  background: var(--surface2);
}
.history-row .profile-avatar-chip:first-child,
.history-row .profile-avatar-empty:first-child { margin-left: 0; }
.history-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.03em;
}
.history-performance { display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.history-performance span {
  display: inline-flex;
  min-height: 19px;
  align-items: center;
  gap: 3px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 9px;
  font-weight: 850;
}
.history-performance b { color: var(--dim); font-size: 7px; letter-spacing: .04em; }
.history-mode {
  justify-self: center;
  overflow: hidden;
  max-width: 68px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.history-link { justify-self: center; color: var(--blue); font-size: 13px; transition: transform var(--transition); }
.history-row:hover .history-link { transform: translateX(2px); }

.performance-card .card-header,
.map-history-card .card-header { min-height: 57px; }
.performance-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--border); }
.performance-mini-grid > div { display: grid; gap: 2px; padding: 10px; background: var(--surface); }
.performance-mini-grid span { color: var(--dim); font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.performance-mini-grid strong { color: var(--text); font-size: 17px; font-weight: 950; }

.map-history-list { display: grid; padding: 3px 12px 10px; }
.map-history-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 36px; align-items: center; gap: 9px; min-height: 53px; border-bottom: 1px solid var(--border); }
.map-history-row:last-child { border-bottom: 0; }
.map-history-row > img { width: 25px; height: 25px; object-fit: contain; background: transparent !important; }
.map-history-body { display: grid; gap: 5px; min-width: 0; }
.map-history-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; min-width: 0; }
.map-history-copy strong { overflow: hidden; font-size: 11px; font-weight: 850; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.map-history-copy span { flex-shrink: 0; color: var(--dim); font-size: 8px; font-weight: 750; }
.map-history-track { height: 3px; overflow: hidden; border-radius: 3px; background: var(--surface2); }
.map-history-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.map-history-rate { justify-self: end; font-size: 11px; font-weight: 950; }
.public-side-title img { background: transparent !important; }

@media (max-width: 1100px) {
  .public-profile-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .history-head,
  .history-row { grid-template-columns: 108px 96px 82px 54px 82px minmax(112px, 1fr) 16px; }
  .history-head > :nth-child(7),
  .history-row .history-mode { display: none; }
}

@media (max-width: 860px) {
  .public-profile-grid { grid-template-columns: 1fr; }
  .public-profile-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-profile-side .performance-card { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .public-profile { gap: 12px; }
  .public-profile-hero { padding: 12px; }
  .public-profile-avatar-wrap { margin-top: 0; }
  .public-profile-avatar,
  .public-profile-avatar-fallback { width: 58px; height: 58px; }
  .public-profile-copy h1 { font-size: 20px; }
  .public-profile-meta { font-size: 9px; }
  .public-profile-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .public-profile-metrics .profile-metric { min-width: 0; padding: 8px; border-radius: 8px; }
  .public-profile-metrics .profile-metric:nth-child(n+5) { display: none; }
  .public-profile-metrics .profile-metric span { font-size: 7px; letter-spacing: .07em; }
  .public-profile-metrics .profile-metric strong { font-size: 15px; }
  .history-panel-header { min-height: 50px; }
  .history-head { display: none; }
  .history-row {
    grid-template-columns: minmax(105px, 1fr) auto minmax(105px, 1fr);
    grid-template-areas:
      "result map score"
      "team1 stats team2";
    gap: 5px 8px;
    min-height: 65px;
    padding: 6px 8px 6px 10px;
  }
  .history-result { grid-area: result; }
  .history-row .profile-map-chip { grid-area: map; width: auto; max-width: 94px; justify-self: center; }
  .history-team-one { grid-area: team1; justify-content: flex-start; }
  .history-score { grid-area: score; justify-self: end; font-size: 15px; }
  .history-team-two { grid-area: team2; justify-content: flex-end; }
  .history-performance { grid-area: stats; gap: 2px; }
  .history-performance span { min-height: 17px; padding: 0 3px; font-size: 8px; }
  .history-performance b { display: none; }
  .history-performance .history-hs,
  .history-performance .history-rating { display: none; }
  .history-mode,
  .history-link { display: none; }
  .history-row .profile-avatar-chip,
  .history-row .profile-avatar-empty { width: 21px; height: 21px; margin-left: -5px; }
  .history-result-badge { width: 19px; height: 19px; flex-basis: 19px; }
  .history-date strong { font-size: 9px; }
  .history-date small { font-size: 7px; }
  .public-profile-side { grid-template-columns: 1fr; }
  .public-profile-side .performance-card { grid-column: auto; }
  .map-history-row { min-height: 48px; }
}

@media (max-width: 390px) {
  .history-row { grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr); column-gap: 5px; }
  .history-row .profile-map-chip { max-width: 78px; padding: 0 5px; }
  .history-row .profile-map-chip span { max-width: 52px; }
  .history-row .profile-avatar-chip,
  .history-row .profile-avatar-empty { width: 19px; height: 19px; margin-left: -6px; }
}

/* =============================================
   HOME V3 - operational CS2 dashboard landing
   ============================================= */
.tracker-home { display: grid; gap: 0; }
.tracker-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, .98fr);
  align-items: center;
  gap: clamp(34px, 6vw, 82px);
  min-height: 590px;
  padding: 76px 0 64px;
  overflow: clip;
}
.tracker-hero::before {
  position: absolute;
  top: 4%;
  left: -18%;
  width: 620px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--blue) 16%, transparent), transparent 67%);
  content: '';
  pointer-events: none;
}
.tracker-hero-copy { position: relative; z-index: 1; }
.tracker-live-label { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.tracker-live-label span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px color-mix(in srgb, var(--green) 70%, transparent); animation: trackerPulse 2.2s ease-in-out infinite; }
.tracker-hero h1 { max-width: 650px; font-size: clamp(48px, 6.3vw, 82px); font-weight: 950; letter-spacing: -.065em; line-height: .92; }
.tracker-hero h1 em { color: var(--blue); font-style: normal; }
.tracker-hero-copy > p { max-width: 580px; margin-top: 25px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.tracker-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }
.tracker-trust-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 23px; color: var(--dim); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.tracker-trust-row span::before { margin-right: 6px; color: var(--green); content: '\2713'; }
.tracker-hero-console { position: relative; z-index: 1; overflow: hidden; border: 1px solid var(--border2); border-radius: 16px; background: linear-gradient(145deg, var(--surface2), var(--surface)); box-shadow: 0 30px 80px color-mix(in srgb, var(--bg) 76%, transparent); }
.tracker-hero-console::after { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 44%, color-mix(in srgb, var(--blue) 7%, transparent), transparent 62%); content: ''; pointer-events: none; }
.tracker-console-top { display: flex; align-items: center; justify-content: space-between; min-height: 45px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.tracker-console-top span { display: flex; align-items: center; gap: 7px; }
.tracker-console-top i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.tracker-console-top small { color: var(--dim); }
.tracker-console-score { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.tracker-console-score > div { display: grid; gap: 4px; padding: 18px; border-right: 1px solid var(--border); }
.tracker-console-score > div:last-child { border-right: 0; }
.tracker-console-score small { color: var(--dim); font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.tracker-console-score strong { font-size: 27px; font-weight: 950; line-height: 1; }
.tracker-console-score .console-good { color: var(--green); }
.tracker-latest-match { position: relative; z-index: 1; display: grid; grid-template-columns: 38px 1fr auto 16px; align-items: center; gap: 11px; margin: 13px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: color-mix(in srgb, var(--bg) 32%, transparent); transition: border-color var(--transition), transform var(--transition); }
.tracker-latest-match:hover { transform: translateY(-1px); border-color: var(--border2); }
.tracker-latest-match > img { width: 34px; height: 34px; object-fit: contain; background: transparent; }
.tracker-latest-match > div { display: grid; line-height: 1.25; }
.tracker-latest-match small { color: var(--dim); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.tracker-latest-match strong { font-size: 12px; text-transform: capitalize; }
.tracker-latest-match > b { font-size: 20px; font-weight: 950; }
.tracker-latest-match > b span { color: var(--dim); }
.tracker-latest-match > em { color: var(--blue); font-style: normal; }
.tracker-latest-match.is-empty { grid-template-columns: 1fr 16px; }
.tracker-console-bars { position: relative; z-index: 1; display: grid; gap: 11px; padding: 5px 17px 18px; }
.tracker-console-bars > div { display: grid; grid-template-columns: 90px 1fr 40px; align-items: center; gap: 9px; color: var(--muted); font-size: 9px; font-weight: 750; }
.tracker-console-bars i { height: 4px; overflow: hidden; border-radius: 4px; background: var(--bg3); }
.tracker-console-bars i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.tracker-console-bars strong { color: var(--text); font-size: 8px; text-align: right; text-transform: uppercase; }

.tracker-value-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--border); }
.tracker-value-strip > div { display: flex; align-items: center; gap: 14px; min-height: 75px; padding: 0 22px; border-right: 1px solid var(--border); }
.tracker-value-strip > div:last-child { border-right: 0; }
.tracker-value-strip strong { color: var(--blue); font-size: 10px; font-weight: 950; letter-spacing: .1em; }
.tracker-value-strip span { color: var(--muted); font-size: 12px; }
.tracker-value-strip b { color: var(--text); }
.tracker-section { padding: 78px 0; }
.tracker-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.tracker-section-heading > div > span,
.tracker-map-pool > div > span,
.tracker-final-cta > div > span { color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.tracker-section-heading h2 { max-width: 620px; margin-top: 7px; font-size: clamp(25px, 4vw, 40px); font-weight: 930; letter-spacing: -.045em; line-height: 1.08; }
.tracker-section-heading > p { max-width: 390px; color: var(--muted); font-size: 13px; }
.tracker-section-heading.compact { align-items: center; }
.tracker-section-heading.compact h2 { font-size: clamp(23px, 3vw, 32px); }
.tracker-section-heading > a { color: var(--blue); font-size: 11px; font-weight: 850; }
.tracker-feature-grid { display: grid; grid-template-columns: 1.18fr 1fr 1fr; gap: 12px; }
.tracker-feature { position: relative; display: flex; min-height: 245px; flex-direction: column; overflow: hidden; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color var(--transition), transform var(--transition); }
.tracker-feature:hover { transform: translateY(-3px); border-color: var(--border2); }
.tracker-feature.is-primary { background: linear-gradient(145deg, color-mix(in srgb, var(--blue) 11%, var(--surface)), var(--surface)); }
.tracker-feature-index { color: var(--dim); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.tracker-feature h3 { margin-top: 28px; font-size: 20px; font-weight: 900; }
.tracker-feature p { max-width: 310px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.feature-signal { display: flex; height: 64px; align-items: end; gap: 7px; margin-top: auto; }
.feature-signal i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(var(--cyan), var(--blue)); opacity: .74; }
.feature-progress { display: grid; gap: 8px; margin-top: auto; }
.feature-progress > span { height: 6px; overflow: hidden; border-radius: 6px; background: var(--bg3); }
.feature-progress b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.feature-progress small { color: var(--dim); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.feature-pulse { display: flex; align-items: center; gap: 9px; margin-top: auto; color: var(--green); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.feature-pulse i { width: 34px; height: 34px; border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); border-radius: 50%; background: radial-gradient(circle, var(--green) 0 10%, transparent 12%); }
.tracker-community { padding-top: 20px; }
.tracker-community-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr); gap: 14px; }
.tracker-player-panel,
.tracker-feed-panel { overflow: hidden; }
.tracker-panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 49px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.tracker-panel-head strong { font-size: 12px; font-weight: 850; }
.tracker-panel-head span,
.tracker-panel-head a { color: var(--dim); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.tracker-panel-head a { color: var(--blue); }
.tracker-player-list,
.tracker-match-feed { display: grid; }
.tracker-player-row { display: grid; grid-template-columns: 27px 32px 1fr auto; align-items: center; gap: 9px; min-height: 51px; padding: 5px 13px; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.tracker-player-row:last-child,
.tracker-feed-row:last-child { border-bottom: 0; }
.tracker-player-row:hover,
.tracker-feed-row:hover { background: var(--surface2); }
.tracker-rank { color: var(--dim); font-size: 9px; font-weight: 900; }
.tracker-player-row > img { width: 29px; height: 29px; border: 1px solid var(--border2); border-radius: 6px; object-fit: cover; }
.tracker-player-row > div { display: grid; line-height: 1.25; min-width: 0; }
.tracker-player-row > div strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.tracker-player-row small { color: var(--dim); font-size: 8px; }
.tracker-player-row > b { font-size: 10px; }
.tracker-feed-row { display: grid; grid-template-columns: 31px 1fr auto 13px; align-items: center; gap: 9px; min-height: 51px; padding: 5px 13px; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.tracker-feed-row > img { width: 28px; height: 28px; object-fit: contain; background: transparent; }
.tracker-feed-row > div { display: grid; line-height: 1.25; }
.tracker-feed-row > div strong { font-size: 10px; text-transform: capitalize; }
.tracker-feed-row small { color: var(--dim); font-size: 8px; }
.tracker-feed-row > b { display: flex; gap: 5px; font-size: 13px; font-weight: 950; }
.tracker-feed-row > b i { color: var(--dim); font-style: normal; }
.tracker-feed-row > em { color: var(--blue); font-style: normal; }
.tracker-empty { padding: 36px 18px; color: var(--muted); font-size: 12px; text-align: center; }
.tracker-map-pool { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 28px; padding: 25px 0; border-block: 1px solid var(--border); }
.tracker-map-pool > div:first-child { display: grid; }
.tracker-map-pool > div > strong { margin-top: 3px; font-size: 17px; }
.tracker-map-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tracker-map-list span { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 9px; font-weight: 750; }
.tracker-map-list img { width: 17px; height: 17px; object-fit: contain; background: transparent; }
.tracker-final-cta { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 70px 0 20px; padding: 38px; border: 1px solid color-mix(in srgb, var(--blue) 27%, var(--border)); border-radius: 14px; background: linear-gradient(115deg, color-mix(in srgb, var(--blue) 11%, var(--surface)), var(--surface)); }
.tracker-final-cta h2 { margin-top: 5px; font-size: clamp(25px, 4vw, 38px); font-weight: 930; letter-spacing: -.04em; }
.tracker-final-cta p { color: var(--muted); font-size: 12px; }
.tracker-final-cta > div:last-child { display: flex; gap: 9px; flex-shrink: 0; }

@keyframes trackerPulse { 50% { opacity: .45; transform: scale(.82); } }

@media (max-width: 900px) {
  .tracker-hero { grid-template-columns: 1fr; min-height: 0; padding: 58px 0; }
  .tracker-hero-copy { text-align: center; }
  .tracker-hero h1,
  .tracker-hero-copy > p { margin-inline: auto; }
  .tracker-live-label,
  .tracker-hero-actions,
  .tracker-trust-row { justify-content: center; }
  .tracker-hero-console { width: min(100%, 620px); margin-inline: auto; }
  .tracker-feature-grid { grid-template-columns: 1fr 1fr; }
  .tracker-feature.is-primary { grid-column: 1 / -1; }
  .tracker-community-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .tracker-hero { gap: 34px; padding: 38px 0 34px; }
  .tracker-hero h1 { font-size: clamp(42px, 14vw, 58px); }
  .tracker-hero-copy > p { margin-top: 18px; font-size: 13px; line-height: 1.65; }
  .tracker-hero-actions { display: grid; grid-template-columns: 1fr; margin-top: 23px; }
  .tracker-trust-row { gap: 7px 12px; font-size: 8px; }
  .tracker-console-score > div { padding: 13px 10px; }
  .tracker-console-score small { font-size: 7px; }
  .tracker-console-score strong { font-size: 21px; }
  .tracker-latest-match { margin: 9px; padding: 9px; }
  .tracker-console-bars { padding: 4px 12px 14px; }
  .tracker-console-bars > div { grid-template-columns: 76px 1fr 36px; }
  .tracker-value-strip { grid-template-columns: 1fr; }
  .tracker-value-strip > div { min-height: 49px; padding: 0 11px; border-right: 0; border-bottom: 1px solid var(--border); }
  .tracker-value-strip > div:last-child { border-bottom: 0; }
  .tracker-section { padding: 54px 0; }
  .tracker-section-heading { display: grid; gap: 12px; }
  .tracker-section-heading > p { font-size: 11px; }
  .tracker-feature-grid { grid-template-columns: 1fr; }
  .tracker-feature.is-primary { grid-column: auto; }
  .tracker-feature { min-height: 190px; padding: 19px; }
  .tracker-feature h3 { margin-top: 18px; }
  .tracker-community { padding-top: 4px; }
  .tracker-section-heading.compact { display: flex; align-items: end; }
  .tracker-section-heading.compact > a { flex-shrink: 0; }
  .tracker-player-row { grid-template-columns: 22px 30px 1fr auto; padding-inline: 9px; }
  .tracker-map-pool { grid-template-columns: 1fr; gap: 13px; }
  .tracker-map-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
  .tracker-map-list span { flex-shrink: 0; }
  .tracker-final-cta { display: grid; margin-top: 48px; padding: 25px 20px; }
  .tracker-final-cta > div:last-child { display: grid; grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-main:has(.tracker-home) {
    min-height: 0;
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .tracker-home {
    overflow: clip;
  }

  .tracker-home .tracker-hero {
    gap: 22px;
    padding: 18px 0 22px;
  }

  .tracker-home .tracker-hero::before {
    display: none;
  }

  .tracker-home .tracker-hero h1 {
    font-size: clamp(34px, 12vw, 46px);
    line-height: .95;
  }

  .tracker-home .tracker-section {
    padding: 36px 0;
  }

  .tracker-home .tracker-final-cta {
    margin: 34px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tracker-live-label span { animation: none; }
  .tracker-feature:hover,
  .tracker-latest-match:hover { transform: none; }
}

/* =============================================
   HOME PAGE — HERO
   ============================================= */
.home-hero {
  text-align: center;
  padding: 56px 20px 48px;
  position: relative;
}
.home-hero::before {
  content: '';
  position: absolute;
  top: -64px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  position: relative;
}

.hero-title {
  font-size: clamp(32px, 6vw, 58px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  position: relative;
}
.hero-title-accent {
  background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
  position: relative;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  position: relative;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: white;
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 0 32px rgba(59,130,246,0.35);
  white-space: nowrap;
}
.cta-primary:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 0 48px rgba(59,130,246,0.5); }
.cta-primary.cta-large { padding: 15px 34px; font-size: 16px; }

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.cta-secondary:hover { color: var(--text); border-color: var(--blue); }

.hero-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}
.hero-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 100px;
  transition: var(--transition);
}
.hero-pill:hover { border-color: var(--border2); transform: translateY(-2px); }
.pill-val {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
}
.pill-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-top: 3px;
}

/* =============================================
   HOW IT WORKS
   ============================================= */
.how-section {
  padding: 48px 0 40px;
  text-align: center;
}
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--blue);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 36px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: left;
  position: relative;
  transition: var(--transition);
}
.step-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.step-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step-icon-blue  { background: rgba(59,130,246,0.12);  color: var(--blue); }
.step-icon-cyan  { background: rgba(103,232,249,0.1);  color: var(--cyan); }
.step-icon-green { background: rgba(74,222,128,0.1);   color: var(--green); }
.step-num {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--dim);
  margin-bottom: 8px;
}
.step-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.step-card p  { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* =============================================
   FEATURES
   ============================================= */
.features-section { padding: 0 0 40px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.feature-card-highlight {
  background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, var(--surface) 100%);
  border-color: rgba(59,130,246,0.2);
}
.feature-icon { font-size: 26px; margin-bottom: 12px; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* =============================================
   HOME BOTTOM GRID
   ============================================= */
.home-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  padding-bottom: 48px;
}

/* =============================================
   BOTTOM CTA
   ============================================= */
.bottom-cta {
  margin: 0 -20px -60px;
  padding: 56px 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.06) 0%, transparent 60%);
  border-top: 1px solid var(--border);
  text-align: center;
}
.bottom-cta-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.bottom-cta h2 { font-size: clamp(20px, 3vw, 28px); font-weight: 800; letter-spacing: -0.03em; }
.bottom-cta p  { font-size: 15px; color: var(--muted); margin-top: 8px; }

/* Home responsive */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .home-bottom-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 12px; }
  .step-card { display: grid; grid-template-columns: 46px 1fr; gap: 0 16px; align-items: start; }
  .step-card .step-icon { margin-bottom: 0; }
  .step-card .step-num { grid-column: 2; }
  .step-card h3 { grid-column: 2; margin-top: -4px; }
  .step-card p { grid-column: 2; }
}
@media (max-width: 640px) {
  .home-hero { padding: 36px 0 32px; }
  .hero-pills { gap: 8px; }
  .hero-pill { padding: 12px 16px; min-width: 80px; }
  .pill-val { font-size: 18px; }
  .features-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature-card { padding: 16px 14px; }
  .bottom-cta { margin: 0 -14px -48px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .cta-primary, .cta-secondary { justify-content: center; }
}
@media (max-width: 440px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* =============================================
   MATCH IMPORT
   ============================================= */
.import-page { display: grid; gap: 20px; }
.import-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 0 4px;
}
.import-hero h1 {
  margin-top: 5px;
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 900;
  letter-spacing: -.04em;
}
.import-hero p {
  max-width: 650px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.import-hero-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  flex-shrink: 0;
}
.import-hero-status span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.import-hero-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px color-mix(in srgb, var(--green) 72%, transparent);
}
.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.import-card,
.import-side .card { overflow: hidden; }
.import-form { display: grid; gap: 18px; }
.import-field { display: grid; gap: 8px; }
.import-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.import-field label span {
  color: var(--dim);
  font-weight: 750;
  letter-spacing: .06em;
}
.import-field input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  font-size: 14px;
}
.import-field input[name="share_code"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.import-field p {
  color: var(--dim);
  font-size: 12px;
}
.import-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.import-actions .btn-primary {
  padding: 11px 28px;
  font-size: 14px;
}
.import-actions a {
  color: var(--muted);
  font-size: 13px;
}
.import-side { display: grid; gap: 16px; }
.import-steps-card .card-body { display: grid; gap: 14px; padding: 16px 20px; }
.import-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 14px;
}
.import-step > div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}
.import-step span { display: grid; gap: 2px; }
.import-step strong { font-size: 14px; }
.import-step small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.import-auto-card .card-body { padding: 16px 20px; }
.import-auto-card p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.import-auto-card .btn-primary {
  display: inline-flex;
  padding: 8px 18px;
  font-size: 13px;
}

@media (max-width: 820px) {
  .import-hero {
    display: grid;
    align-items: start;
  }
  .import-hero-status { justify-content: flex-start; }
  .import-layout { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 640px) {
  .site-main:has(.import-page) {
    padding-top: 18px;
    padding-bottom: 32px;
  }
  .import-page { gap: 14px; }
  .import-hero h1 { font-size: 25px; }
  .import-hero p { font-size: 13px; line-height: 1.6; }
  .import-hero-status span {
    min-height: 27px;
    padding-inline: 9px;
    font-size: 8px;
  }
  .import-card .card-header,
  .import-side .card-header {
    align-items: flex-start;
    gap: 4px;
  }
  .import-card .card-header span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .import-field input {
    padding: 12px;
    font-size: 13px;
  }
  .import-field input[name="share_code"] {
    letter-spacing: .01em;
  }
  .import-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .import-actions .btn-primary,
  .import-actions a {
    justify-content: center;
    text-align: center;
  }
  .import-steps-card .card-body,
  .import-auto-card .card-body {
    padding: 14px;
  }
  .import-step {
    grid-template-columns: 25px 1fr;
    gap: 11px;
  }
  .import-step > div {
    width: 25px;
    height: 25px;
    font-size: 11px;
  }
}

/* =============================================
   CS2 PREMIER RATING STYLES
   ============================================= */
.cs2rating {
  width: 88px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  color: #fff;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  font-family: inherit;
}

.cs2rating span {
  display: inline-flex;
  align-items: baseline;
  transform: translateY(-1px);
  font-size: 14px;
}

.cs2rating small {
  font-size: 10px;
  font-weight: 950;
}

.cs2rating.md {
  width: 92px;
  height: 25px;
}

.cs2rating.md span {
  font-size: 15px;
}

.cs2rating.unranked {
  background: linear-gradient(135deg, #2b3040 0%, #1e222d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  color: #7b8296 !important;
  text-shadow: none;
}

.cs2rating.unranked span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  transform: none;
}

.cs2rating.unranked.sm span {
  font-size: 10px;
}

.cs2rating.unranked.md span {
  font-size: 11px;
}

/* TITAN transient feedback */
.flash[data-transient-alert] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-right: 10px;
  transition:
    opacity .22s ease,
    transform .22s ease,
    margin .22s ease,
    padding .22s ease,
    border-width .22s ease;
}

.flash[data-transient-alert].is-dismissing {
  opacity: 0;
  transform: translateY(-5px);
}

.flash-dismiss {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.055);
  color: currentColor;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: .78;
  transition: background .18s ease, opacity .18s ease;
}

.flash-dismiss:hover,
.flash-dismiss:focus-visible {
  background: rgba(255,255,255,.10);
  opacity: 1;
  outline: none;
}

@media (max-width: 620px) {
  .flash[data-transient-alert] {
    align-items: flex-start;
    gap: 10px;
  }

  .flash-dismiss {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash[data-transient-alert] {
    transition: none;
  }
}

