* {
  box-sizing: border-box;
}

:root {
  --red: #ff2b2b;
  --black: #07070a;
  --dark: #15151b;
  --card: #ffffff;
  --soft: #f4f4f6;
  --text: #111116;
  --muted: #666675;
  --border: rgba(0, 0, 0, 0.08);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 43, 43, 0.28), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #f6f6f8 48%, #111116 48%, #050507 100%);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  background: #000;
  border-radius: 20px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
}

.motogpLogo {
  width: 150px;
  height: auto;
  display: block;
}

.livePill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111116;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.livePill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
}

.screen {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.appMenu {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 0 16px;
  backdrop-filter: blur(18px);
}

.appMenu button {
  border: 1px solid var(--border);
  background: #ffffff;
  color: #111116;
  border-radius: 999px;
  padding: 13px 8px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.appMenu button.active {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

.raceHero,
.panel,
.emptyState {
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 43, 43, 0.12), transparent 38%),
    #ffffff;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.08);
}

.raceHero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.eyebrow {
  color: var(--red);
  font-weight: 1000;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
  color: var(--muted);
}

.raceMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.raceMeta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #111116;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.lapBox {
  min-width: 118px;
  text-align: center;
  background: var(--red);
  color: #ffffff;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(255, 43, 43, 0.24);
}

.lapBox span {
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.lapBox strong {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.lapProgress {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.lapProgressInfo {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.lapProgressInfo strong {
  color: var(--text);
}

.lapTrack {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  overflow: visible;
}

.lapFill {
  position: relative;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #111116, var(--red));
  transition: width 0.8s ease;
}

.lapDot {
  position: absolute;
  top: 50%;
  right: -7px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--red);
  box-shadow: 0 0 20px rgba(255, 43, 43, 0.8);
}

.leaderCard {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: #111116;
  color: #ffffff;
  margin-bottom: 16px;
}

.leaderCard p {
  color: #d9d9df;
}

.leaderAvatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 1000;
  font-size: 24px;
}

.battleZone {
  margin-bottom: 16px;
}

.sectionTitle {
  margin-bottom: 10px;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.podiumCard {
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  min-height: 96px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.podiumCard span {
  color: var(--red);
  font-weight: 1000;
  font-size: 13px;
}

.podiumCard strong {
  display: block;
  font-size: 26px;
  margin: 4px 0;
}

.podiumCard p {
  color: var(--text);
  font-weight: 800;
}

.podiumCard small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.alerts {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.alert {
  padding: 13px 15px;
  background: #111116;
  color: #ffffff;
  border-radius: 16px;
  display: grid;
  gap: 4px;
  border-left: 5px solid var(--red);
}

.alert strong {
  color: #ffffff;
  font-size: 12px;
}

.alert span {
  color: #eeeeee;
}

.smartAlert {
  animation: alertPulse 1.8s ease-in-out infinite;
}

@keyframes alertPulse {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-1px);
  }
}

.classification,
.standingsTable,
.scheduleList {
  display: grid;
  gap: 10px;
}

.rider,
.standingRow {
  display: grid;
  grid-template-columns: 48px 1fr 48px auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.055);
  transition: transform 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.rider:hover {
  transform: translateX(3px);
}

.riderAvatar,
.standingPos {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 1000;
  background: #111116;
  color: #ffffff;
}

.info {
  display: grid;
  gap: 4px;
}

.info strong {
  font-size: 16px;
}

.info span {
  color: var(--muted);
  font-size: 13px;
}

.info small {
  color: #888899;
  font-size: 12px;
}

.gap {
  text-align: right;
  display: grid;
  gap: 4px;
  min-width: 76px;
}

.gap strong {
  font-size: 17px;
}

.gap span {
  color: var(--muted);
  font-size: 13px;
}

.movementTag {
  min-width: 42px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f0f0f2;
  color: #111116;
  text-align: center;
  font-size: 12px;
  font-weight: 1000;
}

.riderOut {
  opacity: 0.52;
}

.riderOut .riderAvatar {
  background: #3a3a45 !important;
  color: #ffffff !important;
  font-size: 11px;
}

.movedUp {
  border-color: rgba(0, 180, 90, 0.55);
  animation: moveUpFlash 1.2s ease;
}

.movedDown {
  border-color: rgba(255, 43, 43, 0.55);
  animation: moveDownFlash 1.2s ease;
}

@keyframes moveUpFlash {
  0% {
    transform: translateY(8px);
    background: rgba(0, 180, 90, 0.12);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes moveDownFlash {
  0% {
    transform: translateY(-8px);
    background: rgba(255, 43, 43, 0.14);
  }

  100% {
    transform: translateY(0);
  }
}

.pointsBox {
  min-width: 74px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--red);
  color: #ffffff;
  text-align: center;
}

.pointsBox strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.pointsBox span {
  display: block;
  font-size: 11px;
  font-weight: 900;
}

.selectBox {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  border-radius: 16px;
  padding: 14px;
  font-size: 16px;
}

.loadingBox {
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--border);
}

.error {
  padding: 16px;
  border-radius: 16px;
  background: #3b1212;
  color: #ffd1d1;
}

.scheduleEvent {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.07);
}

.scheduleHeader {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 43, 43, 0.12), transparent 40%),
    #ffffff;
}

.countryBadge {
  max-width: 130px;
  padding: 9px 11px;
  border-radius: 999px;
  background: #111116;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.sessionList {
  display: grid;
}

.sessionRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.sessionRow strong {
  display: block;
}

.sessionRow span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.timeBoxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 8px;
}

.timeBox {
  padding: 10px;
  border-radius: 14px;
  background: #f2f2f4;
}

.timeBox small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 900;
  margin-bottom: 4px;
}

.timeBox strong {
  font-size: 13px;
}

.timeBox.argentina {
  background: #111116;
  color: #ffffff;
}

.timeBox.argentina small {
  color: #cfcfd7;
}

.emptySchedule {
  padding: 18px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.riderPhoto,
.leaderPhoto {
  object-fit: cover;
  background: #2a2a34;
}

.riderPhoto {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.leaderPhoto {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at top right, rgba(255, 43, 43, 0.25), transparent 28%),
      linear-gradient(160deg, #ffffff 0%, #f6f6f8 58%, #0a0a0d 58%, #050507 100%);
  }

  .topbar {
    padding: 12px;
  }

  .brand {
    padding: 9px 12px;
    border-radius: 16px;
  }

  .motogpLogo {
    width: 110px;
  }

  .appMenu {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .appMenu button {
    font-size: 11px;
    padding: 11px 4px;
  }

  .raceHero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .lapBox {
    width: 100%;
  }

  .podium {
    grid-template-columns: 1fr;
  }

  .rider,
  .standingRow {
    grid-template-columns: 44px 1fr 42px;
  }

  .gap {
    grid-column: 2 / 4;
    text-align: left;
  }

  .movementTag {
    grid-column: 3;
    grid-row: 1;
  }

  .scheduleHeader {
    grid-template-columns: 1fr;
  }

  .countryBadge {
    max-width: none;
    width: fit-content;
  }

  .sessionRow {
    grid-template-columns: 1fr;
  }

  .timeBoxes {
    grid-template-columns: 1fr;
  }
}
.eventDateBig {
  margin: 8px 0 8px;
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -0.04em;
  color: #111116;
}

.riderPhoto,
.leaderPhoto {
  object-position: center top;
  background:
    linear-gradient(135deg, rgba(255, 43, 43, 0.18), transparent),
    #111116;
}

.riderPhoto {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.leaderPhoto {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.podium {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.podiumCard {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 43, 43, 0.13), transparent 42%),
    #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.1);
}

.podiumCard::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -45px;
  width: 140px;
  height: 140px;
  background: #111116;
  transform: rotate(-18deg);
  opacity: 0.08;
}

.podiumCard.p1 {
  background:
    linear-gradient(145deg, rgba(255, 43, 43, 0.22), transparent 42%),
    linear-gradient(135deg, #ffffff, #fff4f4);
  min-height: 210px;
  transform: translateY(-8px);
}

.podiumCard span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 32px;
  border-radius: 999px;
  background: #ff2b2b;
  color: #ffffff;
  font-size: 15px;
  font-weight: 1000;
  margin-bottom: 14px;
}

.podiumCard strong {
  display: block;
  font-size: clamp(36px, 7vw, 58px);
  line-height: 0.9;
  margin-bottom: 12px;
  letter-spacing: -0.06em;
}

.podiumCard p {
  font-size: clamp(22px, 4vw, 34px);
  line-height: 0.95;
  font-weight: 1000;
  color: #111116;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.podiumCard small {
  display: inline-flex;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #111116;
  color: #ffffff;
  font-size: 15px;
  font-weight: 1000;
}

.riderPhoto {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  object-fit: cover;
  object-position: center top;
  background: #111116;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.leaderPhoto {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  object-fit: cover;
  object-position: center top;
  background: #111116;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.rider {
  grid-template-columns: 62px 1fr 48px auto;
}

.leaderCard {
  grid-template-columns: auto 1fr;
}

.resultTabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.resultTabs button {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: #111116;
  border-radius: 999px;
  padding: 13px 10px;
  font-size: 15px;
  font-weight: 1000;
  cursor: pointer;
}

.resultTabs button.active {
  background: #ff2b2b;
  color: #ffffff;
  border-color: #ff2b2b;
}

@media (max-width: 640px) {
  .podium {
    grid-template-columns: 1fr;
  }

  .podiumCard,
  .podiumCard.p1 {
    min-height: 150px;
    transform: none;
  }

  .podiumCard strong {
    font-size: 44px;
  }

  .podiumCard p {
    font-size: 26px;
  }

  .rider {
    grid-template-columns: 58px 1fr 42px;
  }

  .gap {
    grid-column: 2 / 4;
    text-align: left;
  }
}

.categorySwitch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 10px;
}

.categorySwitch button {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: #111116;
  border-radius: 999px;
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.055);
}

.categorySwitch button.active {
  background: #111116;
  color: #ffffff;
  border-color: #111116;
}

@media (max-width: 640px) {
  .categorySwitch {
    gap: 6px;
  }

  .categorySwitch button {
    padding: 10px 6px;
    font-size: 12px;
  }
}
