:root {
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22c55e;
  --danger: #ef4444;
  --btn: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(1200px 800px at 70% -200px, #1f2937 0%, var(--bg) 60%);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

.app {
  max-width: 1080px;
  margin: 24px auto;
  padding: 0 16px 40px;
}

h1 {
  margin: 16px 0 24px;
  text-align: center;
  font-weight: 800;
}

.wheel-area {
  position: relative;
  width: 520px;
  margin: 0 auto;
}

#wheelCanvas {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.45));
  border-radius: 50%;
}

.pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: var(--accent);
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
  pointer-events: none;
}

.controls {
  margin: 20px auto 8px;
  max-width: 720px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

input[type="text"] {
  flex: 1 1 260px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
  outline: none;
  padding: 10px 12px;
  border-radius: 10px;
}

button {
  background: var(--btn);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.3);
}

button:active {
  transform: translateY(0);
}

button#spinBtn {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  border-color: rgba(0,0,0,.2);
}

button#spinBtn:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.range-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.result {
  text-align: center;
  font-size: 18px;
  margin: 10px auto 18px;
  color: var(--muted);
}

.list-panel {
  margin: 16px auto 0;
  max-width: 720px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px;
}

.list-panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--muted);
}

#optionList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

#optionList li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 8px 10px;
}

#optionList li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#optionList li button {
  background: transparent;
  border-color: rgba(255,255,255,.14);
}

#optionList li button:hover {
  border-color: var(--danger);
  color: var(--danger);
}

footer {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 600px) {
  .wheel-area { width: 92vw; }
}

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal.show { display: flex; }
.modal-content {
  width: min(92vw, 420px);
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
}
.modal-title {
  text-align: center;
  font-weight: 800;
  margin-bottom: 6px;
}
.modal-text {
  text-align: center;
  font-size: 22px;
  color: var(--text);
  margin: 8px 0 14px;
}
.modal-actions {
  display: flex;
  justify-content: center;
}
.modal-actions button {
  min-width: 96px;
} 