/* AUREA Spin Wheel — page styles.
   The wheel is an SVG built by spin.js from the server odds table
   (segment order = table order). All animation runs on transform /
   opacity only, particle counts are capped, and
   prefers-reduced-motion shortens everything — see spin.js. */

.sw-stage {
  position: relative;
  width: min(78vw, 340px);
  aspect-ratio: 1;
  margin: 10px auto 6px;
}

/* gold pointer at the top, wiggles while the wheel passes segments */
.sw-pointer {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 22px solid #FFD700;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, .75));
  z-index: 5;
  transform-origin: 50% 0;
}
.sw-pointer.tick { animation: swTick .13s ease-out; }
@keyframes swTick {
  0% { transform: translateX(-50%) rotate(0deg); }
  45% { transform: translateX(-50%) rotate(-17deg); }
  100% { transform: translateX(-50%) rotate(0deg); }
}

.sw-wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  will-change: transform;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .55));
}
.sw-wheel svg { display: block; width: 100%; height: 100%; }
.sw-wheel .sw-seg { stroke: #0A0F1E; stroke-width: 1.6; }
.sw-wheel .sw-lab {
  font-family: Manrope, sans-serif;
  font-weight: 800;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(6, 8, 18, .55);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.sw-wheel .sw-seg.win { filter: brightness(1.5) saturate(1.25); }

/* tier rim glows, applied to the stage when the wheel stops */
.sw-stage.glow-rare .sw-wheel { filter: drop-shadow(0 0 22px rgba(64, 196, 255, .55)) drop-shadow(0 10px 28px rgba(0, 0, 0, .55)); }
.sw-stage.glow-epic .sw-wheel { filter: drop-shadow(0 0 30px rgba(177, 140, 255, .75)) drop-shadow(0 10px 28px rgba(0, 0, 0, .55)); }
.sw-stage.glow-legendary .sw-wheel { filter: drop-shadow(0 0 38px rgba(255, 215, 0, .9)) drop-shadow(0 10px 28px rgba(0, 0, 0, .55)); }

/* official emblem hub */
.sw-hub {
  position: absolute;
  left: 50%; top: 50%;
  width: 27%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #1B2450, #0A0F1E 72%);
  border: 2px solid rgba(255, 215, 0, .65);
  box-shadow: 0 0 0 5px rgba(10, 15, 30, .9), 0 0 22px rgba(255, 215, 0, .35), inset 0 0 18px rgba(138, 43, 226, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
}
.sw-hub img { width: 76%; height: 76%; filter: drop-shadow(0 0 8px rgba(255, 215, 0, .5)); }
.sw-stage.glow-legendary .sw-hub img { animation: swHubPulse 1.1s ease-in-out infinite; }
@keyframes swHubPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}

.sw-status {
  text-align: center;
  color: var(--muted, #A7ACC2);
  font-weight: 700;
  margin: 10px 0 2px;
  min-height: 1.4em;
}
.sw-btn { display: block; margin: 12px auto 0; min-width: min(78vw, 300px); }
.sw-btn[disabled] { opacity: .55; cursor: default; }

.sw-how { margin: 6px 0 2px; padding-left: 1.3em; color: var(--muted, #A7ACC2); line-height: 1.75; }
.sw-how li::marker { color: #FFD700; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .sw-pointer.tick { animation: none; }
  .sw-stage.glow-legendary .sw-hub img { animation: none; }
}
