/* ===================================================================
   wheel-studio  ·  前台 + 后台 共用样式
   =================================================================== */
:root {
  --ws-radius: 18px;
  --ws-text: #f8fafc;
  --ws-muted: rgba(248, 250, 252, 0.62);
  --ws-border: rgba(255, 255, 255, 0.14);
  --ws-panel: rgba(255, 255, 255, 0.07);
  --ws-primary: #f5c542;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ws-text);
  background: #1b0d12;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 页面背景(跟随主题) ---------- */
.ws-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--p1) 0%, transparent 60%),
    radial-gradient(100% 60% at 50% 100%, var(--p3) 0%, transparent 70%),
    linear-gradient(160deg, var(--p2) 0%, var(--p3) 100%);
}
.ws-page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.35;
}

/* ================= 前台 ================= */
.ws-app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 18px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ws-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--ws-muted);
  margin-bottom: 14px;
}
.ws-brand b { color: var(--ws-primary); letter-spacing: 3px; }

.ws-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 0 6px;
  background: linear-gradient(180deg, #fff6d5, #f5c542 60%, #d99a1f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.ws-subtitle { font-size: 13px; color: var(--ws-muted); margin-bottom: 18px; }

/* ---------- 首页顶部: 中奖记录轮播 ---------- */
.ws-winners {
  width: 100%;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.16), rgba(245, 197, 66, 0.04));
  border: 1px solid rgba(245, 197, 66, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.ws-winners::before {
  content: '🎉';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--ws-page, #1b0d12);
  border-radius: 50%;
  border: 1px solid rgba(245, 197, 66, 0.3);
  z-index: 2;
}
.ws-winners::after {
  content: '🎁';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--ws-page, #1b0d12);
  border-radius: 50%;
  border: 1px solid rgba(245, 197, 66, 0.3);
  z-index: 2;
}
.ws-winners-track {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 11px 44px;
  white-space: nowrap;
  animation: ws-winner-scroll 22s linear infinite;
}
@keyframes ws-winner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ws-winner-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ws-text);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.ws-winner-ic { font-size: 17px; line-height: 1; }
.ws-winner-txt b { color: var(--ws-primary); font-weight: 700; }
.ws-winner-txt { color: var(--ws-muted); }
.ws-winner-gap { width: 28px; height: 1px; display: inline-block; }
.ws-winners-empty {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--ws-muted);
  padding: 11px;
}

/* ---------- 转盘 ---------- */
.ws-stage-wrap {
  position: relative;
  padding: 6px;
  border-radius: 50%;
  /* 金色外环的金属高光: 光源在左上, 让圆环看起来是"圆的"而不是贴纸 */
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.14) 38%, transparent 68%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.ws-stage { position: relative; border-radius: 50%; }
.ws-stage canvas { border-radius: 50%; display: block; }
/* 扇面"凹"进金环的立体感: 金环内侧一圈阴影, 让转盘面看起来是嵌在边框里的 */
.ws-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.16), inset 0 0 46px rgba(0, 0, 0, 0.18);
}

.ws-bulbs i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bulb);
  box-shadow: 0 0 9px 2px var(--bulb);
  animation: ws-bulb 0.9s ease-in-out infinite;
}
@keyframes ws-bulb {
  0%, 100% { opacity: 1; filter: brightness(1.25); }
  50% { opacity: 0.28; filter: brightness(0.6); }
}

.ws-pointer {
  position: absolute;
  left: 50%;
  top: -6px;
  width: 28px;
  height: 44px;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
}
.ws-pointer::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 1px;
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 32px solid var(--pointer-b);
}
.ws-pointer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff9e6, var(--pointer-a) 45%, var(--pointer-b));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.ws-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30%;
  height: 30%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 34px 12px var(--accent);
  opacity: 0.32;
  animation: ws-pulse 2.2s ease-in-out infinite;
}
/* 中心「立即抽奖」按钮的立体高光: 上缘亮、下缘暗, 呈凸起圆饼质感 */
.ws-btn-bevel {
  box-shadow:
    inset 0 3px 5px rgba(255, 255, 255, 0.55),
    inset 0 -8px 14px rgba(0, 0, 0, 0.30),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.25);
}
@keyframes ws-pulse {
  0%, 100% { opacity: 0.22; transform: translate(-50%, -50%) scale(0.96); }
  50% { opacity: 0.45; transform: translate(-50%, -50%) scale(1.06); }
}

/* ---------- 信息条 ---------- */
.ws-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.ws-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--ws-panel);
  border: 1px solid var(--ws-border);
  font-size: 13px;
  color: var(--ws-muted);
  backdrop-filter: blur(8px);
}
.ws-chip b { color: var(--ws-primary); font-size: 15px; margin: 0 2px; }

.ws-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 11px 26px;
  font-size: 15px;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.ws-btn:active { transform: scale(0.96); }
.ws-btn-primary {
  color: #5b1a06;
  background: linear-gradient(180deg, #ffe08a, #f5b731);
  box-shadow: 0 8px 20px rgba(245, 183, 49, 0.35);
}
.ws-btn-ghost {
  color: var(--ws-text);
  background: var(--ws-panel);
  border: 1px solid var(--ws-border);
}
.ws-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 卡片 ---------- */
.ws-card {
  width: 100%;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--ws-radius);
  background: var(--ws-panel);
  border: 1px solid var(--ws-border);
  backdrop-filter: blur(10px);
}
.ws-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ws-record-list { display: flex; flex-direction: column; gap: 8px; max-height: 190px; overflow: auto; }
.ws-record {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}
.ws-record span:last-child { margin-left: auto; color: var(--ws-muted); font-size: 12px; }
.ws-empty { font-size: 13px; color: var(--ws-muted); text-align: center; padding: 12px 0; }
.ws-rules { font-size: 12.5px; line-height: 1.9; color: var(--ws-muted); }
.ws-rules li { margin-left: -8px; }

.ws-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  font-size: 13px;
  z-index: 99;
  animation: ws-fade 2s forwards;
}
@keyframes ws-fade {
  0% { opacity: 0; transform: translate(-50%, 12px); }
  15%, 70% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; }
}

/* ================= 中奖弹窗 ================= */
.ws-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  animation: ws-in 0.25s ease;
}
@keyframes ws-in { from { opacity: 0; } to { opacity: 1; } }
.ws-modal-card {
  position: relative;
  width: 280px;
  padding: 26px 22px 20px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(180deg, #fff8e6, #ffe3b0);
  color: #7c2d12;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
  animation: ws-pop 0.35s cubic-bezier(0.18, 1.4, 0.5, 1);
}
@keyframes ws-pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ws-modal-halo {
  position: absolute;
  left: 50%;
  top: -34px;
  width: 150px;
  height: 150px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.55), transparent 65%);
  pointer-events: none;
}
.ws-modal-icon { font-size: 52px; line-height: 1; margin-bottom: 8px; }
.ws-modal-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.ws-modal-desc { font-size: 13px; color: #a3663a; margin-bottom: 18px; }
.ws-modal-actions { display: flex; gap: 10px; }
.ws-modal .ws-btn { flex: 1; padding: 10px 0; font-size: 14px; }
.ws-modal .ws-btn-ghost { color: #7c2d12; background: rgba(124, 45, 18, 0.1); border-color: rgba(124, 45, 18, 0.25); }

.ws-confetti {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.9;
  animation: ws-fall linear forwards;
}
@keyframes ws-fall {
  to { transform: translateY(420px) rotate(540deg); opacity: 0; }
}

/* ---------- 必要项填写表单 ---------- */
.ws-form-card {
  position: relative;
  width: 320px;
  max-height: 82vh;
  overflow: auto;
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  color: #1e293b;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
  animation: ws-pop 0.3s cubic-bezier(0.18, 1.4, 0.5, 1);
}
.ws-form-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.ws-form-sub { font-size: 12px; color: #64748b; margin-bottom: 14px; }
.ws-form-body { display: flex; flex-direction: column; gap: 10px; }
.ws-form-field label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 4px;
}
.ws-form-field label i { color: #ef4444; font-style: normal; }
.ws-form-field label em {
  font-style: normal;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #fef3c7;
  color: #b45309;
}
.ws-form-field input {
  width: 100%;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
}
.ws-form-field input:focus { border-color: #f5c542; box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.2); }
.ws-form-err {
  margin: 10px 0 2px;
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #b91c1c;
}
.ws-form-card .ws-btn { color: #1e293b; }
.ws-form-card .ws-btn-ghost { color: #475569; background: #e2e8f0; border-color: #cbd5e1; }
.ws-form-card .ws-btn-primary {
  color: #5b1a06;
  background: linear-gradient(180deg, #ffe08a, #f5b731);
  box-shadow: 0 8px 20px rgba(245, 183, 49, 0.35);
}

/* ---------- 后台: 改密码弹窗(精致版) ---------- */
.ws-pw-card {
  position: relative;
  width: 320px;
  max-height: 86vh;
  overflow: auto;
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  color: #1e293b;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
  animation: ws-pop 0.3s cubic-bezier(0.18, 1.4, 0.5, 1);
}
.ws-pw-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.ws-pw-sub { font-size: 12px; color: #64748b; margin-bottom: 14px; }
.ws-pw-body { display: flex; flex-direction: column; gap: 12px; }
.ws-pw-field label { display: block; font-size: 12px; color: #475569; margin-bottom: 4px; }
.ws-pw-input { position: relative; display: flex; align-items: center; }
.ws-pw-input input {
  width: 100%;
  padding: 9px 38px 9px 11px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
}
.ws-pw-input input:focus { border-color: #f5c542; box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.2); }
.ws-eye {
  position: absolute;
  right: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  color: #94a3b8;
}
.ws-eye:hover { color: #475569; }
.ws-pw-err {
  margin: 12px 0 2px;
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #b91c1c;
}
.ws-pw-card .ws-btn { color: #1e293b; }
.ws-pw-card .ws-btn-ghost { color: #475569; background: #e2e8f0; border-color: #cbd5e1; }
.ws-pw-card .ws-btn-primary {
  color: #5b1a06;
  background: linear-gradient(180deg, #ffe08a, #f5b731);
  box-shadow: 0 8px 20px rgba(245, 183, 49, 0.35);
}

/* ================= 后台 ================= */
.ws-admin { position: relative; z-index: 1; padding: 20px; }
.ws-admin-head {
  max-width: 1240px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ws-admin-head h1 { font-size: 20px; margin: 0; font-weight: 800; letter-spacing: 0.5px; }
.ws-admin-head .ws-chip { font-size: 12px; }
.ws-admin-head .spacer { flex: 1; }

/* ================= 后台: 侧边导航 + 内容区 ================= */
.ws-admin-body {
  display: flex;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
}

/* ---- 左侧导航 ---- */
.ws-nav {
  flex: 0 0 228px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--ws-border);
  border-radius: 16px;
  padding: 14px 10px;
  height: fit-content;
  position: sticky;
  top: 16px;
}
.ws-nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ws-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--ws-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.ws-nav-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--ws-text); }
.ws-nav-item.is-active {
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.22), rgba(245, 197, 66, 0.06));
  color: var(--ws-primary);
  border: 1px solid rgba(245, 197, 66, 0.25);
}
.ws-nav-ic { font-size: 16px; }

/* ---- 右侧内容区 ---- */
.ws-main {
  flex: 1;
  min-width: 0;
  padding: 0 4px;
}
.ws-section {
  display: none;
}
.ws-section.is-active {
  display: block;
  animation: ws-fadeIn 0.25s ease;
}
@keyframes ws-fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 小屏: 导航在上, 内容在下 */
@media (max-width: 820px) {
  .ws-admin-body { flex-direction: column; }
  .ws-nav { flex: none; width: 100%; position: static; }
  .ws-nav-list { flex-direction: row; flex-wrap: wrap; }
  .ws-nav-item { flex: 1 1 auto; }
}

.ws-panel {
  padding: 16px;
  border-radius: var(--ws-radius);
  background: var(--ws-panel);
  border: 1px solid var(--ws-border);
  backdrop-filter: blur(10px);
}
.ws-panel + .ws-panel { margin-top: 14px; }
.ws-panel h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-panel h3::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--ws-primary);
}

.ws-field { margin-bottom: 12px; }
.ws-field label {
  display: block;
  font-size: 12px;
  color: var(--ws-muted);
  margin-bottom: 5px;
}
.ws-input, .ws-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ws-text);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--ws-border);
  border-radius: 10px;
  outline: none;
}
.ws-input:focus, .ws-select:focus { border-color: var(--ws-primary); }
.ws-select option { background: #1b0d12; }
.ws-row { display: flex; gap: 10px; }
.ws-row > * { flex: 1; }

.ws-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ws-theme {
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 12px;
  text-align: center;
  font-size: 11px;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.22);
  transition: border-color 0.15s;
}
.ws-theme.active { border-color: var(--ws-primary); }
.ws-theme i {
  display: block;
  width: 100%;
  height: 26px;
  border-radius: 8px;
  margin-bottom: 5px;
}

.ws-prize-row {
  display: grid;
  grid-template-columns: 40px 1fr 46px 26px;
  gap: 5px;
  align-items: center;
  margin-bottom: 4px;
}
.ws-prize-row .ws-input { padding: 6px 7px; font-size: 12px; }
.ws-prize-sub {
  display: grid;
  grid-template-columns: 42px 42px 1fr 54px;
  gap: 5px;
  align-items: center;
  margin-bottom: 10px;
}
.ws-rate {
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  color: var(--ws-primary);
  background: rgba(245, 197, 66, 0.14);
  border-radius: 6px;
  padding: 3px 4px;
  white-space: nowrap;
}
.ws-prize-sub input[type='color'] {
  width: 100%;
  height: 29px;
  padding: 2px;
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.ws-prize-row input[type='number']::-webkit-outer-spin-button,
.ws-prize-row input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ws-icon-btn {
  width: 100%;
  height: 32px;
  font-size: 17px;
  line-height: 1;
  padding: 0;
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
}
.ws-icon-btn:hover {
  transform: translateY(-1px);
  border-color: var(--ws-primary);
}
.ws-icon-picker {
  position: fixed;
  z-index: 9999;
  width: 268px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--ws-border);
  background: #1c1a2b;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.ws-icon-grp + .ws-icon-grp { margin-top: 8px; }
.ws-icon-grp-label {
  font-size: 11px;
  color: var(--ws-muted);
  margin-bottom: 4px;
}
.ws-icon-grp-items {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.ws-icon-cell {
  height: 38px;
  font-size: 19px;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.ws-icon-cell:hover { background: rgba(255, 255, 255, 0.16); }
.ws-icon-cell.is-on {
  border-color: var(--ws-primary);
  background: rgba(245, 197, 66, 0.22);
}
.ws-icon-custom { margin-top: 10px; }
.ws-icon-del {
  border: none;
  background: rgba(255, 107, 107, 0.18);
  color: #ff9b9b;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.ws-prize-head {
  display: grid;
  grid-template-columns: 40px 1fr 46px 26px;
  gap: 5px;
  font-size: 10.5px;
  color: var(--ws-muted);
  margin-bottom: 6px;
  text-align: center;
}

/* ---------- 字段配置行 ---------- */
.ws-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  margin-bottom: 5px;
}
.ws-field-row > span { flex: 1; }
.ws-field-row.is-auto { opacity: 0.72; }
.ws-field-row.is-auto em {
  font-style: normal;
  font-size: 11px;
  color: var(--ws-primary);
  background: rgba(245, 197, 66, 0.14);
  padding: 2px 8px;
  border-radius: 6px;
}
.ws-field-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ws-muted);
  cursor: pointer;
  margin: 0;
}
.ws-field-row input[type='checkbox'] { width: auto; cursor: pointer; }

.ws-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 18px 30px;
}
.ws-preview .ws-stage-wrap { margin-bottom: 6px; }
.ws-preview-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.ws-preview-sub { font-size: 12.5px; color: var(--ws-muted); margin-bottom: 18px; }

.ws-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; justify-content: center; }
.ws-actions .ws-btn { padding: 9px 18px; font-size: 13px; }

/* ---------- 抽奖活动 ---------- */
.ws-campaign-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.14), rgba(245, 197, 66, 0.04));
  border: 1px solid rgba(245, 197, 66, 0.28);
  margin-bottom: 14px;
}
.ws-campaign-card .cc-name { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.ws-campaign-card .cc-meta { font-size: 12px; color: var(--ws-muted); display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ws-campaign-card .cc-meta b { color: var(--ws-text); font-weight: 600; }
.ws-campaign-card .cc-stats { display: flex; gap: 14px; margin-bottom: 12px; }
.ws-campaign-card .cc-stat { font-size: 11px; color: var(--ws-muted); }
.ws-campaign-card .cc-stat b { color: var(--ws-primary); font-size: 15px; display: block; }
.ws-campaign-card .cc-stock-title { font-size: 12px; font-weight: 700; color: var(--ws-text); margin-bottom: 6px; }
.ws-campaign-card .cc-stocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ws-campaign-card .cc-stock-row { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.05); }
.ws-campaign-card .cc-stock-icon { font-size: 14px; }
.ws-campaign-card .cc-stock-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-campaign-card .cc-stock-num { color: var(--ws-muted); font-size: 11px; }
.ws-campaign-card .cc-stock-num b { color: var(--ws-primary); }
.ws-campaign-empty { font-size: 13px; color: var(--ws-muted); padding: 14px 0; text-align: center; }

.ws-camp-history { margin-top: 14px; }
.ws-camp-history-label { font-size: 12px; color: var(--ws-muted); margin-bottom: 8px; font-weight: 600; }
.ws-camp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--ws-border);
  margin-bottom: 8px;
}
.ws-camp-row .cr-name { flex: 1; font-size: 13px; font-weight: 600; }
.ws-camp-row .cr-meta { font-size: 11px; color: var(--ws-muted); }
.ws-camp-row .cr-actions { display: flex; gap: 6px; }
.ws-camp-row .cr-actions .ws-btn { padding: 5px 12px; font-size: 12px; }

/* 活动状态标签 */
.ws-camp-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.ws-camp-tag.is-ongoing { background: rgba(123, 211, 137, 0.18); color: #7bd389; }
.ws-camp-tag.is-finished { background: rgba(148, 163, 184, 0.16); color: var(--ws-muted); }

/* 中奖记录: 日期筛选行 */
.ws-rec-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; background: rgba(0, 0, 0, 0.18); border: 1px solid var(--ws-border); border-radius: 12px; }
.ws-rec-filter label { font-size: 12px; color: var(--ws-text); opacity: 0.85; }
.ws-rec-filter .ws-input-date { width: auto; flex: 0 0 auto; }
.ws-rec-filter .ws-btn { padding: 8px 14px; font-size: 12px; }

/* 日期快捷筛选(今天 / 近 7 天 / 近 30 天 / 本月) */
.ws-rec-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ws-rec-quick-label { font-size: 12px; color: var(--ws-text); opacity: 0.7; }
.ws-chip-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-family: inherit;
  color: var(--ws-text);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--ws-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ws-chip-btn:hover { border-color: var(--ws-primary); color: var(--ws-primary); }
.ws-chip-btn.is-on { background: var(--ws-primary); border-color: var(--ws-primary); color: #2b1500; font-weight: 700; }

.ws-code {
  width: 100%;
  min-height: 260px;
  padding: 12px;
  font-family: Consolas, Monaco, monospace;
  font-size: 11.5px;
  line-height: 1.6;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--ws-border);
  border-radius: 12px;
  resize: vertical;
  outline: none;
}

.ws-hint { font-size: 11.5px; color: var(--ws-muted); line-height: 1.7; margin-top: 8px; }
.ws-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  background: rgba(245, 197, 66, 0.16);
  color: var(--ws-primary);
}
/* 活动规则被手动编辑过时, 标签改为实心以示"不再自动跟随" */
.ws-tag.is-solid { background: var(--ws-primary); color: #2b1500; font-weight: 700; }
.ws-link { color: var(--ws-primary); font-size: 12.5px; text-decoration: none; }
.ws-link:hover { text-decoration: underline; }

/* ---------- 中奖记录表 ---------- */
.ws-rec-wrap {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--ws-border);
  background: rgba(0, 0, 0, 0.22);
}
.ws-rec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ws-rec-table th, .ws-rec-table td {
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--ws-border);
}
.ws-rec-table th {
  position: sticky;
  top: 0;
  background: rgba(40, 22, 28, 0.96);
  color: var(--ws-primary);
  font-weight: 700;
  z-index: 1;
}
.ws-rec-table tbody tr:hover { background: rgba(245, 197, 66, 0.08); }
.ws-rec-table td:last-child { white-space: normal; }

/* ---------- 登录页 ---------- */
.ws-login-body {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ws-login-card {
  width: 340px;
  max-width: 92vw;
  padding: 34px 28px 24px;
  border-radius: var(--ws-radius);
  background: var(--ws-panel);
  border: 1px solid var(--ws-border);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.ws-login-logo { font-size: 46px; }
.ws-login-card h1 { font-size: 20px; margin: 10px 0 4px; }
.ws-login-sub { color: var(--ws-muted); font-size: 13px; margin: 0 0 18px; }
.ws-login-card label {
  display: block;
  text-align: left;
  font-size: 12.5px;
  color: var(--ws-muted);
  margin: 12px 0 6px;
}
.ws-login-card .ws-input { width: 100%; }
.ws-login-btn { width: 100%; margin-top: 16px; padding: 10px; font-size: 14px; }
.ws-login-err { color: #ff9b9b; font-size: 12.5px; min-height: 18px; margin-top: 10px; }
.ws-login-hint { color: var(--ws-muted); font-size: 11.5px; margin-top: 14px; line-height: 1.6; }
.ws-login-card .ws-link { display: inline-block; margin-top: 14px; }

/* ---------- 后台: 账号徽标 / 只读提示 ---------- */
.ws-me {
  font-size: 12.5px;
  color: var(--ws-text);
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 999px;
}
.ws-perm-banner {
  margin: 14px auto 0;
  max-width: 1180px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 155, 0, 0.14);
  border: 1px solid rgba(255, 155, 0, 0.4);
  color: #ffd9a0;
  font-size: 13px;
}
/* 只读: 禁用配置编辑区 */
.ws-section.ws-locked { pointer-events: none; opacity: 0.92; filter: grayscale(0.15); }

/* ---------- 后台: 用户管理 ---------- */
.ws-sub { margin: 16px 0 8px; font-size: 13.5px; color: var(--ws-muted); font-weight: 600; }
.ws-user-row {
  border: 1px solid var(--ws-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.ws-user-head { display: flex; align-items: center; gap: 8px; }
.ws-user-head .spacer { flex: 1; }
.ws-user-del { padding: 4px 10px; font-size: 12px; }
.ws-perms { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.ws-perms-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ws-text);
  cursor: pointer;
}
.ws-perms-item input { width: auto; }

/* ---------- 后台: 活动配置弹窗 ---------- */
.ws-cfg-modal {
  position: relative;
  width: min(1180px, 96vw);
  height: min(820px, 92vh);
  background: #1a1118;
  border: 1px solid var(--ws-border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.ws-cfg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ws-border);
  background: rgba(0, 0, 0, 0.2);
}
.ws-cfg-title { font-size: 19px; font-weight: 700; }
.ws-cfg-sub { font-size: 12.5px; color: var(--ws-muted); margin-top: 2px; }
.ws-cfg-close {
  background: none;
  border: none;
  color: var(--ws-muted);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
}
.ws-cfg-close:hover { color: var(--ws-text); background: rgba(255, 255, 255, 0.08); }

.ws-cfg-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.ws-cfg-left {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ws-cfg-left::-webkit-scrollbar { width: 8px; }
.ws-cfg-left::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.ws-cfg-section {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ws-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.ws-cfg-section h4 {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ws-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-cfg-section h4 .ws-tag { margin-left: auto; font-size: 11px; }

.ws-cfg-preview {
  width: 340px;
  flex-shrink: 0;
  border-left: 1px solid var(--ws-border);
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px;
  gap: 10px;
}
.ws-cfg-preview .ws-preview-title { font-size: 15px; font-weight: 700; }
.ws-cfg-preview .ws-preview-sub { font-size: 11.5px; color: var(--ws-muted); }
.ws-cfg-preview .ws-stage-wrap { display: flex; justify-content: center; }
.ws-cfg-preview .ws-stage { width: 300px; height: 300px; }
.ws-cfg-preview #cfg-lastResult { font-size: 11px; color: var(--ws-muted); }

.ws-cfg-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--ws-border);
  background: rgba(0, 0, 0, 0.2);
}

/* 弹窗遮罩里禁用背景滚动 */
body.ws-modal-open { overflow: hidden; }

/* 响应式: 小屏上下布局 */
@media (max-width: 820px) {
  .ws-cfg-body { flex-direction: column; }
  .ws-cfg-preview { width: 100%; border-left: none; border-top: 1px solid var(--ws-border); padding: 12px; }
  .ws-cfg-preview .ws-stage { width: 260px; height: 260px; }
}
