/* fail */

.game-over {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 40px) 0;
  text-align: center;
}

.game-over__icon {
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
}

.game-over[data-reason="miss"] .game-over__icon {
  border-radius: 50%;
  clip-path: none;
  background: radial-gradient(circle at 35% 30%, #fff3d6 0%, #ffc35c 30%, #faa41a 72%, #a85500 100%);
  opacity: 0.35;
}

.game-over[data-reason="quit"] .game-over__icon,
.game-over[data-reason="error"] .game-over__icon {
  display: none;
}

.game-over__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-0);
}

.game-over__text {
  max-width: 44ch;
  color: var(--text-1);
}

.game-over__stats,
.game-over__left {
  font-size: 15px;
  color: var(--text-2);
}

.game-over__stats b,
.game-over__left b {
  color: var(--text-0);
}

.game-over__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}



/* win */

.game-win {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
}

.game-win__intro .h2 {
  margin: 4px 0 14px;
}

.game-win__text {
  margin-bottom: 26px;
  color: var(--text-1);
}

.wheel {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.wheel__host,
.wheel__disc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wheel__sector {
  fill: #faa41a;
  stroke: #0c0c0c;
  stroke-width: 2;
}

.wheel__sector--dark {
  fill: #1c1c1c;
}

.wheel__label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  fill: #0a0a0a;
}

.wheel__label--light {
  fill: #ffffff;
}

.wheel__rim {
  fill: none;
  stroke: #faa41a;
  stroke-width: 6;
}

.wheel__pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 2;
  width: 34px;
  height: 44px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
}

.wheel__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid #faa41a;
  background: #0c0c0c;
  transform: translate(-50%, -50%);
}

.wheel__hub img {
  width: 60%;
  height: auto;
}



/* prize */

.game-prize {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.game-prize__value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1;
  text-transform: uppercase;
  color: var(--accent);
}

.game-prize__note {
  max-width: 44ch;
  color: var(--text-1);
}

.game-prize__hint {
  font-size: 14px;
  color: var(--text-2);
}

.game-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(250, 164, 26, 0.5);
}

.game-code__label {
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.game-code__value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.04em;
  color: var(--text-0);
}

.game-code__copy {
  position: relative;
}

.game-code__copied {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.game-code__copy.is-done span:first-child {
  opacity: 0;
}

.game-code__copy.is-done .game-code__copied {
  display: flex;
}

.game-code__meta {
  width: 100%;
  font-size: 14px;
  color: var(--text-2);
}

.game-code__meta b {
  color: var(--text-0);
}

.game-verify {
  width: 100%;
  font-size: 13px;
  color: var(--text-2);
}

.game-verify summary {
  cursor: pointer;
}

.game-verify__row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  margin: 10px 0;
}

.game-verify__row code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: var(--accent);
  word-break: break-all;
}

.game-verify__out {
  margin-top: 10px;
  min-height: 16px;
}

.game-verify__out.is-ok {
  color: #7ddc9a;
}

.game-verify__out.is-fail {
  color: #ff8f8f;
}



/* facts */

.game-facts {
  display: grid;
  border-top: 1px solid var(--surface-line);
}

.game-facts__item {
  display: grid;
  grid-template-columns: 70px minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: baseline;
  padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--surface-line);
}

.game-facts__item > span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent);
}

.game-facts__item h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  color: var(--text-0);
}

.game-facts__item p {
  color: var(--text-1);
}

@media (max-width: 900px) {
  .game-win {
    grid-template-columns: 1fr;
  }

  .wheel {
    width: min(100%, 360px);
  }

  .game-facts__item {
    grid-template-columns: 48px 1fr;
  }

  .game-facts__item p {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .game-verify__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
