/* =========================
   GAME: SPIN WHEEL
========================= */

.spinwheel-game {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: center;
  font-family: "Fredoka", Arial, sans-serif;
  overflow: hidden;
}

.wheel-area {
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: visible;
}

.spinwheel-shell {
  position: relative;
  width: min(680px, 54vw, calc(100vh - 210px));
  height: min(680px, 54vw, calc(100vh - 210px));
}

.spinwheel-static-shadow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: 18px 18px 0 rgba(0,0,0,0.24);
  transform: translate(-4px, 6px);
  z-index: 0;
}

.spinwheel {
  position: absolute;
  inset: 0;
  border: 12px solid #000;
  border-radius: 50%;
  transition: transform 3.3s cubic-bezier(.15,.8,.2,1);
  overflow: hidden;
  z-index: 1;
  box-shadow: none;
}

.spinwheel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 29%, rgba(255,255,255,0.18) 30%, transparent 31%),
    repeating-conic-gradient(
      from -90deg,
      rgba(0,0,0,0.18) 0deg 2deg,
      transparent 2deg var(--segment-angle)
    );
  pointer-events: none;
}

.wheel-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 8px solid #000;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 900;
  z-index: 6;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.25);
}

.wheel-vocab-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 64px;
  transform-origin: left center;
  z-index: 4;
  pointer-events: none;
}

.wheel-vocab-card {
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  width: 112px;
  min-height: 92px;
  background: rgba(255,255,255,0.94);
  border: 4px solid #000;
  border-radius: 16px;
  padding: 7px;
  display: grid;
  grid-template-rows: 52px auto;
  align-items: center;
  justify-items: center;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.18);
}

.wheel-vocab-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.wheel-vocab-letter {
  width: 52px;
  height: 52px;
  background: #d3ff00;
  border: 4px solid #000;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
}

.wheel-vocab-letter.big {
  width: 100%;
  height: 100%;
  font-size: 70px;
  border: none;
  border-radius: 0;
}

.wheel-vocab-card span {
  display: block;
  width: 100%;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-control-panel {
  max-height: 100%;
  overflow: hidden;
  background: #bff1ea;
  border: 7px solid #000;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.25);
}

.wheel-control-panel h3 {
  font-size: 30px;
  margin-top: 0;
  margin-bottom: 8px;
}

.wheel-control-panel p {
  font-size: 17px;
  font-weight: 700;
}

.wheel-small-note {
  background: #fff0a8;
  border: 4px solid #000;
  border-radius: 12px;
  padding: 8px;
  font-size: 15px !important;
}

#spin-btn {
  width: 100%;
  background: #23d8ff;
  margin: 10px 0 0;
  font-size: 22px;
}

#spin-btn:disabled {
  background: #aaa;
  opacity: 0.7;
  cursor: wait;
}

.spin-result {
  background: #fff;
  border: 5px solid #000;
  border-radius: 18px;
  margin-top: 18px;
  padding: 18px;
  min-height: 220px;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.spin-result-empty {
  min-height: 175px;
  display: grid;
  place-items: center;
  color: #555;
}

.spin-result-image {
  width: 150px;
  height: 120px;
  background: #f7d3ff;
  border: 5px solid #000;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  overflow: hidden;
}

.spin-result-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.spin-result-word {
  background: #d3ff00;
  border: 5px solid #000;
  border-radius: 16px;
  padding: 10px;
  font-size: 28px;
  margin-bottom: 10px;
}

.spin-result-meta {
  font-size: 18px;
  color: #333;
}@media (max-width: 900px) {
  .spinwheel-game {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .spinwheel-shell {
    width: min(520px, 78vw, 48vh);
    height: min(520px, 78vw, 48vh);
  }

  .wheel-control-panel {
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .spinwheel-shell {
    width: min(92vw, 390px);
    height: min(92vw, 390px);
  }

  .wheel-vocab-card {
    width: 76px;
    min-height: 66px;
    right: 12px;
    grid-template-rows: 34px auto;
  }

  .wheel-vocab-img,
  .wheel-vocab-letter {
    width: 34px;
    height: 34px;
  }

  .wheel-vocab-card span {
    font-size: 10px;
  }

  .wheel-center {
    width: 76px;
    height: 76px;
    font-size: 20px;
  }
}