:root {
  --theme: #e43f5a;
  --accent: #14b8a6;
  --panel: rgba(255, 255, 255, 0.92);
  --ink: #111827;
  --muted: #667085;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: #fff;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: linear-gradient(135deg, #101828 0%, #233876 55%, #161616 100%);
}
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.brand h1 { margin: 0; font-size: clamp(30px, 5vw, 58px); letter-spacing: 0; }
.brand p { margin: 10px 0 0; color: rgba(255,255,255,.76); font-size: 17px; }
.admin-link, .ghost-btn { color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.35); padding: 10px 14px; border-radius: 8px; background: rgba(255,255,255,.08); }
.hero-grid { display: grid; grid-template-columns: minmax(300px, 430px) 1fr; gap: 22px; align-items: stretch; }
.control-panel, .stage-panel, .prize-strip, .result-panel { color: var(--ink); background: var(--panel); border: 1px solid rgba(255,255,255,.55); border-radius: 8px; box-shadow: 0 22px 60px rgba(0,0,0,.24); }
.control-panel { padding: 22px; }
.field { display: grid; gap: 8px; margin-bottom: 15px; }
.field label { color: #344054; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #d0d5dd; border-radius: 8px; padding: 12px; color: #101828; background: #fff; }
.mode-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 18px; }
.mode-tabs button { min-height: 42px; border-radius: 8px; color: #344054; background: #eef2f6; }
.mode-tabs button.active { color: #fff; background: var(--theme); }
.primary-btn { width: 100%; min-height: 48px; color: #fff; background: var(--theme); border-radius: 8px; font-weight: 800; }
.secondary-btn { min-height: 40px; padding: 0 14px; color: #fff; background: var(--accent); border-radius: 8px; }
.hint { min-height: 22px; color: var(--muted); }
.card-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.metric { background: #f8fafc; border-radius: 8px; padding: 12px; }
.metric strong { display: block; font-size: 22px; color: var(--theme); }
.stage-panel { display: grid; min-height: 480px; padding: 22px; place-items: center; overflow: hidden; }
.stage { width: min(100%, 520px); aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.wheel { width: 92%; height: 92%; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; text-align: center; background: conic-gradient(var(--theme), #f59e0b, var(--accent), #6366f1, var(--theme)); border: 14px solid rgba(255,255,255,.9); box-shadow: inset 0 0 0 8px rgba(0,0,0,.08), 0 18px 44px rgba(0,0,0,.24); transition: transform 2.4s cubic-bezier(.12,.72,.15,1); }
.pointer { position: absolute; top: 6px; width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 42px solid #fff; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.gacha-machine { width: 76%; height: 86%; border-radius: 42% 42% 12px 12px; background: linear-gradient(#fff, #e6f3ff 45%, var(--theme) 46%); border: 8px solid #fff; position: relative; overflow: hidden; }
.gacha-machine::before, .gacha-machine::after { content: ""; position: absolute; border-radius: 50%; background: var(--accent); opacity: .85; }
.gacha-machine::before { width: 72px; height: 72px; left: 18%; top: 26%; }
.gacha-machine::after { width: 96px; height: 96px; right: 16%; top: 20%; background: #f59e0b; }
.stage.animating .gacha-machine { animation: shake .8s linear infinite; }
.arrow-target { width: 82%; height: 82%; border-radius: 50%; background: radial-gradient(circle, #fff 0 14%, var(--theme) 15% 28%, #fff 29% 43%, var(--accent) 44% 62%, #fff 63%); position: relative; }
.arrow { position: absolute; left: -16%; top: 48%; width: 58%; height: 8px; border-radius: 8px; background: #111827; transition: transform 1.1s ease, left 1.1s ease; }
.arrow::after { content: ""; position: absolute; right: -18px; top: -10px; border-left: 24px solid #111827; border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.stage.animating .arrow { left: 32%; transform: rotate(-8deg); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(100px, 180px)); gap: 16px; }
.lucky-card { aspect-ratio: 3 / 4; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 42px; font-weight: 900; background: linear-gradient(160deg, var(--theme), var(--accent)); transform-style: preserve-3d; }
.stage.animating .lucky-card { animation: flip 1s ease both; }
.prize-strip { margin-top: 22px; padding: 18px; }
.prize-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.prize-item { color: var(--ink); background: #fff; border: 1px solid #e4e7ec; border-radius: 8px; padding: 14px; }
.prize-item strong { display: block; margin-bottom: 6px; }
.result-panel { display: none; margin-top: 18px; padding: 18px; }
.result-panel.show { display: block; }
.code-box { word-break: break-all; margin-top: 10px; padding: 12px; color: #101828; background: #fff7ed; border: 1px dashed #f97316; border-radius: 8px; font-weight: 800; }
@keyframes shake { 0%,100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-8px) rotate(-3deg); } 75% { transform: translateX(8px) rotate(3deg); } }
@keyframes flip { from { transform: rotateY(0); } to { transform: rotateY(720deg); } }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .topbar { align-items: flex-start; flex-direction: column; } .mode-tabs { grid-template-columns: repeat(2, 1fr); } }
