/* =========================================
   RacePSL Public Comparisons
========================================= */

.head-to-head-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.head-to-head-form-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}

.head-to-head-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.head-to-head-rider-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.head-to-head-rider-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.head-to-head-avatar,
.head-to-head-avatar-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.head-to-head-rider-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.head-to-head-rider-meta {
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.head-to-head-number {
  display: inline-block;
  margin-top: 10px;
  background: var(--accent-orange);
  color: #fff;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 6px;
  transform: skewX(-10deg);
  box-shadow: 3px 3px 0px var(--text-primary);
}

.head-to-head-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.head-to-head-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.head-to-head-stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.head-to-head-stat-value {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
}

.head-to-head-center-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin: 20px 0;
}

.head-to-head-scoreboard {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 16px;
  align-items: center;
}

.head-to-head-score-side {
  text-align: center;
}

.head-to-head-score-name {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.head-to-head-score-value {
  color: var(--accent-orange);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.head-to-head-score-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.head-to-head-battle-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-top: 20px;
}

.head-to-head-battle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.head-to-head-battle-row {
  display: grid;
  grid-template-columns: 1.4fr 120px 120px 120px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.head-to-head-battle-event {
  color: var(--text-primary);
  font-weight: 700;
}

.head-to-head-battle-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.head-to-head-battle-finish {
  color: var(--text-primary);
  font-weight: 800;
  text-align: center;
}

.head-to-head-battle-result {
  text-align: center;
}

.head-to-head-battle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.head-to-head-battle-pill--a {
  background: #E8F8EF;
  color: #198754;
  border: 1px solid #CFEBDD;
}

.head-to-head-battle-pill--b {
  background: #EAF2FF;
  color: #0D6EFD;
  border: 1px solid #D6E4FF;
}

.head-to-head-battle-pill--draw {
  background: #FFF4E5;
  color: #B26A00;
  border: 1px solid #FFD8A8;
}

.head-to-head-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: end;
}

@media (max-width: 900px) {
  .head-to-head-grid,
  .head-to-head-scoreboard,
  .head-to-head-form-grid {
    grid-template-columns: 1fr;
  }

  .head-to-head-battle-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .head-to-head-battle-finish,
  .head-to-head-battle-result {
    text-align: left;
  }

  .head-to-head-rider-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.head-to-head-rider-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  min-height: 100%;
}

.head-to-head-rider-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.head-to-head-avatar,
.head-to-head-avatar-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.head-to-head-rider-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 6px;
  line-height: 1.1;
}

.head-to-head-rider-meta {
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.head-to-head-number {
  display: inline-block;
  margin-top: 10px;
  background: var(--accent-orange);
  color: #fff;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 6px;
  transform: skewX(-10deg);
  box-shadow: 3px 3px 0px var(--text-primary);
}

.head-to-head-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.head-to-head-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.head-to-head-stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.head-to-head-stat-value {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
}

@media (max-width: 900px) {
  .head-to-head-rider-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* =========================================
   F1 Broadcast Hero
========================================= */
.f1-hero-status-row {
  margin-top: 14px;
}

.f1-live-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.f1-live-chip--green {
  background: rgba(33, 186, 69, 0.18);
  color: #D8F7E3;
  border-color: rgba(33, 186, 69, 0.35);
}

.f1-live-chip--purple {
  background: rgba(155, 81, 224, 0.18);
  color: #EAD9FF;
  border-color: rgba(155, 81, 224, 0.35);
}

.head-to-head-rider-card--matchup-leader {
  border-color: #9B51E0;
  box-shadow: 0 12px 28px rgba(155, 81, 224, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
  border-left: 6px solid #9B51E0;
}

.head-to-head-rider-card--matchup-leader .head-to-head-context-badge {
  background: #F2E8FF;
  color: #9B51E0;
  border-color: #E0CCFF;
}

.f1-stat-win-a {
  color: #198754;
  font-weight: 900;
}

.f1-stat-win-b {
  color: #9B51E0;
  font-weight: 900;
}

.f1-hero-card {
  margin-top: 4px;
}

.f1-hero-card {
  background: linear-gradient(135deg, #15151E 0%, #1E1E2A 100%);
  border: 1px solid #2A2A36;
  border-top: 4px solid #E10600;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  padding: 26px 28px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

.f1-hero-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 240px;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(225, 6, 0, 0.14) 0%,
    rgba(225, 6, 0, 0) 100%
  );
  pointer-events: none;
}

.f1-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.f1-kicker {
  color: #E10600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 900;
  margin: 0 0 10px;
}

.f1-page-title {
  color: #FFFFFF;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  margin: 0 0 10px;
  letter-spacing: -1px;
}

.f1-page-subtitle {
  color: #B8BCC6;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  max-width: 760px;
}

.f1-hero-matchup {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 18px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.f1-hero-rider {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
}

.f1-hero-rider--right {
  text-align: right;
}

.f1-hero-label {
  display: block;
  color: #9AA1AE;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 800;
  margin-bottom: 8px;
}

.f1-hero-name {
  color: #FFFFFF;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  font-style: italic;
}

.f1-hero-number {
  display: inline-block;
  margin-top: 10px;
  background: #E10600;
  color: #FFFFFF;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 6px;
  transform: skewX(-12deg);
}

.f1-hero-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.f1-hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}

.f1-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
}

.f1-hero-pill-label {
  color: #9AA1AE;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.f1-hero-pill-value {
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .f1-hero-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .f1-hero-matchup {
    grid-template-columns: 1fr;
  }

  .f1-hero-rider--right {
    text-align: left;
  }

  .f1-hero-vs {
    justify-content: flex-start;
    font-size: 1.6rem;
  }

  .f1-page-title {
    font-size: 2.1rem;
  }
}

.f1-hero-card .btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.f1-hero-card .btn:hover {
  border-color: #E10600;
  color: #FFFFFF;
}

.f1-hero-card .btn-primary {
  background: #E10600;
  border-color: #E10600;
  color: #FFFFFF;
}

/* =========================================
   F1 Broadcast Filter Card
========================================= */

.f1-filter-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7f8fa 100%);
  border: 1px solid #d0d3d7;
  border-top: 4px solid #15151E;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.f1-filter-top {
  margin-bottom: 18px;
}

.f1-filter-kicker {
  color: #E10600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 900;
  margin: 0 0 8px;
}

.f1-filter-title {
  color: #15151E;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 8px;
}

.f1-filter-subtitle {
  color: #67676D;
  font-size: 0.96rem;
  line-height: 1.5;
  margin: 0;
}

.f1-filter-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.f1-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.f1-filter-group label {
  color: #67676D;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.f1-filter-group select {
  width: 100%;
  border: 1px solid #d0d3d7;
  border-radius: 8px;
  background: #ffffff;
  color: #15151E;
  padding: 12px 14px;
  font: inherit;
  font-weight: 600;
}

.f1-filter-group select:focus {
  outline: none;
  border-color: #E10600;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.1);
}

.f1-filter-actions {
  display: flex;
  align-items: end;
}

.f1-filter-card .btn-primary {
  background: #E10600;
  border-color: #E10600;
  color: #fff;
  min-height: 46px;
  padding-left: 18px;
  padding-right: 18px;
}

@media (max-width: 1000px) {
  .f1-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .f1-filter-actions {
    width: 100%;
  }

  .f1-filter-actions .btn {
    width: 100%;
  }
}

/* =========================================
   F1 Stat Battle Table
========================================= */

.f1-stat-card {
  background: #ffffff;
  border: 1px solid #d0d3d7;
  border-top: 4px solid #9B51E0;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.f1-stat-header {
  margin-bottom: 16px;
}

.f1-stat-table-wrap {
  overflow-x: auto;
}

.f1-stat-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.f1-stat-table thead th {
  padding: 12px 14px;
  border-bottom: 1px solid #d0d3d7;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.f1-stat-rider-head {
  color: #15151E;
  text-align: center;
}

.f1-stat-metric-head {
  color: #67676D;
  text-align: center;
}

.f1-stat-table tbody tr {
  transition: background 0.2s ease;
}

.f1-stat-table tbody tr:hover {
  background: #f8f9fb;
}

.f1-stat-table tbody td {
  padding: 14px;
  border-bottom: 1px solid #eceff3;
  vertical-align: middle;
}

.f1-stat-value-cell {
  text-align: center;
  font-family: monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: #15151E;
  white-space: nowrap;
}

.f1-stat-metric-cell {
  text-align: center;
  color: #67676D;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 800;
  background: #fafbfc;
}

.f1-stat-table tbody tr:first-child .f1-stat-value-cell {
  color: #E10600;
  font-weight: 900;
}

@media (max-width: 640px) {
  .f1-stat-table thead th,
  .f1-stat-table tbody td {
    padding: 10px;
  }

  .f1-stat-value-cell {
    font-size: 0.95rem;
  }

  .f1-stat-metric-cell {
    font-size: 0.74rem;
  }
}

.f1-stat-card {
  background: #ffffff;
  border: 1px solid #d0d3d7;
  border-top: 4px solid #9B51E0;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.f1-stat-header {
  margin-bottom: 16px;
}

.f1-stat-table-wrap {
  overflow-x: auto;
}

.f1-stat-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.f1-stat-table thead th {
  padding: 12px 14px;
  border-bottom: 1px solid #d0d3d7;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.f1-stat-rider-head {
  color: #15151E;
  text-align: center;
}

.f1-stat-metric-head {
  color: #67676D;
  text-align: center;
}

.f1-stat-table tbody tr {
  transition: background 0.2s ease;
}

.f1-stat-table tbody tr:hover {
  background: #f8f9fb;
}

.f1-stat-table tbody td {
  padding: 14px;
  border-bottom: 1px solid #eceff3;
  vertical-align: middle;
}

.f1-stat-value-cell {
  text-align: center;
  font-family: monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: #15151E;
  white-space: nowrap;
}

.f1-stat-metric-cell {
  text-align: center;
  color: #67676D;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 800;
  background: #fafbfc;
}

.f1-stat-table tbody tr:first-child .f1-stat-value-cell {
  color: #E10600;
  font-weight: 900;
}

@media (max-width: 640px) {
  .f1-stat-table thead th,
  .f1-stat-table tbody td {
    padding: 10px;
  }

  .f1-stat-value-cell {
    font-size: 0.95rem;
  }

  .f1-stat-metric-cell {
    font-size: 0.74rem;
  }
}

/* =========================================
   F1 Class Form Cards
========================================= */

.f1-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

.f1-form-card {
  background: #ffffff;
  border: 1px solid #d0d3d7;
  border-top: 4px solid #21ba45;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  padding: 22px 24px;
}

.f1-form-header {
  margin-bottom: 16px;
}

.f1-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.f1-form-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  background: #f5f6f8;
  border: 1px solid #d0d3d7;
  color: #15151E;
  font-family: monospace;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.f1-form-pill--win {
  background: #E8F8EF;
  color: #198754;
  border-color: #CFEBDD;
}

.f1-form-pill--podium {
  background: #F2E8FF;
  color: #9B51E0;
  border-color: #E0CCFF;
}

.f1-form-pill--bad {
  background: #FFF4E5;
  color: #B26A00;
  border-color: #FFD8A8;
}

@media (max-width: 800px) {
  .f1-form-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   F1 Shared Battle Card
========================================= */

.f1-battle-card {
  background: #ffffff;
  border: 1px solid #d0d3d7;
  border-top: 4px solid #15151E;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.f1-battle-header {
  margin-bottom: 16px;
}

.f1-battle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.f1-battle-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 160px 1fr;
  gap: 16px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e7eaee;
  border-left: 6px solid #d0d3d7;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.f1-battle-row:hover {
  transform: translateX(2px);
}

.f1-battle-row--a {
  border-left-color: #21ba45;
  background: #f8fdf9;
}

.f1-battle-row--b {
  border-left-color: #9B51E0;
  background: #fbf8ff;
}

.f1-battle-row--draw {
  border-left-color: #d0d3d7;
  background: #fafbfc;
}

.f1-battle-event {
  min-width: 0;
}

.f1-battle-event-name {
  color: #15151E;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.f1-battle-event-sub {
  color: #67676D;
  font-size: 0.82rem;
  margin-top: 4px;
}

.f1-battle-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.f1-battle-side--right {
  align-items: flex-end;
  text-align: right;
}

.f1-battle-rider-label {
  color: #67676D;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.f1-battle-finish {
  color: #15151E;
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.f1-battle-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.f1-battle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid transparent;
}

.f1-battle-pill--a {
  background: #E8F8EF;
  color: #198754;
  border-color: #CFEBDD;
}

.f1-battle-pill--b {
  background: #F2E8FF;
  color: #9B51E0;
  border-color: #E0CCFF;
}

.f1-battle-pill--draw {
  background: #F3F4F6;
  color: #67676D;
  border-color: #D0D3D7;
}

@media (max-width: 900px) {
  .f1-battle-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .f1-battle-side,
  .f1-battle-side--right {
    align-items: flex-start;
    text-align: left;
  }

  .f1-battle-center {
    justify-content: flex-start;
  }
}

/* Leader highlight on rider cards */
.head-to-head-rider-card {
  position: relative;
}

.head-to-head-rider-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.head-to-head-context-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #F3F4F6;
  color: #67676D;
  border: 1px solid #D0D3D7;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.head-to-head-rider-card--season-leader {
  border-color: #21ba45;
  box-shadow: 0 10px 24px rgba(33, 186, 69, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fdf9 100%);
  border-left: 6px solid #21ba45;
}

.head-to-head-rider-card--season-leader .head-to-head-context-badge {
  background: #E8F8EF;
  color: #198754;
  border-color: #CFEBDD;
}

.head-to-head-rider-card--ahead {
  border-color: #E10600;
  box-shadow: 0 10px 24px rgba(225, 6, 0, 0.10);
  background: linear-gradient(180deg, #ffffff 0%, #fff8f7 100%);
  border-left: 6px solid #E10600;
}

.head-to-head-rider-card--ahead .head-to-head-context-badge {
  background: #FFF1EE;
  color: #E10600;
  border-color: #FFD2C9;
}

.head-to-head-standing-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.head-to-head-standing-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #15151E;
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.head-to-head-standing-points {
  color: #67676D;
  font-size: 0.9rem;
  font-weight: 800;
}

/* =========================================
   F1 Season Head-to-Head Scoreboard
========================================= */

.f1-scoreboard-card {
  background: linear-gradient(135deg, #15151E 0%, #1E1E2A 100%);
  border: 1px solid #2A2A36;
  border-top: 4px solid #9B51E0;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  padding: 24px 26px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

.f1-scoreboard-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(155, 81, 224, 0.16) 0%,
    rgba(155, 81, 224, 0) 100%
  );
  pointer-events: none;
}

.f1-scoreboard-header {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}

.f1-scoreboard-header .f1-filter-title,
.f1-scoreboard-header .f1-filter-subtitle {
  color: #FFFFFF;
}

.f1-scoreboard-header .f1-filter-subtitle {
  color: #B8BCC6;
}

.f1-scoreboard-grid {
  display: grid;
  grid-template-columns: 1fr 160px 1fr;
  gap: 18px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.f1-scoreboard-side {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
}

.f1-scoreboard-side--right {
  text-align: right;
}

.f1-scoreboard-name {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 10px;
}

.f1-scoreboard-value {
  color: #FFFFFF;
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

.f1-scoreboard-caption {
  color: #9AA1AE;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  margin-top: 8px;
}

.f1-scoreboard-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.f1-scoreboard-vs {
  color: #FFFFFF;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.f1-scoreboard-draws {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
}

.f1-scoreboard-draws-label {
  color: #9AA1AE;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.f1-scoreboard-draws-value {
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 900px) {
  .f1-scoreboard-grid {
    grid-template-columns: 1fr;
  }

  .f1-scoreboard-side--right {
    text-align: left;
  }

  .f1-scoreboard-center {
    align-items: flex-start;
  }
}

.head-to-head-rider-card--season-leader {
  border-color: #21ba45;
  box-shadow: 0 10px 24px rgba(33, 186, 69, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fdf9 100%);
  border-left: 6px solid #21ba45;
}

.head-to-head-rider-card--ahead {
  border-color: #E10600;
  box-shadow: 0 10px 24px rgba(225, 6, 0, 0.10);
  background: linear-gradient(180deg, #ffffff 0%, #fff8f7 100%);
  border-left: 6px solid #E10600;
}

/* =========================================
   F1 Championship Standings
========================================= */

.f1-page-title--dark {
  color: #15151E;
}

.f1-standings-hero-card,
.f1-standings-summary-card,
.f1-standings-card {
  background: #ffffff;
  border: 1px solid #d0d3d7;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.f1-standings-hero-card {
  border-top: 4px solid #E10600;
}

.f1-standings-card {
  border-top: 4px solid #15151E;
}

.f1-standings-hero-top,
.f1-standings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.standings-filter-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.f1-standings-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.f1-standings-summary-block {
  background: #fafbfc;
  border: 1px solid #e7eaee;
  border-radius: 12px;
  padding: 14px 16px;
}

.f1-standings-summary-label {
  display: block;
  color: #67676D;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  margin-bottom: 6px;
}

.f1-standings-summary-value {
  display: block;
  color: #15151E;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
}

.f1-standings-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.f1-standings-row {
  display: grid;
  grid-template-columns: 70px 60px minmax(220px, 1.8fr) minmax(180px, 1.3fr) 110px 100px repeat(4, 90px);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e7eaee;
  border-left: 6px solid #d0d3d7;
  border-radius: 12px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.f1-standings-row:hover {
  transform: translateX(2px);
  background: #fafbfc;
}

.f1-standings-row.leader {
  border-left-color: #E10600;
  background: #fff8f7;
}

.f1-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #15151E;
  color: #ffffff;
  font-weight: 900;
  font-size: 1rem;
}

.f1-standings-row.leader .f1-pos-badge {
  background: #E10600;
}

.f1-move {
  font-weight: 900;
  font-size: 1rem;
  text-align: center;
}

.f1-driver-name {
  color: #15151E;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.2;
}

.f1-driver-meta,
.f1-machine,
.f1-gap {
  color: #67676D;
  font-size: 0.82rem;
  line-height: 1.4;
}

.f1-points {
  color: #15151E;
  font-family: monospace;
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.f1-gap {
  font-family: monospace;
  text-align: center;
}

.f1-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.f1-stat-label {
  color: #67676D;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 800;
}

.f1-stat-value {
  color: #15151E;
  font-family: monospace;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.f1-standings-empty {
  color: #67676D;
  text-align: center;
  padding: 24px;
  border: 1px dashed #d0d3d7;
  border-radius: 12px;
  background: #fafbfc;
}

@media (max-width: 1200px) {
  .f1-standings-row {
    grid-template-columns: 70px 60px minmax(220px, 1.5fr) minmax(160px, 1fr) 90px 90px 80px 80px 80px 80px;
  }
}

@media (max-width: 980px) {
  .f1-standings-hero-top,
  .f1-standings-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .f1-standings-summary-grid,
  .standings-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .f1-standings-row {
    grid-template-columns: 70px 60px 1fr;
    gap: 12px;
  }

  .f1-machine,
  .f1-points,
  .f1-gap,
  .f1-stat {
    grid-column: 3;
    align-items: flex-start;
    text-align: left;
  }

  .f1-points,
  .f1-gap {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .f1-standings-summary-grid,
  .standings-filter-grid {
    grid-template-columns: 1fr;
  }
}
