:root {
  --bg: #090b10;
  --panel: #11151d;
  --panel2: #171c25;
  --text: #f6f7fb;
  --muted: #98a1af;
  --line: #252c38;
  --accent: #ffce00;
  --green: #2fd17b;
  --red: #ff5c68;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(255,206,0,.08), transparent 28rem),
    var(--bg);
}

.screen {
  width: min(1500px, 96vw);
  margin: 0 auto;
  padding: 3vh 0 2vh;
}

.topbar, .hero, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 1000;
  letter-spacing: -3px;
  background: var(--accent);
  color: #080808;
}

.eyebrow {
  color: var(--muted);
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 800;
  letter-spacing: .18em;
}

h1, h2 {
  margin: 0;
  line-height: 1;
}

h1 {
  margin-top: 6px;
  font-size: clamp(26px, 3vw, 46px);
}

.hero {
  padding: 28px 0 20px;
}

.hero h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 62px);
  letter-spacing: -.035em;
}

.race-info {
  padding: 10px 16px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
}

.status-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(255,206,0,.1);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(47,209,123,.1);
}

.status-dot.error {
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(255,92,104,.1);
}

.status-text { font-weight: 800; }
.last-update { color: var(--muted); font-size: 13px; margin-top: 3px; }

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(17,21,29,.94);
}

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th {
  padding: 16px 18px;
  color: var(--muted);
  font-size: clamp(11px, .9vw, 14px);
  letter-spacing: .08em;
  text-align: left;
  background: var(--panel2);
}

td {
  padding: clamp(14px, 1.5vw, 24px) 18px;
  border-top: 1px solid var(--line);
  font-size: clamp(17px, 2vw, 31px);
}

td.pos {
  width: 95px;
  font-size: clamp(22px, 2.5vw, 38px);
  font-weight: 1000;
}

.driver { font-weight: 900; }
.time { font-variant-numeric: tabular-nums; font-weight: 1000; }
.gap { color: var(--muted); font-variant-numeric: tabular-nums; }
.kart { font-weight: 900; }

tr.top1 td { background: rgba(255,206,0,.08); }
tr.top1 .pos { color: var(--accent); }

footer {
  padding: 18px 4px 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .05em;
}

@media (max-width: 720px) {
  .screen { width: 94vw; }
  .topbar, .hero { align-items: flex-start; }
  .status-wrap { text-align: left; }
  .topbar { flex-direction: column; }
  .hero { flex-direction: column; }
}
