/* Minimal custom styles — rely on Bootstrap variables wherever possible */
:root{
  --wheel-bg-1: rgba(0,0,0,.03);
  --wheel-bg-2: rgba(0,0,0,.08);
  --wheel-pill-bg: var(--bs-body-bg);
  --pill-text: var(--bs-emphasis-color);
}
[data-bs-theme="dark"]{
  --wheel-bg-1: rgba(255,255,255,.08);
  --wheel-bg-2: rgba(0,0,0,.2);
}

/* --- WHEEL --- */
.wheel-wrap{
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 8px auto;
  aspect-ratio: 1 / 1;
}

canvas#wheel{
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(60% 60% at 50% 40%, var(--wheel-bg-1), var(--wheel-bg-2) 60%),
    transparent;
  border: 1px solid var(--bs-border-color);
}

/* pointer at the top */
.pointer{
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 28px solid var(--bs-warning);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
  z-index: 3;
}

/* inner ring behind the button */
.center-cap{
  position: absolute;
  width: 30%;
  height: 30%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(80% 80% at 30% 30%, rgba(0,0,0,.04), rgba(0,0,0,.08) 70%),
    rgba(255,255,255,.04);
  border: 1px solid var(--bs-border-color);
  box-shadow:
    inset 0 0 0 6px rgba(0,0,0,.03),
    0 6px 18px rgba(0,0,0,.08);
  z-index: 1;
  pointer-events: none;
}

/* Centered Spin button (Bootstrap button with a couple tweaks) */
.spin-btn{
  position: absolute;
  z-index: 2;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 28%;
  height: 28%;
  min-width: 110px;
  min-height: 110px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: .04em;
  box-shadow: 0 12px 24px rgba(0,0,0,.12), inset 0 -3px 8px rgba(0,0,0,.12);
}
.spin-btn:active{
  transform: translate(-50%, -50%) scale(0.98);
}

/* Result pill look is handled in canvas text; container here just reserves space */
.result{ min-height: 34px; }

/* Entry rows use Bootstrap input-groups; keep pinned style neutral */
.entry-row.spin-again .form-control{
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  cursor: not-allowed;
}

/* --- Shimmer for "Spin again!" --- */
.shimmer{
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0; transform: translateX(-140%);
  background:
    linear-gradient(112deg,
      transparent 0%,
      transparent 35%,
      rgba(255,255,255,.10) 45%,
      rgba(255,255,255,.85) 50%,
      rgba(255,255,255,.10) 55%,
      transparent 65%,
      transparent 100%),
    radial-gradient(80vmax 80vmax at 50% 50%, rgba(var(--bs-primary-rgb,13,110,253),.18), transparent 60%);
  transition: opacity .2s ease;
}
.shimmer.active{
  opacity: 1;
  animation: shimmer-sweep 900ms ease forwards;
}
@keyframes shimmer-sweep{
  from{ transform: translateX(-140%); }
  to{ transform: translateX(140%); }
}

/* Confetti canvas overlay */
#confetti{
  position: fixed; inset: 0; z-index: 1000; pointer-events: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .shimmer{ animation: none !important; }
}