/* =========================================================
   SPIN PAGE — specific styles
   These extend style.css (which is loaded first).
========================================================= */

.sp-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   HERO
========================================================= */
.sp-hero {
  position: relative;
  padding: 100px 24px 60px;
  text-align: center;
  overflow: hidden;
}

.sp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 45% at 85% 15%, rgba(255, 107, 69, 0.12), transparent 65%),
    radial-gradient(55% 50% at 15% 20%, rgba(139, 92, 246, 0.18), transparent 70%);
}

.sp-hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.sp-hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  color: var(--white);
  margin: 0;
}

.sp-hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  max-width: 480px;
  line-height: 1.6;
  margin: 0;
}

/* =========================================================
   SECTION WRAPPER
========================================================= */
.sp-section {
  border-top: 1px solid var(--border);
  padding: 56px 0 100px;
}

/* =========================================================
   WHEEL + PANEL LAYOUT
========================================================= */
.sp-wheel-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 56px;
  margin-bottom: 90px;
}

.sp-wheel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sp-shuffle-btn {
  font-size: 13.5px;
  padding: 10px 22px;
}

/* ---- the wheel itself ---- */
.sp-wheel-wrap {
  position: relative;
  width: 440px;
  height: 440px;
  flex-shrink: 0;
}

.sp-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid var(--surface);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35), 0 20px 60px rgba(5, 4, 16, 0.6);
  position: relative;
  transition: transform 5s cubic-bezier(0.12, 0.72, 0.14, 1), opacity 0.25s ease;
}

.sp-wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 96px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #0d0b1a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.sp-wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--rust));
  border: 4px solid var(--bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 3;
}

.sp-pointer {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 19px solid transparent;
  border-right: 19px solid transparent;
  border-top: 36px solid var(--orange-light);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  z-index: 4;
  transform-origin: 50% 0%;
  transition: transform 0.08s ease;
}

.sp-pointer.tick { transform: translateX(-50%) rotate(-14deg); }

/* ---- side panel ---- */
.sp-panel {
  width: 100%;
  max-width: 340px;
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.09), rgba(255, 107, 69, 0.03) 60%), rgba(20, 19, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 26px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(5, 4, 16, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sp-panel-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: panel-in 0.4s ease both;
}

@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.panel-eyebrow {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.panel-text {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 18px;
}

.error-text { color: #ff8f7a; }

/* ---- spin dots (3 pips) ---- */
.sp-spin-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sp-spin-dot {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.sp-spin-dot.filled {
  background: linear-gradient(135deg, var(--orange), var(--rust));
  border-color: transparent;
  transform: scale(1.08);
}

.sp-spins-left {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 20px;
}

.sp-spin-btn {
  width: 100%;
  font-size: 17px;
  padding: 16px;
}

.sp-spin-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.sp-reset-note {
  font-size: 12.5px;
  color: var(--muted);
  margin: 12px 0 0;
}

.sp-reset-note strong { color: var(--orange-light); }

/* ---- refill box ---- */
.sp-refill-box {
  margin-top: 18px;
  padding: 16px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: left;
}

.sp-refill-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 6px;
}

.sp-refill-text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 12px;
}

.sp-refill-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-refill-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.sp-refill-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--rust));
  width: 0%;
  transition: width 0.4s ease;
}

.sp-refill-progress span {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-light);
  flex-shrink: 0;
}

/* =========================================================
   INSTRUCTIONS
========================================================= */
.sp-prizes-head { text-align: center; margin-bottom: 32px; }

.sp-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.sp-how-card {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.05), transparent 45%), var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}

.sp-how-icon { font-size: 26px; margin-bottom: 10px; }

.sp-how-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 8px;
}

.sp-how-card p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.sp-how-card strong { color: var(--orange-light); }

/* ---- prize odds table ---- */
.sp-prize-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}

.sp-prize-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.sp-prize-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.sp-prize-row-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--white);
}

.sp-prize-row-odds {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* =========================================================
   RESULT MODAL
========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlay-in 0.2s ease both;
}

@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.1), rgba(255, 107, 69, 0.03) 60%), rgba(20, 19, 42, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 24px;
  padding: 34px 28px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(5, 4, 16, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: modal-in 0.25s ease both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.rf-draw-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.sp-result-icon {
  font-size: 44px;
  margin-bottom: 6px;
  animation: winner-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes winner-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.sp-result-points {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--orange-light), var(--rust-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 4px 0;
}

.sp-result-points.sp-result-lose {
  font-size: 18px;
  background: none;
  -webkit-text-fill-color: initial;
  color: var(--muted);
}

.sp-result-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 640px) {
  .sp-hero { padding: 70px 20px 50px; }
  .sp-wheel-wrap { width: 320px; height: 320px; }
  .sp-panel { padding: 26px 22px; }
}
