/* css/spin.css: the Wheel of Questionable Fortune (js/spin-wheel.js). */
.sw { display: grid; justify-items: center; gap: 22px; width: 100%; }
/* Space held before the wheel mounts (it is built lazily), so nothing shifts. */
[data-spazwheel]:not(.sw) { min-height: calc(min(460px, 88vw) + 138px); }
.sw-stage { position: relative; width: min(460px, 88vw); aspect-ratio: 1; }
.sw-glow {
  position: absolute; inset: -14%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,181,71,0.35), rgba(255,77,141,0.16) 45%, transparent 68%);
  filter: blur(10px); opacity: 0.55;
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out, ease);
}
.sw-won .sw-glow { opacity: 1; transform: scale(1.08); animation: swGlow 1.1s ease-in-out 3; }
@keyframes swGlow { 50% { opacity: 0.6; transform: scale(1.02); } }
.sw-wheel { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 30px 50px rgba(0,0,0,0.55)); }
.sw-canvas { width: 100%; height: 100%; display: block; }
.sw-pointer {
  position: absolute; top: -4.5%; left: 50%; width: 11%; height: auto; z-index: 3;
  transform: translateX(-50%); transform-origin: 50% 28%;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.5));
}
.sw-hub {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 0; cursor: pointer;
  background:
    radial-gradient(circle at 35% 30%, #fff8e6 0%, #ffcf7a 22%, #e08a10 60%, #7a4300 100%);
  box-shadow: 0 0 0 4px rgba(40,25,5,0.85), 0 0 0 7px #f2d391, 0 10px 30px rgba(0,0,0,0.6), inset 0 -6px 12px rgba(0,0,0,0.3);
  color: #2a1600; font: 800 clamp(0.8rem, 2.4vw, 1.05rem)/1 var(--font-display, sans-serif); letter-spacing: 0.08em;
  transition: transform 0.35s var(--ease-spring, ease);
}
.sw-hub:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.06); }
.sw-hub:active:not(:disabled) { transform: translate(-50%, -50%) scale(0.95); }
.sw-hub:disabled { cursor: progress; }
.sw-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.sw-spin:disabled { opacity: 0.6; cursor: progress; }
.sw-sound {
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text-muted); border: 1px solid var(--border-bright);
  font: 600 0.9rem/1 var(--font-body);
}
.sw-sound[aria-pressed="true"] { color: var(--text); border-color: var(--accent); }

/* Reveal card */
.sw-result {
  --seg: #ffb547;
  position: relative; width: min(560px, 100%); text-align: left;
  padding: 26px; border-radius: var(--radius-xl, 28px);
  background: linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
              linear-gradient(135deg, var(--seg), var(--hot, #ff4d8d), var(--electric, #3de8ff)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 40px 100px -40px var(--seg), var(--shadow);
  opacity: 0; transform: translateY(18px) scale(0.96) rotateX(12deg);
  transition: opacity 0.5s ease, transform 0.7s var(--ease-spring, ease);
}
.sw-result.show { opacity: 1; transform: none; }
.sw-result-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.sw-result-icon {
  flex: 0 0 auto; width: 60px; height: 60px; display: grid; place-items: center; font-size: 2rem;
  border-radius: 18px; background: color-mix(in srgb, var(--seg) 25%, transparent); border: 1px solid color-mix(in srgb, var(--seg) 60%, transparent);
}
.sw-result-label { font: 800 0.72rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.sw-result-title { margin: 0; font: 700 var(--step-1, 1.3rem)/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--text); }
.sw-result-body { white-space: pre-line; color: var(--text-muted); line-height: 1.65; margin: 0 0 14px; }
.sw-result-link { margin-bottom: 14px; }
.sw-result-cta { min-height: 44px; }
.sw-result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sw-result-actions .btn { min-height: 44px; padding: 0 18px; font-size: 0.92rem; }
.sw-share-status { margin: 10px 0 0; min-height: 1.2em; font-size: 0.85rem; color: var(--text-faint); }
.sw-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 250; }

@media (prefers-reduced-motion: reduce) {
  .sw-result { transform: none; transition: opacity 0.4s ease; }
  .sw-won .sw-glow { animation: none; }
}
