:root {
  --bg: #070b14;
  --bg-elev: #0e1524;
  --panel: rgba(16, 24, 40, 0.82);
  --border: rgba(255, 215, 128, 0.14);
  --text: #f4f1e8;
  --muted: #9aa3b5;
  --gold: #f5c542;
  --gold-bright: #ffe08a;
  --cyan: #3de0d0;
  --cyan-dim: rgba(61, 224, 208, 0.18);
  --rose: #ff6b8a;
  --violet: #8b7cf7;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --radius: 20px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.email-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, 100%);
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.email-row input {
  border: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.55);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.redeem-code {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(124, 240, 160, 0.12);
  color: var(--gold-bright);
  word-break: break-all;
  font-weight: 700;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(245, 197, 66, 0.12), transparent 55%),
    radial-gradient(800px 500px at 100% 20%, rgba(61, 224, 208, 0.08), transparent 50%),
    radial-gradient(700px 400px at 0% 80%, rgba(139, 124, 247, 0.1), transparent 45%),
    var(--bg);
  overflow-x: hidden;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite;
}

.orb-a {
  width: 280px;
  height: 280px;
  background: var(--gold);
  top: 10%;
  left: 8%;
}

.orb-b {
  width: 320px;
  height: 320px;
  background: var(--cyan);
  bottom: 8%;
  right: 10%;
  animation-delay: -6s;
}

.orb-c {
  width: 220px;
  height: 220px;
  background: var(--violet);
  top: 45%;
  left: 45%;
  animation-delay: -12s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -24px) scale(1.08);
  }
}

.topbar,
.layout,
.modal {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--gold), #c9891a);
  color: #1a1200;
  font-size: 1.35rem;
  box-shadow: 0 0 28px rgba(245, 197, 66, 0.35);
}

.brand h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.stats {
  display: flex;
  gap: 0.75rem;
}

.stat {
  min-width: 88px;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  text-align: center;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold-bright);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.5rem 1.75rem 2.5rem;
  align-items: start;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem 2rem;
  border-radius: calc(var(--radius) + 8px);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.wheel-wrap {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.wheel-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 66, 0.22), transparent 68%);
  filter: blur(8px);
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

#wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.45));
  transition: transform 4.2s cubic-bezier(0.12, 0.75, 0.08, 1);
}

.pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 36px;
  height: 48px;
  display: flex;
  justify-content: center;
}

.pointer-tip {
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 32px solid var(--gold-bright);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  position: relative;
}

.pointer-tip::after {
  content: "";
  position: absolute;
  top: -30px;
  left: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff6d0, var(--gold));
  box-shadow: 0 0 12px rgba(245, 197, 66, 0.7);
}

.hub {
  position: absolute;
  z-index: 4;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 3px solid rgba(255, 224, 138, 0.85);
  background: radial-gradient(circle at 35% 30%, #fff4c4, var(--gold) 45%, #b87812);
  color: #1a1200;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 8px rgba(245, 197, 66, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.hub:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow:
    0 0 0 10px rgba(245, 197, 66, 0.18),
    0 12px 32px rgba(0, 0, 0, 0.45);
}

.hub:active:not(:disabled) {
  transform: scale(0.97);
}

.hub:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.hub-label {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.hub-sub {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.8;
}

.hint {
  margin: 1.1rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.spin-cta {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 0.95rem 2.4rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0d120f;
  background: linear-gradient(120deg, var(--cyan), #7cf0a0 40%, var(--gold-bright));
  box-shadow: 0 10px 32px rgba(61, 224, 208, 0.28);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.spin-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.spin-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel {
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.panel-head h2 {
  margin: 0;
}

.link-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--cyan);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.link-btn:hover {
  text-decoration: underline;
}

.prize-list,
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.prize-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.prize-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.prize-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.prize-meta {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.prize-odds {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.history-list {
  max-height: 260px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(61, 224, 208, 0.06);
  border: 1px solid rgba(61, 224, 208, 0.1);
  font-size: 0.88rem;
}

.history-item time {
  color: var(--muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.history-empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.5rem 0.25rem;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(100%, 400px);
  padding: 2rem 1.5rem 1.5rem;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(30, 38, 58, 0.98), rgba(12, 16, 28, 0.98));
  border: 1px solid rgba(245, 197, 66, 0.35);
  box-shadow:
    0 0 0 1px rgba(61, 224, 208, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
  overflow: hidden;
  animation: pop 0.35s cubic-bezier(0.2, 1.2, 0.3, 1);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.result-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal-card h3 {
  margin: 0.55rem 0 0.4rem;
  font-size: 1.85rem;
  font-weight: 900;
  background: linear-gradient(120deg, var(--gold-bright), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result-desc {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--cyan-dim);
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-primary {
  color: #0c1210;
  background: linear-gradient(120deg, var(--cyan), var(--gold-bright));
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.9;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(420px) rotate(520deg);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .topbar,
  .layout {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hub {
    width: 78px;
    height: 78px;
  }

  .hub-label {
    font-size: 0.95rem;
  }

  .spin-cta {
    width: 100%;
  }
}
