/* =============================================
   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; }

/* =============================================
   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; }

/* =============================================
   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; }
.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 TABLE
   ============================================= */
.lb-row, .lb-header {
  display: grid;
  grid-template-columns: 44px 1fr 100px 90px 90px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}
.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: var(--surface2); }
.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; }
.player-cell strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =============================================
   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; }

/* =============================================
   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; }
  .lb-row, .lb-header { grid-template-columns: 40px 1fr 80px 80px; }
  .lb-row > :last-child, .lb-header > :last-child { display: none; }
}

/* =============================================
   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; }

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

  /* Leaderboard: fewer columns */
  .lb-row, .lb-header { grid-template-columns: 36px 1fr 70px; }
  .lb-row > :nth-child(4),
  .lb-row > :nth-child(5),
  .lb-header > :nth-child(4),
  .lb-header > :nth-child(5) { display: none; }

  /* 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; }

  /* 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; }
}

/* =============================================
   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; }
}

