/* Game card video previews */
.game-card__media--video {
  background: #1a1f16;
}

.game-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Game modal */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.game-modal[hidden] {
  display: none;
}

.game-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.game-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  max-height: min(92vh, 900px);
  overflow: auto;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(69, 77, 56, 0.95) 0%, rgba(34, 34, 34, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(34, 34, 34, 0.8);
  color: var(--color-white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.game-modal__title {
  font-family: var(--font-heading);
  font-size: 24px;
  text-transform: uppercase;
  padding-right: 48px;
}

.game-modal__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.game-modal__result {
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--color-gold);
}

/* Seals game */
.play-seals__stage {
  position: relative;
  width: min(100%, 800px);
  aspect-ratio: 1000 / 834;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
}

.play-seals__bg,
.play-seals__board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.play-seals__board {
  object-fit: contain;
}

.play-seals__grid {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 36%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6%;
  z-index: 2;
}

.play-seals__cell {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.play-seals__cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.play-seals__cell:hover {
  transform: scale(1.06);
}

.play-seals__cell.is-active {
  filter: drop-shadow(0 0 12px #7cff9b) brightness(1.2);
  transform: scale(1.08);
}

.play-seals__cell.is-match {
  filter: drop-shadow(0 0 16px var(--color-gold)) brightness(1.3);
}

/* Wheel / plinko game */
.play-wheel__stage {
  position: relative;
  width: min(100%, 800px);
  aspect-ratio: 1100 / 738;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
}

.play-wheel__bg,
.play-wheel__board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.play-wheel__board {
  object-fit: contain;
}

.play-wheel__coin {
  position: absolute;
  width: 4.5%;
  height: auto;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.play-wheel__coin.is-falling {
  animation: wheel-coin-fall 2.8s cubic-bezier(0.33, 0.02, 0.66, 0.98) forwards;
}

@keyframes wheel-coin-fall {
  0% {
    top: 8%;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
  }
  15% {
    left: 42%;
    transform: translateX(-50%) rotate(120deg);
  }
  30% {
    left: 58%;
    transform: translateX(-50%) rotate(240deg);
  }
  45% {
    left: 46%;
    transform: translateX(-50%) rotate(360deg);
  }
  60% {
    left: 54%;
    transform: translateX(-50%) rotate(480deg);
  }
  75% {
    left: 48%;
    transform: translateX(-50%) rotate(600deg);
  }
  100% {
    top: 78%;
    left: var(--coin-end, 50%);
    transform: translateX(-50%) rotate(720deg);
  }
}

.play-game__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .game-modal__dialog {
    padding: 32px 28px 36px;
  }

  .game-modal__title {
    font-size: 32px;
  }
}
