:root {
  --black: #050505;
  --panel: rgba(10, 14, 22, 0.94);
  --panel2: rgba(14, 20, 32, 0.96);
  --white: #f3efe7;
  --muted: #a9b4c3;
  --blue: #1d4ed8;
  --cyan: #38bdf8;
  --yellow: #c9a227;
  --line: rgba(255,255,255,.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(29,78,216,.48), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(56,189,248,.18), transparent 24%),
    linear-gradient(135deg, #02040a 0%, #07111f 44%, #030508 100%);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0%, transparent 46%, rgba(255,255,255,.03) 47%, transparent 49%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 1px, transparent 1px 90px);
  opacity: .65;
}

.dashboard {
  position: relative;
  max-width: 1550px;
  margin: auto;
  padding: 42px 28px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 46px 54px;
  margin-bottom: 26px;
  background:
    linear-gradient(135deg, rgba(5,10,20,.98), rgba(7,35,72,.82)),
    radial-gradient(circle at right, rgba(56,189,248,.18), transparent 35%);
  border: 1px solid rgba(56,189,248,.26);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo {
  width: 320px;
  height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.55));
}

.tag {
  margin: 0 0 10px;
  color: var(--cyan);
  letter-spacing: 4px;
  font-size: 12px;
  font-weight: 900;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 128px);
  line-height: .82;
  letter-spacing: -6px;
  text-transform: uppercase;
}

.subtitle {
  margin: 20px 0 0;
  color: #d8e2ee;
  font-size: 18px;
}

.hero-badge {
  position: relative;
  z-index: 2;
  width: 360px;
  padding: 22px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(4,10,20,.96), rgba(6,20,45,.92));
  border: 1px solid rgba(56,189,248,.22);
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

.hero-badge span {
  display: block;
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 3px;
  font-weight: 900;
  margin-bottom: 8px;
}

.hero-badge strong {
  display: block;
  font-size: 56px;
  line-height: .9;
  white-space: nowrap;
  letter-spacing: -2px;
}

.layout {
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 20px;
  align-items: start;
}

.side {
  display: grid;
  gap: 20px;
  align-content: start;
}

.card {
  background: linear-gradient(180deg, var(--panel2), rgba(4,7,12,.96));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.42);
  backdrop-filter: blur(8px);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.card h2 {
  margin: 0;
  color: var(--cyan);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
}

.card-head span {
  color: var(--muted);
  font-size: 12px;
}

/* CONTADOR */

.next-counter {
  width: 100%;
  margin-bottom: 24px;
  padding: 30px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(56,189,248,.20), rgba(29,78,216,.34)),
    rgba(255,255,255,.04);
  border: 1px solid rgba(56,189,248,.30);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.counter-title {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.counter-race {
  margin-top: 10px;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
}

.counter-date {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  min-width: 470px;
}

.count-unit {
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(2, 10, 24, .55);
  border: 1px solid rgba(56,189,248,.28);
  text-align: center;
}

.count-unit strong {
  display: block;
  font-size: 46px;
  line-height: .9;
  font-weight: 900;
}

.count-unit span {
  display: block;
  margin-top: 8px;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 900;
}

/* CALENDARIO DESPLEGABLE */

.calendar-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gp-dropdown {
  position: relative;
  border-radius: 20px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  transition: .25s ease;
}

.gp-dropdown:hover {
  transform: translateY(-2px);
  border-color: rgba(56,189,248,.34);
}

.gp-dropdown summary {
  cursor: pointer;
  list-style: none;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.gp-dropdown summary::-webkit-details-marker {
  display: none;
}

.gp-dropdown summary::after {
  content: "+";
  color: var(--cyan);
  font-size: 22px;
  font-weight: 900;
}

.gp-dropdown[open] summary::after {
  content: "–";
}

.gp-dropdown.next-race {
  background:
    linear-gradient(135deg, rgba(56,189,248,.20), rgba(29,78,216,.36)),
    rgba(255,255,255,.04);
  border: 1px solid rgba(56,189,248,.76);
  box-shadow:
    0 0 0 1px rgba(56,189,248,.14),
    0 18px 45px rgba(56,189,248,.10);
}

.gp-dropdown.next-race::before {
  content: "PRÓXIMO GP";
  position: absolute;
  top: 10px;
  right: 46px;
  background: var(--cyan);
  color: #02040a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 2;
}

.open-label {
  display: none;
}

.round {
  color: var(--cyan);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 1px;
}

.race-name {
  margin-top: 6px;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
}

.circuit {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.date {
  color: #e8f1fa;
  font-size: 12px;
  margin-top: 9px;
}

.sessions {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px 16px 16px;
  background: rgba(0,0,0,.18);
}

.session-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
}

.session-row:last-child {
  border-bottom: 0;
}

.session-row span {
  color: var(--muted);
}

.session-row strong {
  color: var(--white);
  text-align: right;
}

/* RESULTADOS / STANDINGS */

.last-race {
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(29,78,216,.32), rgba(56,189,248,.12)),
    rgba(255,255,255,.04);
  border: 1px solid rgba(56,189,248,.45);
}

.race {
  position: relative;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
}

.item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 9px 0;
  font-size: 14px;
}

.item:last-child {
  border-bottom: 0;
}

.compact-item {
  padding: 8px 0 !important;
}

.compact-item .name {
  font-size: 14px;
}

.compact-item .team {
  font-size: 11px;
}

.compact-item .points {
  font-size: 13px;
}

.pos {
  color: var(--cyan);
  font-weight: 900;
  font-size: 18px;
}

.name {
  font-weight: 800;
}

.team {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.points {
  font-weight: 900;
  white-space: nowrap;
}

.race-time {
  color: #d8e2ee;
  font-size: 12px;
  margin-top: 3px;
}

.podium {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.podium-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(56,189,248,.22);
  background: rgba(255,255,255,.045);
}

.podium-1 {
  border-color: rgba(201,162,39,.75);
  background: linear-gradient(135deg, rgba(201,162,39,.20), rgba(29,78,216,.16));
}

.podium-2 {
  background: linear-gradient(135deg, rgba(180,190,205,.16), rgba(29,78,216,.12));
}

.podium-3 {
  background: linear-gradient(135deg, rgba(150,92,40,.18), rgba(29,78,216,.12));
}

.podium-pos {
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
}

.results-dropdown {
  margin-top: 10px;
}

.results-dropdown summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(56,189,248,.11);
  border: 1px solid rgba(56,189,248,.28);
  color: var(--white);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
}

.results-dropdown summary::-webkit-details-marker {
  display: none;
}

.results-dropdown summary::after {
  content: " +";
  float: right;
  color: var(--cyan);
}

.results-dropdown[open] summary::after {
  content: " –";
}

.standings-card {
  max-height: 680px;
  overflow: auto;
}

.constructors-card {
  max-height: 420px;
  overflow: auto;
}

.card::-webkit-scrollbar,
.standings-card::-webkit-scrollbar,
.constructors-card::-webkit-scrollbar {
  width: 8px;
}

.card::-webkit-scrollbar-thumb,
.standings-card::-webkit-scrollbar-thumb,
.constructors-card::-webkit-scrollbar-thumb {
  background: rgba(56,189,248,.35);
  border-radius: 999px;
}

.loading {
  color: var(--muted);
}

/* MOBILE */

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

  .calendar-list {
    grid-template-columns: 1fr;
  }

  .standings-card,
  .constructors-card {
    max-height: none;
  }

  .next-counter {
    display: block;
  }

  .countdown-grid {
    margin-top: 22px;
    min-width: 0;
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 700px) {
  .dashboard {
    padding: 20px 12px;
  }

  .hero {
    padding: 30px 22px;
    display: block;
  }

  .brand {
    display: block;
  }

  .logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
  }

  .hero-badge {
    margin-top: 24px;
    width: 100%;
  }

  .hero-badge strong {
    font-size: 44px;
  }

  h1 {
    letter-spacing: -3px;
  }

  .next-counter {
    padding: 24px;
  }

  .counter-race {
    font-size: 28px;
  }

  .countdown-grid {
    margin-top: 22px;
    grid-template-columns: repeat(2, 1fr);
  }

  .count-unit strong {
    font-size: 38px;
  }

  .session-row {
    display: block;
  }

  .session-row strong {
    display: block;
    margin-top: 4px;
    text-align: left;
  }

  .live-card {
  border-color: rgba(56,189,248,.25);
}

.live-session {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 18px;

  background:
    linear-gradient(
      135deg,
      rgba(56,189,248,.14),
      rgba(29,78,216,.22)
    );

  border: 1px solid rgba(56,189,248,.25);
}

.live-session strong {
  display: block;
  font-size: 15px;
}

.live-session span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #22c55e;

  box-shadow:
    0 0 18px rgba(34,197,94,.85);
}

.live-top3 {
  display: grid;
  gap: 10px;
}

.live-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;

  gap: 12px;
  align-items: center;

  padding: 14px;

  border-radius: 18px;

  background: rgba(255,255,255,.045);

  border: 1px solid rgba(56,189,248,.22);
}

.live-pos {
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
}

.live-time {
  font-weight: 900;
  white-space: nowrap;
}

.live-empty {
  padding: 16px;

  border-radius: 18px;

  background: rgba(255,255,255,.04);

  border: 1px solid rgba(255,255,255,.08);
}

.live-empty strong {
  display: block;
  font-size: 15px;
}

.live-empty span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
}
.calendar-list {
  align-items: start;
}

.gp-dropdown {
  align-self: start;
}

.gp-dropdown:not([open]) {
  height: auto;
}

.sessions {
  display: grid;
  gap: 10px;
  padding: 16px;
  background:
    linear-gradient(
      180deg,
      rgba(2, 10, 24, .45),
      rgba(2, 10, 24, .75)
    );
}

.session-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, .14);
  background: rgba(255,255,255,.035);
}

.session-row span {
  color: #38bdf8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.session-row strong {
  color: #f3efe7;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.calendar-card {
  max-height: 920px;
  overflow: hidden;
}

.calendar-list {
  max-height: 620px;
  overflow-y: auto;
  padding-right: 6px;
}

.calendar-list::-webkit-scrollbar {
  width: 8px;
}

.calendar-list::-webkit-scrollbar-thumb {
  background: rgba(56,189,248,.35);
  border-radius: 999px;
}

@media (max-width: 700px) {

  .calendar-list {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
  }

  .calendar-list::before {
    content: "Desplegá cada GP para ver horarios";
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px;
  }

  .calendar-card {
    max-height: 820px;
    overflow: hidden;
  }

  .gp-dropdown {
    border-radius: 18px;
  }

  .gp-dropdown[open] {
    max-height: none;
  }

  .side {
    margin-top: 20px;
  }
}
