/* build导入器 · 投票抽奖页
   视觉完全对齐面板设计系统（fuhong-dashboard 配色 / 组件规范）：
   浅蓝渐变背景 + 白色卡片 + 蓝色渐变主按钮 + slate 灰文字 */

:root {
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-800: #1e40af;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  --green: #10b981;
  --green-50: #ecfdf5;
  --green-700: #047857;
  --orange: #f59e0b;
  --orange-50: #fff7ed;
  --purple: #8b5cf6;
  --purple-50: #f5f3ff;
  --red: #ef4444;
  --red-600: #dc2626;
  --red-50: #fef2f2;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-pop: 0 8px 24px rgba(15, 23, 42, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f0f4ff 0%, #f8faff 100%);
  color: var(--slate-800);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-600); text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 60px; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--slate-200);
}
.topbar-in {
  max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 60px;
  display: flex; align-items: center; gap: 14px;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 16px; color: var(--slate-900); letter-spacing: .2px;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, .35);
}
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav button {
  background: transparent; border: 0; color: var(--slate-500);
  font-size: 14px; font-family: inherit; padding: 7px 14px; border-radius: 999px;
  cursor: pointer; transition: .18s;
}
.nav button:hover { color: var(--blue-600); background: var(--blue-50); }
.nav button.on { color: var(--blue-700, #1d4ed8); background: var(--blue-50); font-weight: 600; }
.spacer { flex: 1; }

/* ===== 卡片 ===== */
.card {
  background: #fff; border: 1px solid var(--slate-200);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-card);
  margin-top: 16px;
}
.card h3 {
  margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--slate-900);
  display: flex; align-items: center; gap: 8px;
}
.card h3::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}
.sub { color: var(--slate-500); font-size: 13px; }
.hl { color: var(--blue-600); font-weight: 600; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ===== 表单 ===== */
input, textarea, select {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--slate-800);
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-sm);
  padding: 9px 12px; outline: none; transition: .18s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
label.field { display: block; margin-top: 12px; font-size: 13px; color: var(--slate-600); }
label.field input, label.field textarea, label.field select { margin-top: 6px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; font-family: inherit; line-height: 1.4;
  cursor: pointer; transition: .2s; white-space: nowrap; user-select: none;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, .3);
}
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, .4); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn.ghost {
  background: #fff; color: var(--slate-600); border-color: var(--slate-200); box-shadow: none;
}
.btn.ghost:not(:disabled):hover {
  color: var(--blue-600); border-color: var(--blue-100); background: var(--blue-50);
  transform: none; box-shadow: none;
}
.btn.danger { background: linear-gradient(135deg, #f87171, #ef4444); box-shadow: 0 2px 8px rgba(239, 68, 68, .28); }

/* ===== 标签 ===== */
.tag {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 500;
  padding: 2px 9px; border-radius: 999px;
  background: var(--blue-50); color: var(--blue-600);
}
.tag.ok { background: var(--green-50); color: var(--green-700); }
.tag.warn { background: var(--orange-50); color: #b45309; }
.tag.err { background: var(--red-50); color: var(--red-600); }

/* ===== 抽奖滚轮 ===== */
.wheel-box {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--slate-200); padding: 26px 0;
  background:
    radial-gradient(600px 180px at 50% 0%, rgba(59, 130, 246, .10), transparent 70%),
    linear-gradient(180deg, #f8faff, #ffffff);
}
.wheel-track { display: flex; gap: 18px; will-change: transform; }
.wheel-item {
  flex: 0 0 200px; height: 124px; border-radius: var(--radius);
  border: 1px solid var(--slate-200); background: #fff;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 10px; text-align: center;
}
.wheel-item .pi { font-size: 28px; line-height: 1; }
.wheel-item .pn { font-size: 14px; font-weight: 600; color: var(--slate-900); }
.wheel-item .pq { font-size: 12px; color: var(--slate-500); }
.wheel-center {
  position: absolute; left: 50%; top: 12px; bottom: 12px; width: 216px;
  transform: translateX(-50%); pointer-events: none;
  border: 2px solid var(--blue-500); border-radius: var(--radius);
  background: rgba(255, 255, 255, .35);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .10), 0 8px 28px rgba(59, 130, 246, .22);
}
.wheel-center::before, .wheel-center::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  border-left: 9px solid transparent; border-right: 9px solid transparent;
}
.wheel-center::before { top: -11px; border-top: 10px solid var(--blue-500); }
.wheel-center::after { bottom: -11px; border-bottom: 10px solid var(--blue-500); }
.wheel-fade { position: absolute; top: 0; bottom: 0; width: 110px; pointer-events: none; z-index: 3; }
.wheel-fade.l { left: 0; background: linear-gradient(90deg, #f8faff, rgba(248, 250, 255, 0)); }
.wheel-fade.r { right: 0; background: linear-gradient(270deg, #fff, rgba(255, 255, 255, 0)); }

/* ===== 投票选项 ===== */
.opt {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--slate-200); border-radius: var(--radius-sm);
  margin-top: 8px; cursor: pointer; position: relative; overflow: hidden;
  background: #fff; transition: .18s;
}
.opt:hover { border-color: var(--blue-100); background: var(--blue-50); }
.opt.on { border-color: var(--blue-500); background: var(--blue-50); }
.opt .bar {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(59, 130, 246, .16), rgba(59, 130, 246, .06));
  transition: width .3s;
}
.opt .txt { position: relative; z-index: 1; flex: 1; color: var(--slate-800); }
.opt .num { position: relative; z-index: 1; color: var(--slate-500); font-size: 13px; }

/* ===== 清单项 ===== */
.list-item {
  border: 1px solid var(--slate-200); border-radius: var(--radius-sm);
  padding: 13px 14px; margin-top: 10px; background: #fff; transition: .18s;
}
.list-item:hover { border-color: var(--blue-100); box-shadow: var(--shadow-card); }

/* ===== 弹层 ===== */
.mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 18px;
}
.modal {
  width: min(580px, 100%); max-height: 88vh; overflow: auto;
  background: #fff; border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-pop);
}
.modal h3 { margin: 0 0 6px; font-size: 16px; color: var(--slate-900); }

/* ===== 提示 ===== */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: var(--slate-900); color: #fff; padding: 10px 18px;
  border-radius: var(--radius-sm); font-size: 14px; z-index: 90;
  box-shadow: var(--shadow-pop);
}
.empty { text-align: center; color: var(--slate-400); padding: 44px 0; font-size: 13px; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--blue-600); }

@media (max-width: 560px) {
  .wheel-item { flex: 0 0 160px; height: 110px; }
  .wheel-center { width: 176px; }
  .topbar-in { height: 56px; }
  .nav { margin-left: 0; }
}
