*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1b1b21 0, #050509 50%, #000000 100%);
  color: #f5f0e6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 480px;
  padding: 24px 16px 32px;
}

.stage {
  display: none;
  text-align: center;
}

.stage--active {
  display: block;
}

.wheel-wrapper {
  position: relative;
  width: min(70vw, 320px);
  height: min(70vw, 320px);
  margin: 0 auto 16px;
}

.wheel-image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

.wheel-center-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38%;
  height: 38%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 160, 0.9) 0%, rgba(255, 213, 128, 0.0) 65%);
  opacity: 0.85;
  pointer-events: none;
  animation: glow-breathe 3s ease-in-out infinite;
  mix-blend-mode: screen;
}

.wheel-center-hit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40%;
  height: 40%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.wheel-center-hit:focus-visible {
  outline: 2px solid #f5e1a8;
  outline-offset: 4px;
}

.prompt {
  margin-top: 12px;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: #f5e1a8;
}



.question {
  background: rgba(14, 14, 24, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(245, 225, 168, 0.3);
  color: #f7f3e8;
  padding: 10px 16px;
  font-size: 0.95rem;
  line-height: 1.3;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.question:hover {
  background: rgba(245, 225, 168, 0.1);
  border-color: rgba(245, 225, 168, 0.7);
  transform: translateY(-1px);
}

.question:active {
  transform: translateY(1px);
}

.covers-header {
  margin-bottom: 12px;
}

.covers-title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f5e1a8;
}

.covers-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #d6d0c7;
}

.covers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.cover-card {
  background: radial-gradient(circle at top, #181822 0, #06060b 60%);
  border-radius: 16px;
  padding: 10px;
  border: 1px solid rgba(245, 225, 168, 0.25);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cover-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
  border-color: rgba(245, 225, 168, 0.6);
}

.cover-card img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.cover-title {
  margin-top: 8px;
  font-size: 0.88rem;
  color: #f7f3e8;
}

.closing-line {
  margin-top: 18px;
  font-size: 0.9rem;
  color: #d0c9bf;
}

@keyframes glow-breathe {
  0% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.95); }
  50% { opacity: 0.95; transform: translate(-50%, -50%) scale(1.03); }
  100% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.95); }
}

@keyframes wheel-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(1440deg); }
}

.wheel-spinning {
  animation: wheel-spin 6s cubic-bezier(0.4, 0.1, 0.2, 1) forwards;
}

@media (min-width: 768px) {
  .app {
    max-width: 520px;
  }
  .covers-grid {
    gap: 16px;
  }
}

.questions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(10px);
}

.stage--active .questions {
  animation: questions-in 600ms ease-out forwards;
}

@keyframes questions-in {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}


.swirl-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at center, rgba(245, 225, 168, 0.45), transparent 65%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.24), transparent 40%);
  transform: scale(0.9);
}

.swirl-overlay--active {
  animation: swirlPulse 3000ms ease-out forwards;
}

@keyframes swirlPulse {
  0% {
    opacity: 0;
    transform: scale(0.9) rotate(0deg);
  }
  40% {
    opacity: 0.95;
    transform: scale(1.03) rotate(40deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.08) rotate(90deg);
  }
}
