@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800&family=Roboto+Mono:wght@700&display=swap");

* { box-sizing: border-box; }

html, body {
  background: #000;
  margin: 0;
}

.driver-card-pair {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 800px));
  justify-content: center;
  margin: 18px auto;
}

@media (max-width: 1100px) {
  .driver-card-pair { grid-template-columns: minmax(0, 800px); }
}

.driver-card {
  --red: #b60000;
  --white: #f5f5f7;
  --muted: #c0c0c5;
  --blue: #48a6fa;
  --green: #55dc5c;
  --gold: #efc200;
  --metric-red: #f04455;
  --orange: #faa032;
  background-color: #080808;
  background-image: linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, .62)), url("../assets/driver-card-background.png");
  background-position: center;
  background-size: cover;
  border: 3px solid var(--white);
  color: var(--white);
  height: 1200px;
  overflow: hidden;
  position: relative;
  width: 800px;
}

.driver-card::before {
  background: linear-gradient(110deg, transparent 0 36%, rgba(255, 255, 255, .07) 36.25% 36.5%, transparent 36.75% 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.driver-card__header {
  background: var(--red);
  border-bottom: 2px solid var(--white);
  height: 96px;
  left: 0;
  position: absolute;
  top: 0;
  width: 794px;
  z-index: 2;
}

.driver-card__username {
  color: #fff;
  font: 700 28px "Orbitron", sans-serif;
  left: 397px;
  position: absolute;
  text-shadow: 3px 3px 0 #000, -1px -1px 0 rgba(0, 0, 0, .7);
  top: 48px;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.driver-card__flag {
  font: 400 58px system-ui, sans-serif;
  left: 48px;
  position: absolute;
  top: 48px;
  transform: translateY(-50%);
}

.driver-card__flag--right { left: auto; right: 48px; }

.driver-card__official {
  color: #fff;
  font: 700 18px "Orbitron", sans-serif;
  left: 397px;
  position: absolute;
  text-shadow: 2px 2px 0 #000;
  top: 73px;
  transform: translateX(-50%);
}

.driver-card__body {
  background: radial-gradient(circle at center, rgba(0, 0, 0, .08), rgba(0, 0, 0, .62));
  bottom: 168px;
  left: 0;
  position: absolute;
  right: 0;
  top: 96px;
  z-index: 1;
}

.driver-card__driver-image {
  bottom: 0;
  height: 926px;
  left: 0;
  object-fit: contain;
  position: absolute;
  width: 794px;
}

.driver-card__footer {
  background: var(--red);
  border-bottom: 2px solid var(--white);
  border-top: 2px solid var(--white);
  bottom: 72px;
  height: 96px;
  left: 0;
  position: absolute;
  width: 794px;
  z-index: 5;
}

.driver-card__footer-text {
  color: #fff;
  font: 700 28px "Orbitron", sans-serif;
  overflow: hidden;
  position: absolute;
  text-align: center;
  text-shadow: 3px 3px 0 #000, -1px -1px 0 rgba(0, 0, 0, .7);
  top: 46px;
  transform: translateY(-50%);
  white-space: nowrap;
  width: 301px;
}

.driver-card__footer-text--left { left: 0; }
.driver-card__footer-text--right { right: 0; }

.driver-card__footer-logo {
  align-items: center;
  aspect-ratio: 1;
  background: #fff;
  border: 4px solid var(--red);
  border-radius: 50%;
  display: flex;
  height: 192px;
  justify-content: center;
  left: 397px;
  position: absolute;
  top: 46px;
  transform: translate(-50%, -50%);
  width: 192px;
  z-index: 2;
}

.driver-card__footer-logo img {
  height: 95%;
  object-fit: contain;
  width: 95%;
}

.driver-card__back-title {
  left: 0;
  position: absolute;
  right: 0;
  text-align: center;
  top: 128px;
  z-index: 2;
}

.driver-card__back-title h1 {
  font: 700 48px "Orbitron", sans-serif;
  margin: 0;
  text-transform: uppercase;
}

.result-grid {
  bottom: 64px;
  display: grid;
  grid-template-columns: repeat(2, 358px);
  grid-template-rows: repeat(6, 140px);
  left: 32px;
  position: absolute;
  top: 256px;
  width: 736px;
  z-index: 2;
}

.result-grid__item {
  align-content: center;
  background: rgba(0, 0, 0, .58);
  border: 2px solid var(--white);
  display: grid;
  gap: 5px;
  justify-items: center;
  margin: 5px;
  text-align: center;
}

.result-grid__icon {
  align-items: center;
  color: var(--tone, var(--white));
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.result-grid__icon svg { height: 32px; width: 32px; }

.result-grid__value { color: var(--tone, var(--white)); font: 700 32px "Roboto Mono", monospace; line-height: 1.05; }
.result-grid__label { color: var(--muted); font: 700 18px system-ui, sans-serif; line-height: 1.15; text-transform: uppercase; }
.tone-gold { --tone: var(--gold); }
.tone-red { --tone: var(--metric-red); }
.tone-green { --tone: var(--green); }
.tone-blue { --tone: var(--blue); }
.tone-orange { --tone: var(--orange); }
