/* ==========================================================================
   Brawlhalla — frontend styles.
   Visual system aligned with r6data.com (Inter, #121212 surface theme,
   #f5a623 primary, 8px radius, sticky underline navbar) and contextualised
   for Brawlhalla (warm gold→orange energy).
   ========================================================================== */
:root {
  --primary-color: #f5a623;
  --primary-light: #ffba52;
  --primary-dark: #d68c00;
  --accent-color: #ff6b35;
  --accent-2: #ff4d6d;

  --background-color: #121212;
  --surface-color: #1e1e1e;
  --surface-2: #242424;
  --surface-3: #2b2b2b;
  --card-bg: #1e1e1e;
  --input-bg: #262626;

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.70);
  --text-muted: rgba(255, 255, 255, 0.50);
  --divider-color: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.10);
  --border-soft: rgba(255, 255, 255, 0.05);

  --success-color: #4caf50;
  --error-color: #f44336;
  --warning-color: #ff9800;
  --gold: #ffcb45;
  --silver: #c7d0dc;
  --bronze: #d0894f;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --radius-lg: 14px;
  --maxw: 1200px;
  --font-family: 'Inter', 'Roboto', 'Helvetica', Arial, sans-serif;
  --primary-glow: rgba(245, 166, 35, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: thin;
  /* sticky footer: header / main / footer stack, main grows to fill */
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
body > .site-header { flex-shrink: 0; }
::selection { background: rgba(245, 166, 35, 0.30); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-track { background: var(--background-color); }
body::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }

a { color: var(--primary-color); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.15rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--text-secondary); }
.small { font-size: .85rem; }
.mono { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.hidden { display: none !important; }
.material-icons, .material-symbols-outlined {
  font-family: 'Material Icons', 'Material Symbols Outlined';
  vertical-align: middle; line-height: 1; user-select: none;
}

/* ---- navbar (r6data style) ---- */
.site-header {
  background-color: var(--surface-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--divider-color);
}
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 24px; height: 68px; max-width: var(--maxw); margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-primary); font-size: 1.4rem; font-weight: 800; letter-spacing: .3px;
}
.brand:hover { color: var(--primary-color); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: grid; place-items: center; color: #1a1205; font-weight: 900; font-size: 1rem;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.nav-links { display: flex; gap: 6px; align-items: center; list-style: none; }
.nav-links a {
  color: var(--text-primary); padding: 10px 16px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: .95rem;
  position: relative; transition: all .25s ease;
}
.nav-links a .material-icons { font-size: 19px; }
.nav-links a::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; width: 0; height: 2px;
  background: var(--primary-color); transform: translateX(-50%); transition: width .25s ease;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.08); color: var(--primary-color); transform: translateY(-1px); }
.nav-links a:hover::after { width: 60%; }
.nav-links a.active { color: var(--primary-color); font-weight: 600; background: rgba(245, 166, 35, 0.10); }
.nav-links a.active::after { width: 60%; }
.nav-toggle {
  display: none; background: var(--surface-2); border: 1px solid var(--border-color);
  color: var(--text-primary); border-radius: 8px; padding: 8px 11px; cursor: pointer; font-size: 1.1rem;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius); font-weight: 600; font-size: .95rem;
  cursor: pointer; border: 1px solid var(--border-color); background: var(--surface-2);
  color: var(--text-primary); transition: all .2s; text-decoration: none;
}
.btn:hover { background: var(--surface-3); color: var(--text-primary); border-color: var(--border-color); }
.btn .material-icons { font-size: 19px; }
.btn-primary { background: var(--primary-color); color: #000; border: none; }
.btn-primary:hover { background: var(--primary-light); color: #000; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 13px; font-size: .85rem; }

/* ---- inputs ---- */
input, select {
  background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-primary);
  padding: 12px 15px; border-radius: var(--radius); font-size: 1rem; font-family: inherit; width: 100%;
}
input::placeholder { color: var(--text-muted); }
input:focus, select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-glow); }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .88rem; color: var(--text-secondary); }

/* ---- search ---- */
.search-wrap { position: relative; }
.search-form { display: flex; gap: 10px; }
.search-form input { flex: 1; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 900;
  background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; max-height: 360px; overflow-y: auto;
  text-align: left;
}
.search-results::-webkit-scrollbar { width: 8px; }
.search-results::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 4px; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--divider-color); }
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item.active { background: var(--surface-2); }
.search-item .s-av { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-weight: 800; font-size: .95rem; background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); color: #1a1205; }
.search-item .s-main { min-width: 0; flex: 1; }
.search-item .s-name { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item .s-sub { color: var(--text-muted); font-size: .76rem; display: flex; gap: 8px; align-items: center; margin-top: 1px; }
.search-item .s-pr { margin-left: auto; flex-shrink: 0; font-size: .74rem; font-weight: 700; color: var(--primary-color); background: rgba(245,166,35,.1); padding: 3px 9px; border-radius: 999px; }
.search-item.muted { color: var(--text-muted); justify-content: center; font-size: .88rem; padding: 16px; cursor: default; }

/* ---- layout / sections ---- */
.section { padding: 32px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---- cards / panels ---- */
.panel, .card {
  background-color: var(--surface-color); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); border: 1px solid var(--border-soft); padding: 22px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.stat-card {
  background-color: var(--surface-color); border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); padding: 18px;
  position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.stat-card:hover, .feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card .label { color: var(--text-secondary); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat-card .value { font-size: 1.9rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-card .sub { color: var(--text-secondary); font-size: .82rem; margin-top: 3px; }
.stat-card.accent { border-color: rgba(245, 166, 35, 0.4); background: linear-gradient(160deg, var(--primary-glow), transparent 60%); }

.feature { padding: 22px; }
.feature .fi {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(245, 166, 35, 0.12); color: var(--primary-color); font-size: 1.5rem; margin-bottom: 14px;
}
.feature h3 { font-size: 1.05rem; margin: 0 0 6px; }
.feature p { color: var(--text-secondary); font-size: .9rem; margin: 0; }

/* ---- badges / chips / pills ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border-color); color: var(--text-secondary);
}
.badge.gold { color: var(--gold); border-color: rgba(255, 203, 69, .4); background: rgba(255, 203, 69, .08); }
.badge.region { color: var(--primary-color); border-color: rgba(245, 166, 35, .35); background: rgba(245, 166, 35, .08); }
.pill { padding: 2px 9px; border-radius: 6px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--text-secondary); }

/* ---- hero ---- */
.hero { padding: 64px 0 40px; text-align: center; position: relative; }
.hero::before {
  content: ""; position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 720px; height: 360px; max-width: 100%;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%); pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero .lead { color: var(--text-secondary); font-size: 1.12rem; max-width: 650px; margin: 0 auto 28px; }
.hero .search-wrap { max-width: 560px; margin: 0 auto; position: relative; z-index: 40; }
.hero .search-form { width: 100%; }
.tagline {
  display: inline-flex; align-items: center; gap: 7px; background: rgba(245, 166, 35, 0.12);
  color: var(--primary-color); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .82rem; margin-bottom: 18px;
  border: 1px solid rgba(245, 166, 35, 0.25);
}

/* ---- tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--surface-color); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--divider-color); white-space: nowrap; }
th { color: var(--text-secondary); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); position: sticky; top: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank-cell { font-weight: 800; color: var(--primary-color); }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--surface-2); }

/* ---- profile header ---- */
.profile-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.avatar {
  width: 80px; height: 80px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); color: #1a1205;
  font-weight: 900; font-size: 2.1rem; flex-shrink: 0; box-shadow: 0 8px 20px var(--primary-glow);
}
.profile-meta h1 { margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--divider-color); margin: 24px 0 22px; overflow-x: auto; }
.tab {
  padding: 12px 18px; color: var(--text-secondary); font-weight: 600; cursor: pointer;
  border: none; background: none; border-bottom: 2px solid transparent; white-space: nowrap; font-size: .95rem; transition: all .2s;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.tab-panel { display: none; animation: fadeIn .25s ease-out; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- skeleton ---- */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 6px; color: transparent !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skel-line { height: 14px; margin: 9px 0; }
.skel-card { height: 90px; }

/* ---- states ---- */
.empty-state, .error-state {
  text-align: center; padding: 46px 22px; color: var(--text-secondary);
  border: 1px dashed var(--border-color); border-radius: var(--radius-lg); background: var(--surface-color);
}
.empty-state .icon, .error-state .icon { font-size: 2.6rem; margin-bottom: 10px; display: block; }
.empty-state .icon.material-icons, .error-state .icon.material-icons { font-size: 2.8rem; color: var(--text-muted); }
.empty-state h3, .error-state h3 { color: var(--text-primary); margin: 2px 0 6px; }
.empty-state p, .error-state p { margin: 0 auto; max-width: 460px; }
.error-state { border-color: rgba(244, 67, 54, .4); }
.notice { background: rgba(245, 166, 35, 0.10); border: 1px solid rgba(245, 166, 35, .3); color: #f3d19a; padding: 13px 16px; border-radius: var(--radius); font-size: .9rem; }
.notice.info { background: rgba(66, 165, 245, .08); border-color: rgba(66, 165, 245, .3); color: #bfe0fb; }

/* ---- tooltip ---- */
.info-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border-color); color: var(--text-secondary); font-size: .7rem; cursor: help; margin-left: 5px; }

/* ---- compare ---- */
.win { color: var(--success-color); font-weight: 800; }
.lose { color: var(--text-muted); }
.wcol { background: rgba(76, 175, 80, .08); }

/* ---- charts ---- */
.chart-box { position: relative; height: 280px; }
.chart-box canvas { max-width: 100%; }

/* ---- medals ---- */
.medal { font-weight: 800; }
.medal.g { color: var(--gold); } .medal.s { color: var(--silver); } .medal.b { color: var(--bronze); }

/* ---- code / embed ---- */
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .88em; }
pre.embed-code { background: #0d0d0d; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 14px; font-size: .82rem; color: #cdd6e2; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--divider-color); margin-top: 56px; padding: 34px 0; color: var(--text-secondary); font-size: .88rem; background: var(--surface-color); }
.footer-grid { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--primary-color); }

/* ==========================================================================
   Polish / graphic details
   ========================================================================== */
/* accent bar under content-page titles */
main.container > h1:first-child { position: relative; padding-bottom: 14px; margin-bottom: 8px; }
main.container > h1:first-child::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 54px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}
/* hero title with subtle gradient */
.hero h1 {
  background: linear-gradient(180deg, #ffffff 40%, #ffd9a3 130%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* button press feedback */
.btn:active { transform: translateY(1px); }
/* nicer link underlines */
a { text-underline-offset: 3px; }
/* stat-card top accent line on hover */
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0; transition: opacity .2s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card.accent::before { opacity: 1; }
/* panel subtle hover for interactive tables/cards */
.table-wrap { transition: border-color .2s; }
/* dividers between hero and content */
.section + .section { padding-top: 8px; }
/* material icon vertical fix inside buttons/nav */
.btn .material-icons, .nav-links a .material-icons { margin-top: -1px; }
/* smoother images/avatars */
.avatar, .s-av, .logo, .step-num { -webkit-font-smoothing: antialiased; }

/* ---- analysis: strength bars ---- */
.sb-row { display: flex; align-items: center; gap: 12px; margin: 11px 0; }
.sb-label { width: 46px; font-weight: 700; color: var(--text-secondary); font-size: .85rem; flex-shrink: 0; }
.sb-track { flex: 1; height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.sb-fill { height: 100%; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.sb-val { width: 66px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; flex-shrink: 0; }

/* ---- share tab: widget type toggle + preview ---- */
.widget-type-toggle { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.wt-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 8px;
  border: 1px solid var(--border-color); background: var(--surface-2); color: var(--text-secondary);
  cursor: pointer; font-weight: 600; font-size: .85rem; font-family: inherit; transition: all .2s;
}
.wt-btn .material-icons { font-size: 17px; }
.wt-btn:hover { color: var(--text-primary); border-color: var(--border-color); }
.wt-btn.active { background: rgba(245, 166, 35, 0.12); border-color: rgba(245, 166, 35, 0.4); color: var(--primary-color); }
.widget-preview {
  display: flex; justify-content: center; align-items: center;
  padding: 22px 18px; margin: 0 auto;
  background: var(--surface-2); border-radius: 14px; border: 1px solid var(--border-soft);
  background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 14px 14px;
}
/* inline preview card (no iframe → never clipped/squeezed) */
.wcard {
  position: relative; width: 100%; max-width: 320px; overflow: hidden;
  background: linear-gradient(150deg, #1e222b, #161a21); border: 1px solid var(--border-color);
  border-radius: 16px; padding: 15px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}
.wcard::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); }
.wc-top { display: flex; align-items: center; gap: 12px; }
.wc-av { width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); color: #1a1205; font-weight: 900; font-size: 1.35rem; }
.wc-who { min-width: 0; flex: 1; }
.wc-nm { font-weight: 800; font-size: 1.05rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-rg { color: var(--text-muted); font-size: .8rem; margin-top: 2px; }
.wc-rg b { color: var(--primary-color); font-weight: 700; }
.wc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.wc-st { background: var(--surface-3); border: 1px solid var(--border-color); border-radius: 11px; padding: 9px 4px; text-align: center; overflow: hidden; }
.wc-st b { display: block; font-size: .98rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-st span { color: var(--text-muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.wc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--border-color); font-size: .72rem; color: var(--text-muted); }
.wc-logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-primary); }
.wc-logo i { width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); display: inline-grid; place-items: center; color: #1a1205; font-size: .6rem; font-weight: 900; font-style: normal; }

/* ---- home refinements ---- */
.feature .fi .material-icons { font-size: 26px; }
.tagline .material-icons { font-size: 16px; }
.hero-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; }
.hero-hint .material-icons { font-size: 18px; color: var(--text-muted); }
.btn-ghost .material-icons { font-size: 18px; margin-left: -2px; }
.feature-grid { gap: 16px; }
/* consistent card hover on feature */
.feature { cursor: default; }
.feature:hover { border-color: rgba(245, 166, 35, 0.28); }

/* page enter transition (like r6data) — opacity only, no layout shift */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
body > main { animation: pageIn .28s ease-out; }
/* tighter, more designed vertical rhythm */
.hero { padding: 60px 0 34px; }
.section:first-of-type { padding-top: 20px; }
.tagline .material-icons { margin-left: -2px; }
/* nav brand logo crisper */
.brand .logo { letter-spacing: 0; }
/* disabled buttons */
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---- leaderboard / list grid animation ----
   Opacity-only (no transform) so animating rows never overflow the container
   and never cause a transient scrollbar. */
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
#lbBody table, #topTracked table { animation: lbFade .28s ease-out; }
#lbBody tbody tr, #topTracked tbody tr { animation: lbFade .4s ease-out both; }
#lbBody tbody tr:nth-child(1),  #topTracked tbody tr:nth-child(1)  { animation-delay: .02s; }
#lbBody tbody tr:nth-child(2),  #topTracked tbody tr:nth-child(2)  { animation-delay: .05s; }
#lbBody tbody tr:nth-child(3),  #topTracked tbody tr:nth-child(3)  { animation-delay: .08s; }
#lbBody tbody tr:nth-child(4),  #topTracked tbody tr:nth-child(4)  { animation-delay: .11s; }
#lbBody tbody tr:nth-child(5),  #topTracked tbody tr:nth-child(5)  { animation-delay: .14s; }
#lbBody tbody tr:nth-child(6),  #topTracked tbody tr:nth-child(6)  { animation-delay: .17s; }
#lbBody tbody tr:nth-child(7),  #topTracked tbody tr:nth-child(7)  { animation-delay: .20s; }
#lbBody tbody tr:nth-child(8),  #topTracked tbody tr:nth-child(8)  { animation-delay: .23s; }
#lbBody tbody tr:nth-child(9),  #topTracked tbody tr:nth-child(9)  { animation-delay: .26s; }
#lbBody tbody tr:nth-child(10), #topTracked tbody tr:nth-child(10) { animation-delay: .29s; }
#lbBody tbody tr:nth-child(n+11) { animation-delay: .32s; }
/* leaderboard tab pills smoother */
#lbTabs .tab { border: 1px solid transparent; border-radius: 8px 8px 0 0; }
#lbTabs .tab.active { background: rgba(245, 166, 35, 0.08); }
@media (prefers-reduced-motion: reduce) {
  #lbBody tbody tr, #topTracked tbody tr, #lbBody table, #topTracked table { animation: none !important; }
}

/* ==========================================================================
   Final polish layer — micro-details
   ========================================================================== */
/* thin styled scrollbars for inner scroll areas */
.table-wrap::-webkit-scrollbar, .search-results::-webkit-scrollbar, .tabs::-webkit-scrollbar { height: 8px; width: 8px; }
.table-wrap::-webkit-scrollbar-thumb, .search-results::-webkit-scrollbar-thumb, .tabs::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 4px; }
.table-wrap, .search-results, .tabs { scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }

/* primary CTA glow (r6data-style) */
.btn-primary { box-shadow: 0 4px 14px rgba(245, 166, 35, .22); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(245, 166, 35, .32); }

/* clickable rows: left accent inset on hover */
tbody tr.clickable:hover { box-shadow: inset 3px 0 0 var(--primary-color); }

/* tabs with icons */
.tab { display: inline-flex; align-items: center; gap: 7px; border-radius: 8px 8px 0 0; }
.tab .material-icons { font-size: 18px; }
.tab.active { background: rgba(245, 166, 35, .08); }

/* colored medal dots (replace emoji) */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.dot.g { background: var(--gold); } .dot.s { background: var(--silver); } .dot.b { background: var(--bronze); }

/* notices with leading icon */
.notice { display: flex; align-items: flex-start; gap: 10px; }
.notice .material-icons { font-size: 19px; flex-shrink: 0; margin-top: 1px; }

/* leaderboard pager */
#lbPager { display: flex; align-items: center; justify-content: center; gap: 14px; }
#lbPager .btn .material-icons { font-size: 18px; }

/* richer multi-column footer */
.site-footer { padding: 0; margin-top: 60px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 38px 16px 28px; max-width: var(--maxw); margin: 0 auto; }
.footer-brand .brand { font-size: 1.15rem; }
.footer-brand p { color: var(--text-secondary); font-size: .88rem; margin-top: 12px; max-width: 340px; line-height: 1.6; }
.footer-col h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: 12px; font-weight: 700; }
.footer-col a { display: block; color: var(--text-secondary); font-size: .9rem; padding: 4px 0; }
.footer-col a:hover { color: var(--primary-color); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--divider-color); }
.footer-bottom > div { max-width: var(--maxw); margin: 0 auto; padding: 15px 16px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--text-muted); font-size: .8rem; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: 24px; } }

/* accent stat card: gradient value */
.stat-card.accent .value { background: linear-gradient(90deg, var(--primary-light), var(--accent-color)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* input hover affordance */
input:hover, select:hover { border-color: rgba(255, 255, 255, .18); }

/* profile hero panel flair */
#profileHero.panel { background: linear-gradient(160deg, rgba(245, 166, 35, .06), transparent 45%), var(--surface-color); }
