body {
  margin: 0;
  background-color: black;
  color: white;
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
}

#stats-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

h1 {
  font-size: 44px;
  margin: 0 0 4px;
}

.subtitle {
  color: #8e8e93;
  margin: 0 0 24px;
}

/* ---------- Search bar (the only frosted glass piece) ---------- */
.toolbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 16px;
  background: rgba(40, 40, 42, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.toolbar input[type="search"],
.toolbar select {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  color-scheme: dark;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
}

.toolbar input[type="search"] {
  flex: 1 1 220px;
}

.toolbar input:focus,
.toolbar select:focus {
  outline: 2px solid #0a84ff;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d1d1d6;
  font-size: 15px;
}

#status {
  color: #8e8e93;
  margin: 0 4px 16px;
}

/* ---------- The grid of driver cards ---------- */
#driver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  align-items: start;
}

.driver {
  background: rgba(28, 28, 30, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.driver.champion {
  border-color: rgba(255, 214, 10, 0.5);
}

.driver summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

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

/* The little arrow on the right that turns when opened */
.driver summary::after {
  content: "›";
  margin-left: auto;
  font-size: 26px;
  color: #8e8e93;
  transition: transform 0.2s;
}

.driver[open] summary::after {
  transform: rotate(90deg);
}

.avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  background: linear-gradient(135deg, #3a3a3c, #636366);
}

.champion .avatar {
  background: linear-gradient(135deg, #ffd60a, #ff9f0a);
  color: #1c1c1e;
}

.who {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.name {
  font-weight: 600;
  font-size: 16px;
}

.badge {
  background: rgba(255, 214, 10, 0.18);
  color: #ffd60a;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.meta {
  color: #8e8e93;
  font-size: 13px;
}

/* ---------- The part that drops down ---------- */
.panel {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 4px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 22px;
}

.stat span {
  font-size: 10px;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 14px 0 12px;
  font-size: 14px;
  line-height: 1.9;
}

.facts li {
  display: flex;
  justify-content: space-between;
}

.facts span {
  color: #8e8e93;
}

.wiki {
  color: #0a84ff;
  text-decoration: none;
  font-size: 14px;
}

/* ---------- Show more button ---------- */
#load-more {
  display: block;
  margin: 28px auto 0;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 12px 26px;
  font-size: 16px;
  cursor: pointer;
}

#load-more:hover {
  background: rgba(255, 255, 255, 0.22);
}

#load-more[hidden] {
  display: none;
}

@media (max-width: 600px) {
  h1 {
    font-size: 34px;
  }
}
.toolbar select option {
  background-color: #2c2c2e;
  color: white;
}