:root {
  --bg: #060b12;
  --panel: rgba(9, 16, 27, 0.86);
  --panel-strong: rgba(12, 20, 35, 0.96);
  --line: rgba(90, 140, 255, 0.34);
  --line-strong: rgba(68, 131, 255, 0.75);
  --text: #f4f7ff;
  --muted: #a0b0d2;
  --accent: #3b76ff;
  --accent-2: #ffb300;
  --shadow: 0 30px 88px rgba(0, 0, 0, 0.52);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 118, 255, 0.22), transparent 28%),
    radial-gradient(circle at 80% 15%, rgba(255, 179, 0, 0.13), transparent 20%),
    radial-gradient(circle at 50% 90%, rgba(59, 118, 255, 0.16), transparent 24%),
    linear-gradient(180deg, #050a12 0%, #0a1220 45%, #050a12 100%);
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(59, 118, 255, 0.16), transparent 26%),
    radial-gradient(circle at 84% 16%, rgba(255, 179, 0, 0.11), transparent 18%),
    radial-gradient(circle at 50% 92%, rgba(59, 118, 255, 0.12), transparent 22%);
  pointer-events: none;
}

.backdrop {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(10, 16, 28, 0.45), rgba(3, 6, 12, 0.75)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 4px
    );
  pointer-events: none;
}

.poster-shell {
  width: min(1360px, calc(100vw - 32px));
  margin: 18px auto 34px;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(220px, 1fr);
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-left {
  justify-self: start;
  min-width: 0;
}

.hero-center {
  justify-self: center;
  text-align: center;
  min-width: 0;
}

.hero-right {
  justify-self: end;
}

.hero-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 20px;
  min-width: 0;
}

.hero-logo {
  width: clamp(280px, 33vw, 460px);
  height: clamp(84px, 8.4vw, 128px);
  max-width: none;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.42));
  flex-shrink: 0;
  overflow: visible;
}

.hero-logo-png {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transform: translateY(8px) scale(1.02);
  transform-origin: center;
}

.hero-copy {
  max-width: none;
  min-width: 0;
}

.eyebrow,
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #8eb0ff;
  font-size: 12px;
  font-weight: 800;
}

.hero h1 {
  margin: 8px 0 8px;
  font-family: 'Anton', sans-serif;
  font-size: clamp(44px, 5.6vw, 80px);
  line-height: 0.94;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 640px;
}

.hero-badge {
  padding: 14px 18px;
  border: 1px solid rgba(90, 140, 255, 0.42);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 27, 45, 0.94), rgba(7, 11, 20, 0.94));
  box-shadow: var(--shadow);
  text-align: right;
  min-width: 180px;
}

.hero-badge span,
.hero-badge strong {
  display: block;
}

.hero-badge span {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.hero-badge strong {
  font-size: 16px;
}

.badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.board-card {
  background: linear-gradient(180deg, rgba(12, 18, 30, 0.97), rgba(8, 14, 24, 0.94));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.board-header h2 {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.refresh-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(59, 118, 255, 0.16);
  border: 1px solid rgba(59, 118, 255, 0.32);
  color: var(--muted);
  font-size: 13px;
}

.refresh-pill span {
  color: #fff;
  font-weight: 700;
}

.board-frame {
  border: 2px solid var(--line-strong);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 18, 29, 0.92), rgba(8, 12, 20, 0.96)),
    radial-gradient(circle at 20% 0%, rgba(59, 118, 255, 0.08), transparent 26%);
}

.fullscreen-view .backdrop {
  background:
    linear-gradient(135deg, rgba(10, 16, 28, 0.4), rgba(3, 6, 12, 0.7)),
    radial-gradient(circle at 50% 15%, rgba(59, 118, 255, 0.25), transparent 20%);
}

.fullscreen-shell {
  width: min(1600px, calc(100vw - 32px));
  margin: 16px auto 26px;
  position: relative;
  z-index: 1;
}

.fullscreen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.brand-lockup {
  display: flex;
  align-items: end;
  gap: 22px;
}

.brand-logo {
  width: clamp(360px, 44vw, 660px);
  height: clamp(96px, 9.8vw, 152px);
  max-width: none;
  overflow: visible;
}

.brand-logo-png {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transform: scale(1.08);
  transform-origin: center;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.4));
}

.hero-badge-large {
  min-width: 220px;
  padding: 18px 20px;
}

.hero-badge-large strong {
  font-size: 18px;
}

.fullscreen-board {
  padding: 26px;
  border-radius: 34px;
  position: relative;
}

.fullscreen-board::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.fullscreen-frame {
  border-width: 3px;
}

.fullscreen-head,
.fullscreen-row {
  grid-template-columns: 136px minmax(240px, 1fr) 220px;
}

.fullscreen-head {
  padding: 16px 22px;
}

.fullscreen-row {
  padding: 18px 22px;
}

.fullscreen-rows .row {
  min-height: 88px;
  padding: 18px 22px;
}

.fullscreen-row .pos {
  font-size: 26px;
}

.fullscreen-row .driver {
  font-size: 18px;
}

.fullscreen-row .lap {
  font-size: 18px;
}

.fullscreen-row .rig,
.fullscreen-row .track,
.fullscreen-row .time {
  font-size: 16px;
}

body.fullscreen-view .poster-shell {
  display: none;
}

body.fullscreen-view {
  overflow: hidden;
}

.board-grid {
  display: grid;
  grid-template-columns: 128px minmax(210px, 1fr) 210px;
  gap: 14px;
  align-items: center;
}

.board-grid-head {
  padding: 14px 42px;
  font-size: 12px;
  color: #d8e4ff;
  background: rgba(34, 72, 143, 0.28);
  border-bottom: 1px solid rgba(73, 114, 190, 0.48);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.board-grid-head span {
  display: block;
  text-align: center;
}

.board-grid-head span:nth-child(2) {
  text-align: center;
}

.board-rows {
  display: flex;
  flex-direction: column;
}

.row {
  padding: 16px 42px;
  border-bottom: 1px solid rgba(76, 105, 153, 0.18);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.015));
  min-height: 72px;
}

.row:nth-child(odd) {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent);
}

.row:last-child {
  border-bottom: 0;
}

.pos {
  font-family: 'Anton', sans-serif;
  font-size: 22px;
  color: #fff;
  text-align: center;
}

.row:nth-child(1) .pos {
  color: #ffd24d;
}

.row:nth-child(2) .pos {
  color: #d6e3f9;
}

.row:nth-child(3) .pos {
  color: #ffad66;
}

.driver {
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  justify-self: stretch;
}

.rig,
.track,
.time {
  color: var(--muted);
  font-size: 14px;
}

.lap {
  color: #ffbf33;
  font-weight: 800;
  font-size: 15px;
  text-align: center;
}

.row.empty {
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
}

.loading,
.error {
  padding: 22px 18px;
  color: var(--muted);
}

.error {
  color: #ff9f9f;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-center {
    justify-self: start;
    text-align: left;
  }

  .hero-right {
    justify-self: start;
  }

  .fullscreen-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .board-grid {
    grid-template-columns: 108px minmax(170px, 1fr) 170px;
  }

  .hero-logo,
  .brand-logo {
    width: clamp(260px, 56vw, 420px);
    height: clamp(82px, 13vw, 120px);
  }

  .hero h1 {
    white-space: normal;
  }
}

@media (max-width: 860px) {
  .board-grid,
  .board-grid-head,
  .row {
    grid-template-columns: 84px 1fr 132px;
  }

  .hero-logo,
  .brand-logo {
    width: clamp(220px, 70vw, 340px);
    height: clamp(72px, 16vw, 104px);
  }
}
