:root {
  --bg: #07080b;
  --panel: rgba(14, 16, 22, 0.82);
  --panel2: rgba(14, 16, 22, 0.65);
  --text: #e9ecf1;
  --muted: rgba(233, 236, 241, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --line2: rgba(255, 255, 255, 0.14);

  --red: #e10600;
  --red2: #ff2a2a;

  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --radius: 18px;
  --max: 1180px;
  --font:
    "Barlow", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --focus: 0 0 0 4px rgba(225, 6, 0, 0.22);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background:
    radial-gradient(
      900px 500px at 18% 12%,
      rgba(225, 6, 0, 0.25),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 86% 18%,
      rgba(255, 42, 42, 0.15),
      transparent 60%
    ),
    linear-gradient(180deg, #05060a, #07080b 65%, #05060a);
  color: var(--text);
  font-family: var(--font);
}

a {
  color: inherit;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.22;
  pointer-events: none;
  mask-image: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.9),
    transparent 70%
  );
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(7, 8, 11, 0.72);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand__badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--red2));
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(225, 6, 0, 0.25);
  letter-spacing: 0.3px;
}
.brand__title {
  font-weight: 800;
  letter-spacing: 0.2px;
}
.brand__subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* Nav */
.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav__btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.15px;
}
.nav__btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
}
.nav__btn:focus {
  outline: none;
  box-shadow: var(--focus);
}
.nav__btn.is-active {
  background: linear-gradient(
    135deg,
    rgba(225, 6, 0, 0.28),
    rgba(255, 42, 42, 0.1)
  );
  border-color: rgba(225, 6, 0, 0.55);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 22px 0 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(225, 6, 0, 0.45);
  background: rgba(225, 6, 0, 0.12);
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.35px;
  font-size: 12px;
}

.hero__title {
  font-size: 44px;
  margin: 12px 0 10px;
  line-height: 1.05;
  letter-spacing: 0.2px;
}
.hero__desc {
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 14px;
  line-height: 1.5;
}

.hero__stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 16px;
}
.stat {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  min-width: 170px;
}
.stat__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.stat__value {
  font-size: 18px;
  font-weight: 900;
  margin-top: 2px;
}

.hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 11px 14px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.btn:focus {
  outline: none;
  box-shadow: var(--focus);
}
.btn--primary {
  background: linear-gradient(135deg, var(--red), var(--red2));
  border-color: rgba(225, 6, 0, 0.55);
}
.btn--primary:hover {
  filter: brightness(1.02);
}
.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card--glow {
  border-color: rgba(225, 6, 0, 0.35);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(225, 6, 0, 0.2);
}
.card__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.card__title {
  font-weight: 1000;
  letter-spacing: 0.2px;
}
.card__hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

/* Podium */
.podium {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.podiumRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.podiumLeft {
  display: flex;
  gap: 10px;
  align-items: center;
}
.podiumRank {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(225, 6, 0, 0.16);
  border: 1px solid rgba(225, 6, 0, 0.45);
  font-weight: 1000;
}
.podiumName {
  font-weight: 1000;
}
.podiumMeta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.podiumPts {
  font-weight: 1000;
}

/* Views */
.views {
  padding: 10px 0 26px;
}
.view {
  display: none;
}
.view.is-active {
  display: block;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}

/* Tables */
.tableWrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px; /* keeps columns readable on mobile */
}
.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.table th {
  position: sticky;
  top: 0;
  background: rgba(14, 16, 22, 0.96);
  backdrop-filter: blur(10px);
  z-index: 5;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Chips */
.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 1000;
  font-size: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.badge--red {
  border-color: rgba(225, 6, 0, 0.5);
  background: rgba(225, 6, 0, 0.12);
}

/* Results controls */
.controls {
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}
.control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.control--hint {
  margin-left: auto;
}
.label {
  color: var(--muted);
  font-weight: 1000;
  font-size: 12px;
}
.select,
.input {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  outline: none;
  min-width: 220px;
}
.select:focus,
.input:focus {
  border-color: rgba(225, 6, 0, 0.45);
  box-shadow: var(--focus);
}

.hintPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}

/* Text blocks */
.muted {
  color: var(--muted);
  padding: 14px 16px;
  line-height: 1.55;
}
.footnote {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* Footer */
.footer {
  padding: 18px 0 30px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* -------------------- */
/* MOBILE RESPONSIVE    */
/* -------------------- */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Swipeable nav tabs */
  .nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .nav::-webkit-scrollbar {
    height: 6px;
  }
  .nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
  }
  .nav__btn {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .hero {
    padding: 16px 0 10px;
    gap: 14px;
  }
  .hero__title {
    font-size: 32px;
  }
  .hero__desc {
    font-size: 14px;
  }
  .stat {
    min-width: 145px;
  }

  .controls {
    gap: 12px;
  }
  .select,
  .input {
    min-width: 180px;
  }
  .control--hint {
    margin-left: 0;
  }
}

.brand__badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
}

.brand__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.hide-hero .hero {
  display: none;
}

.views {
  scroll-margin-top: 90px;
}
.view {
  scroll-margin-top: 90px;
}

/* Calendar table: allow fit on mobile */
#calendarTable {
  min-width: 0;
}
#calendarTable th,
#calendarTable td {
  white-space: normal;
}

.hero--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 980px) {
  .hero--3 {
    grid-template-columns: 1fr;
  }
}

.heroMeta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
}

.metaPill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
}

.metaPill__label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.2px;
}

.metaPill__value {
  font-size: 14px;
  font-weight: 1000;
}

.metaPill--muted {
  border-color: rgba(225, 6, 0, 0.25);
  background: rgba(225, 6, 0, 0.08);
}

@media (max-width: 640px) {
  .heroMeta {
    gap: 8px;
  }
  .metaPill {
    padding: 9px 10px;
  }
}
