:root {
  color-scheme: dark;
  font-family: "Titillium Web", "Inter", system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: #040404;
  color: #f5f5f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(circle at 38% -50%, rgba(225, 6, 0, 0.28), transparent 55%),
    radial-gradient(circle at 70% 0%, rgba(225, 6, 0, 0.12), transparent 55%),
    #040404;
}

a {
  color: inherit;
}

a:hover,
a:focus-visible {
  color: #ff867a;
}

.page-header,
.page-footer {
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #040404 0%, #0b0c0f 45%, #e10600 130%);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-bottom: 1.2rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.brand-link:hover,
.brand-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(225, 6, 0, 0.35);
}

.brand-link__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-link__text {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.page-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  opacity: 0.92;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-header p {
  margin: 0;
  max-width: 780px;
  margin-inline: auto;
  opacity: 0.82;
}

.signature {
  margin: 1.25rem 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.85rem;
}

.signature a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.signature a:hover,
.signature a:focus-visible {
  color: #ffd7d1;
  text-decoration-color: rgba(255, 215, 209, 0.8);
}

.page-content {
  flex: 1;
  width: min(1120px, calc(100% - 2.5rem));
  margin: 4.5rem auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.card {
  background: rgba(12, 14, 19, 0.88);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.card h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.helper-text {
  margin: 0 0 1.25rem;
  color: rgba(245, 245, 245, 0.68);
  font-size: 0.95rem;
}

.race-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.race-card {
  background-color: rgba(18, 21, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.race-card--locked {
  border-color: rgba(76, 243, 197, 0.45);
  box-shadow: inset 0 0 0 1px rgba(76, 243, 197, 0.3);
}

.race-card__title {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.race-card__title h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.race-card__meta {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: rgba(245, 245, 245, 0.56);
}

.race-card__locked-note {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  color: rgba(76, 243, 197, 0.92);
  background: rgba(76, 243, 197, 0.12);
  border: 1px solid rgba(76, 243, 197, 0.32);
}

.race-card__status {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

.race-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.race-table thead {
  background: rgba(255, 255, 255, 0.08);
}

.race-table th,
.race-table td {
  padding: 0.55rem 0.75rem;
  text-align: center;
}

.race-table th:first-child,
.race-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: #ffffff;
}

.race-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.03);
}

.race-table input[type="radio"] {
  width: 1rem;
  height: 1rem;
  accent-color: #e10600;
}

.race-table input[type="radio"]:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.race-table .position-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(245, 245, 245, 0.56);
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: #e10600;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover,
button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(225, 6, 0, 0.45);
}

.feedback {
  position: fixed;
  top: 2.5rem;
  left: 50%;
  transform: translate(-50%, -16px) scale(0.98);
  background: rgba(8, 9, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1rem;
  padding: 0.85rem 1.9rem;
  font-size: 0.95rem;
  color: #ff8479;
  z-index: 1100;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  min-width: 260px;
  max-width: min(92vw, 520px);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease,
    color 0.2s ease;
}

.feedback--visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(225, 6, 0, 0.15);
}

.feedback--success {
  color: #4cf3c5;
  border-color: rgba(76, 243, 197, 0.4);
}

.podium-summary {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, rgba(225, 6, 0, 0.18), rgba(12, 14, 19, 0.88));
  border: 1px solid rgba(225, 6, 0, 0.35);
}

.podium-summary__title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: rgba(245, 245, 245, 0.64);
}

.podium-list {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.podium-list__item {
  padding: 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(12, 14, 19, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.podium-list__item--1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.24), rgba(12, 14, 19, 0.95));
  border-color: rgba(255, 215, 0, 0.5);
}

.podium-list__item--2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.24), rgba(12, 14, 19, 0.95));
  border-color: rgba(192, 192, 192, 0.45);
}

.podium-list__item--3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.24), rgba(12, 14, 19, 0.95));
  border-color: rgba(205, 127, 50, 0.45);
}

.podium-list__place {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(245, 245, 245, 0.82);
}

.podium-list__driver {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.podium-list__points {
  font-size: 1rem;
  color: #ffffff;
}

.podium-list__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: rgba(245, 245, 245, 0.7);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: rgba(15, 17, 23, 0.9);
  border-radius: 0.85rem;
  overflow: hidden;
}

.standings-table thead {
  background: rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.standings-table th,
.standings-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.standings-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.standings-table tbody tr:first-child {
  border-left: 4px solid #e10600;
}

.points-diff {
  color: rgba(245, 245, 245, 0.56);
  font-size: 0.85rem;
}

.note {
  margin: 0;
  font-size: 0.9rem;
  max-width: 760px;
  margin-inline: auto;
  opacity: 0.72;
}

.note a {
  color: #ffb3a9;
  text-decoration: underline;
  text-decoration-color: rgba(255, 179, 169, 0.5);
}

.note a:hover,
.note a:focus-visible {
  color: #ffd7d1;
  text-decoration-color: rgba(255, 215, 209, 0.8);
}

@media (max-width: 720px) {
  .page-content {
    margin: 3rem auto 1.75rem;
    gap: 1.75rem;
  }

  .card {
    padding: 1.35rem;
  }

  button {
    width: 100%;
  }

  .actions {
    justify-content: stretch;
  }
}

