.modal-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff64;
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  animation: whitefade 0.5s;
  height: 100dvh;
}

@keyframes whitefade {
  from {
    background: none;
  }
  to {
    background: #ffffff64;
  }
}

.modal {
  position: relative;
  font-size: 16px;
  width: 280px;
  background: beige;
  border: 3px solid peachpuff;
  border-radius: 8px;
  padding: 30px;
  margin: 8px;
  margin-top: 20px;
  margin-bottom: auto;
  text-align: center;
  animation: pop 0.4s cubic-bezier(0.3, 2, 0.7, 1);
}

@keyframes pop {
  from {
    transform: scale(.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.icon, .trophy-icon {
  color: beige;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon {
  background: salmon;
  margin: auto;
  font-size: 42px;
}
.trophy-icon {
  font-family: Noto Emoji;
  color: salmon;
  background: beige;
  font-size: 36px;
  transition: color 0.7s;
}
.trophy-icon:hover.grow {
  cursor: pointer;
  font-size: 40px;
}

h1, h2, h3 {
  font-weight: normal;
}
h1 {
  margin: 20px 0 10px;
  font-size: 28px;
  text-transform: uppercase;
}
h2 {
  font-size: 20px;
}

.subtitle {
  color: dimgray;
  margin-bottom: 24px;
}

.stats {
  display: flex;
  justify-content: space-around;
  margin-block: 16px;
}

.stat {
  flex: 1;
}

.stat .value {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.stat .content {
  color: dimgray;
  font-size: 11px;
}

.modal button {
  cursor: pointer;
  font-size: 16px;
}

.modal .stats ~ button {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border: none;
  border-radius: 8px;
}

.modal .stats ~ button:hover {
  cursor: pointer;
  opacity: 0.9;
}

.modal button.close {
  color: salmon;
  background: peachpuff;
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border: 3px solid beige;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal button.close:hover {
  background: beige;
  border-color: peachpuff;
}

.primary {
  background: gold;
  color: saddlebrown;
  outline: 1px solid goldenrod;
  outline-offset: -1px;
}

.secondary {
  background: firebrick;
  color: whitesmoke;
}

.modal-content {
  overflow-y: auto;
}

.highlight-stat {
  text-transform: uppercase;
  background: salmon;
  color: whitesmoke;
  border-radius: 24px;
  padding: 6px 12px;
  font-style: italic;
  font-size: 18px;
  margin-right: 12px;
}

.games-played {
  display: inline-flex;
  color: salmon;
}

.header {
  text-align: left;
  margin-left: 1em;
  position: relative;
}

.trophy {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  text-align: left;
  padding: 8px;
  background: peachpuff;
  border-radius: 80px;
  margin-top: 1em;
  gap: 12px;
}

.trophy-title {
  font-size: 20px;
  color: darkred;
}

.trophy-details {
  display: grid;
  grid-template-rows: auto;
  height: 100%;
  gap: 8px;
  color: saddlebrown;
  margin-right: 40px;
}

.trophy-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
}

.trophy-footer .timestamp, .trophy-footer .flavour, .highlight-stat .preface {
  font-size: 12px;
}
.flavour {
  font-style: italic;
}

.trophy-footer .count {
  font-style: italic;
  font-size: 16px;
}
