:root {
  --bg: #0b0d10;
  --panel: #12161b;
  --panel-2: #191f26;
  --line: #29313a;
  --text: #f5f7f9;
  --muted: #98a4b1;
  --accent: #f2b233;
  --accent-2: #ffd56b;
  --danger: #ff6b6b;
  --success: #56d394;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: radial-gradient(circle at top right, #1b2026 0, var(--bg) 28rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
code { background: #080a0c; border: 1px solid var(--line); padding: .12rem .35rem; border-radius: .3rem; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(11,13,16,.9); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.nav { min-height: 70px; display: flex; align-items: center; gap: 28px; }
.brand { margin-right: auto; font-weight: 950; letter-spacing: -.045em; font-size: 1.45rem; }
.brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 9px 12px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: .92rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--panel-2); }
.hero { padding: 70px 0 38px; }
.eyebrow { color: var(--accent); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: .77rem; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: .94; letter-spacing: -.065em; margin: 10px 0 18px; max-width: 850px; }
.hero p { max-width: 680px; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card { background: linear-gradient(180deg, rgba(25,31,38,.96), rgba(18,22,27,.96)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.card-pad { padding: 22px; }
.card h2, .section-title { margin: 0; letter-spacing: -.035em; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 26px 0 36px; }
.stat { background: var(--panel); border: 1px solid var(--line); padding: 18px; border-radius: 14px; }
.stat .label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; font-size: .72rem; }
.stat .value { font-size: 1.8rem; font-weight: 950; margin-top: 5px; letter-spacing: -.04em; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 22px 0 12px; }
.section-head p { margin: 0; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; background: #0f1216; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.025); }
.rank { font-size: 1.05rem; font-weight: 950; }
.driver-link, .race-link { font-weight: 850; }
.driver-link:hover, .race-link:hover { color: var(--accent); }
.muted { color: var(--muted); }
.rating { font-weight: 900; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #2a2415; border: 1px solid #58461c; color: var(--accent-2); font-weight: 850; font-size: .75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 15px; border: 1px solid #72561e; color: #120d04; background: var(--accent); border-radius: 9px; font-weight: 900; cursor: pointer; }
.button:hover { filter: brightness(1.08); }
.button.secondary { color: var(--text); border-color: var(--line); background: var(--panel-2); }
.button.danger { color: white; background: #8b2d2d; border-color: #b54444; }
.page { padding: 42px 0 70px; }
.page-title { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.page-title h1 { font-size: clamp(2.2rem, 5vw, 4rem); margin: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
input, select, textarea {
  width: 100%; background: #0d1014; color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(242,178,51,.24); border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-field label { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 850; margin: 0 0 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.notice { padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; margin: 14px 0; color: var(--muted); background: #101419; }
.notice.success { border-color: #24573f; color: #a8ebca; }
.notice.error { border-color: #6a2f2f; color: #ffaaaa; }
.empty-state { text-align: center; padding: 70px 24px; border: 1px dashed var(--line); border-radius: 16px; background: rgba(18,22,27,.6); }
.empty-state h2 { margin-top: 0; font-size: 1.8rem; }
.empty-state p { color: var(--muted); max-width: 640px; margin: 0 auto 18px; line-height: 1.65; }
.loading { color: var(--muted); padding: 30px; text-align: center; }
.topline { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); }
.topline strong { color: var(--text); }
.profile-hero { padding: 26px; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; }
.profile-hero h1 { margin: 4px 0 10px; font-size: clamp(2.4rem,6vw,4.5rem); }
.big-rank { font-size: 4.8rem; line-height: .9; font-weight: 950; letter-spacing: -.08em; color: var(--accent); }
.steps { counter-reset: step; display: grid; gap: 14px; }
.step { counter-increment: step; display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; }
.step::before { content: counter(step); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #171008; font-weight: 950; }
.step h3 { margin: 4px 0 5px; }
.step p { color: var(--muted); margin: 0; line-height: 1.55; }
pre { overflow: auto; background: #090b0e; border: 1px solid var(--line); padding: 15px; border-radius: 10px; color: #d8e1ea; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); padding: 28px 0 50px; font-size: .88rem; }
@media (max-width: 760px) {
  .nav { align-items: flex-start; padding: 15px 0; flex-direction: column; gap: 10px; }
  .brand { margin-right: 0; }
  .nav-links { width: 100%; overflow-x: auto; }
  .hero { padding-top: 45px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .profile-hero { grid-template-columns: 1fr; }
  .big-rank { font-size: 3.2rem; }
}
