:root {
  --accent: #e4477f;
  --accent-2: #38c8ff;
  --deep: #111722;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: Arial, sans-serif;
  color: white;
  background: var(--deep);
}

.slide {
  position: relative;
  width: min(calc(100vw - 28px), calc((100vh - 28px) * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(7, 14, 27, .92), rgba(7, 14, 27, .58)),
    url("assets/stade-france.png") center / cover no-repeat;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .55);
}

.slide::before,
.slide::after {
  content: "";
  position: absolute;
  z-index: 0;
  background: rgba(255, 255, 255, .14);
}

.slide::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
}

.slide::after {
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
}

.glow {
  position: absolute;
  inset: -18%;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(228, 71, 127, .35), transparent 22%),
    radial-gradient(circle at 20% 22%, rgba(56, 200, 255, .32), transparent 24%),
    radial-gradient(circle at 80% 78%, rgba(255, 255, 255, .18), transparent 25%);
}

nav {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 22px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

nav a {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  color: white;
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
  background: rgba(0, 0, 0, .30);
  backdrop-filter: blur(10px);
}

nav a.active {
  background: var(--accent);
}

.title {
  position: absolute;
  left: 46px;
  top: 98px;
  z-index: 2;
  width: 330px;
}

h1 {
  margin: 0;
  font-size: 62px;
  line-height: .9;
}

.title p {
  margin: 12px 0 0;
  color: #ffe2ef;
  font-size: 18px;
  font-weight: 900;
}

.score {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 8px;
  width: 390px;
  padding: 18px;
  border-left: 8px solid var(--accent);
  border-radius: 8px;
  background: rgba(0, 0, 0, .44);
  backdrop-filter: blur(10px);
}

.score-top {
  left: 46px;
  top: 228px;
}

.score-bottom {
  left: 46px;
  bottom: 34px;
}

.score > .unused-label {
  color: var(--accent-2);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.match-choice {
  display: grid;
  gap: 7px;
  color: var(--accent-2);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.match-choice select {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: #111;
  font: inherit;
  font-weight: 900;
  background: white;
}

.score strong {
  font-size: 26px;
}

.score input {
  width: 56px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #111;
  text-align: center;
  font: inherit;
  font-weight: 900;
  background: white;
}

.center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 414px;
  height: 414px;
  transform: translate(-50%, -50%);
}

.wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) 0 12%, var(--accent-2) 12% 25%, #fff 25% 38%, #38c8ff 38% 50%, var(--accent) 50% 63%, var(--accent-2) 63% 76%, #fff 76% 88%, #38c8ff 88% 100%);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, .16), 0 24px 80px rgba(0, 0, 0, .50);
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 74px;
  border-radius: 50%;
  background: #111722;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .15);
}

.drawing .wheel {
  animation: wheelSpin .35s linear infinite;
}

@keyframes wheelSpin {
  to {
    transform: rotate(360deg);
  }
}

.center button {
  position: relative;
  z-index: 2;
  width: 182px;
  height: 182px;
  border: 0;
  border-radius: 50%;
  color: white;
  font: inherit;
  font-size: 21px;
  font-weight: 900;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .45);
}

.center button:disabled {
  opacity: .75;
}

.name-rain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.name-rain span {
  position: absolute;
  min-width: 124px;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  opacity: 0;
}

.drawing .name-rain span {
  animation: flyCenter 1.25s ease-in-out infinite;
}

.name-rain span:nth-child(1) { left: 6%; top: 18%; animation-delay: .0s; }
.name-rain span:nth-child(2) { left: 78%; top: 14%; animation-delay: .12s; }
.name-rain span:nth-child(3) { left: 10%; top: 76%; animation-delay: .24s; }
.name-rain span:nth-child(4) { left: 84%; top: 72%; animation-delay: .36s; }
.name-rain span:nth-child(5) { left: 45%; top: 9%; animation-delay: .48s; }
.name-rain span:nth-child(6) { left: 48%; top: 84%; animation-delay: .60s; }
.name-rain span:nth-child(7) { left: 18%; top: 44%; animation-delay: .72s; }
.name-rain span:nth-child(8) { left: 76%; top: 46%; animation-delay: .84s; }
.name-rain span:nth-child(9) { left: 30%; top: 25%; animation-delay: .96s; }
.name-rain span:nth-child(10) { left: 65%; top: 64%; animation-delay: 1.08s; }

@keyframes flyCenter {
  0% {
    transform: scale(.55) rotate(-16deg);
    opacity: 0;
  }

  18%,
  72% {
    opacity: 1;
  }

  100% {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1.25) rotate(10deg);
    opacity: 0;
  }
}

.side {
  position: absolute;
  right: 46px;
  top: 112px;
  z-index: 2;
  width: 300px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .40);
  backdrop-filter: blur(10px);
}

.side h2 {
  margin: 0 0 12px;
  font-size: 23px;
}

.person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
  background: rgba(255, 255, 255, .13);
}

.person span:last-child {
  min-width: 44px;
  text-align: right;
}

.empty {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-weight: 900;
}

.winners {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.winner {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  width: min(640px, 82%);
  padding: 30px 34px;
  border: 4px solid white;
  border-radius: 8px;
  color: #111;
  text-align: center;
  background: linear-gradient(135deg, #fff, #ffe2ef);
  box-shadow: 0 25px 90px rgba(0, 0, 0, .65);
}

.winner strong {
  display: block;
  font-size: 96px;
  line-height: .8;
}

.winner span {
  display: block;
  margin-top: 14px;
  font-size: 48px;
  font-weight: 900;
}

.winner.show {
  display: block;
  animation: popWinner .75s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes popWinner {
  0% {
    transform: translate(-50%, -50%) scale(.72);
    opacity: 0;
  }

  65% {
    transform: translate(-50%, -50%) scale(1.03);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.final-list {
  position: absolute;
  left: 46px;
  bottom: 118px;
  z-index: 6;
  display: grid;
  gap: 14px;
  width: 430px;
  opacity: 0;
}

.finished .final-list {
  opacity: 1;
}

.final-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 8px;
  color: #111;
  font-weight: 900;
  background: white;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .35);
}

.final-card b {
  display: block;
  color: var(--accent);
  font-size: 58px;
  line-height: .82;
}

.final-card span {
  font-size: 34px;
}

@media (max-width: 900px) {
  nav {
    left: 16px;
    right: 16px;
    top: 16px;
  }

  .title,
  .score,
  .side {
    display: none;
  }

  .center {
    width: 290px;
    height: 290px;
  }

  .center button {
    width: 145px;
    height: 145px;
    font-size: 18px;
  }

  .final-list {
    left: 16px;
    bottom: 24px;
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
  }
}
.title {
  left: auto;
  right: 46px;
  top: 84px;
  width: 260px;
}

.score {
  gap: 10px;
  width: 470px;
  padding: 20px;
}

.score-top {
  top: 118px;
}

.score-bottom {
  display: none;
}

.side {
  top: 208px;
}

.selection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.selection-label {
  color: white;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.selection-dates {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #111;
  font-size: 16px;
  font-weight: 900;
}

.date-short {
  min-width: 78px;
}

.match-choice {
  gap: 0;
}

.match-choice select {
  min-height: 52px;
  font-size: 18px;
}

.score-title {
  color: white;
  font-size: 30px;
  font-weight: 900;
}

.score-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 14px 8px 2px;
}

.score-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: white;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-team span:last-child {
  min-width: 0;
  text-align: center;
  white-space: normal;
}

.score-team-right {
  justify-content: center;
  text-align: center;
}

.score-values {
  display: flex;
  align-items: center;
  gap: 12px;
}

.score-dash {
  color: white;
  font-size: 38px;
  font-weight: 900;
}

.score-line .team-flag {
  width: 52px;
  height: 36px;
  flex: 0 0 auto;
}

.team-flag {
  display: inline-block;
  border: 2px solid rgba(255, 255, 255, .88);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .24);
}

.flag-france {
  background: linear-gradient(90deg, #1f4aa8 0 33.33%, white 33.33% 66.66%, #d83445 66.66%);
}

.flag-cote-divoire,
.flag-cote-d-ivoire,
.flag-cote-ivoire {
  background: linear-gradient(90deg, #ef8a28 0 33.33%, white 33.33% 66.66%, #2e9b47 66.66%);
}

.flag-irlande-du-nord,
.flag-irlande-nord {
  background: linear-gradient(180deg, white 0 100%);
}

.flag-senegal {
  background: linear-gradient(90deg, #118c4f 0 33.33%, #f5d24b 33.33% 66.66%, #cf2d37 66.66%);
}

.flag-irak {
  background: linear-gradient(180deg, #cf2d37 0 33.33%, white 33.33% 66.66%, #111111 66.66%);
}

.flag-norvege {
  background:
    linear-gradient(90deg, #ba2f3b 0 100%),
    linear-gradient(90deg, transparent 0 28%, white 28% 38%, #234b9e 38% 44%, white 44% 54%, transparent 54%),
    linear-gradient(180deg, transparent 0 38%, white 38% 48%, #234b9e 48% 54%, white 54% 64%, transparent 64%);
  background-blend-mode: normal;
}

.flag-default {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.score-line input {
  width: 80px;
  min-height: 74px;
  font-size: 44px;
}

.winner strong {
  font-size: 96px;
}

.winner span {
  min-height: auto;
  padding: 0;
  font-size: 48px;
}

.final-list {
  left: 46px;
  bottom: 176px;
  gap: 16px;
  width: 500px;
  padding: 0;
}

.final-card {
  grid-template-columns: 64px 1fr;
  gap: 20px;
  min-height: 94px;
  padding: 20px 24px;
}

.final-card b {
  font-size: 38px;
}

.final-card span {
  font-size: 31px;
}

@media (max-width: 900px) {
  .title,
  .score,
  .side,
  .final-list {
    position: static;
    width: auto;
  }

  .title {
    display: block;
  }

  .score {
    display: grid;
  }

  .side {
    display: block;
  }

  .slide {
    display: grid;
    gap: 14px;
    padding: 14px;
  }

  nav {
    position: static;
  }

  .center {
    position: static;
    transform: none;
    margin: 0 auto;
  }
}
