/* ============================================
   长春市禁毒教育有奖问答 - 答题端样式
   风格：浅雾蓝 + 毛玻璃卡片 + 蓝紫渐变 + 大圆角
   ============================================ */
:root {
  --brand-1: #2b6ef3;
  --brand-2: #7b4dff;
  --brand-grad: linear-gradient(135deg, #2b6ef3 0%, #7b4dff 100%);
  --bg-1: #eaf2ff;
  --bg-2: #f4efff;
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --text: #1c2333;
  --text-sub: #6b7488;
  --border: rgba(43, 110, 243, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 12px 40px rgba(43, 110, 243, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, var(--bg-1) 0%, #eef7f5 40%, var(--bg-2) 100%);
  min-height: 100vh;
  color: var(--text);
}

/* 背景装饰光晕 */
.bg-orb { position: fixed; border-radius: 50%; filter: blur(60px); opacity: .45; pointer-events: none; z-index: 0; }
.bg-orb-1 { width: 320px; height: 320px; background: #cfe0ff; top: -80px; right: -100px; }
.bg-orb-2 { width: 280px; height: 280px; background: #e3d4ff; bottom: -60px; left: -90px; }

.page {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto; padding: 20px 16px 40px;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* ============ 顶部横幅 ============ */
.hero {
  text-align: center; padding: 22px 8px 18px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.75); border: 1px solid rgba(43,110,243,.15);
  border-radius: 50px; padding: 6px 14px; font-size: 13px; color: var(--brand-1);
  font-weight: 600; backdrop-filter: blur(8px); margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(43,110,243,.10);
}
.badge-icon { font-size: 15px; }
.hero-title {
  font-size: 24px; font-weight: 800; letter-spacing: 1px;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subtitle { margin-top: 8px; font-size: 14px; color: var(--text-sub); letter-spacing: 2px; }

/* 四步进度 */
.steps {
  display: flex; align-items: center; justify-content: center;
  margin-top: 22px;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 52px; }
.step-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: 2px solid rgba(43,110,243,.22);
  display: flex; align-items: center; justify-content: center;
  color: #9aa4bd; font-size: 14px; font-weight: 700;
  transition: all .3s;
}
.step.active .step-dot { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(96,100,255,.4); }
.step.done .step-dot { background: rgba(43,110,243,.12); border-color: rgba(43,110,243,.35); color: var(--brand-1); }
.step-label { font-size: 12px; color: #9aa4bd; font-weight: 600; }
.step.active .step-label { color: var(--brand-1); }
.step.done .step-label { color: var(--brand-1); }
.step-line { width: 28px; height: 2px; background: rgba(43,110,243,.18); border-radius: 2px; margin: 0 4px; margin-bottom: 24px; }
.step-line.done { background: var(--brand-grad); }

.activity-meta {
  margin-top: 16px; max-width: 420px; margin-left: auto; margin-right: auto;
  background: rgba(255,255,255,.65); border: 1px solid rgba(43,110,243,.14);
  border-radius: 16px; padding: 10px 16px;
  display: flex; flex-direction: column; gap: 8px;
  backdrop-filter: blur(8px);
}
.meta-item { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--text-sub); }
.meta-item b { color: var(--brand-1); font-size: 15px; }
.meta-icon { font-size: 14px; }
.meta-bar { height: 6px; background: rgba(43,110,243,.10); border-radius: 6px; overflow: hidden; }
.meta-fill { height: 100%; background: var(--brand-grad); border-radius: 6px; transition: width .5s; }

/* ============ 卡片 ============ */
.card {
  background: var(--card); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 22px; flex: 1;
}
.panel { display: none; animation: fadeIn .35s ease; }
.panel.active { display: block; }
.panel-center { text-align: center; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.panel-icon { font-size: 42px; text-align: center; margin-bottom: 8px; }
.panel-title { font-size: 20px; font-weight: 800; text-align: center; }
.panel-desc { margin: 10px auto 22px; font-size: 14px; color: var(--text-sub); line-height: 1.7; text-align: center; max-width: 420px; }

/* 表单 */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.form-group input {
  width: 100%; padding: 14px 16px; font-size: 15px;
  border: 1.5px solid var(--border); border-radius: 14px; outline: none;
  background: rgba(255,255,255,.92); transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus { border-color: var(--brand-1); box-shadow: 0 0 0 3px rgba(43,110,243,.12); }

/* 按钮 */
.btn {
  border: none; cursor: pointer; font-size: 15px; font-weight: 700;
  border-radius: 50px; padding: 13px 28px; transition: transform .15s, box-shadow .2s, opacity .2s;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px rgba(96,100,255,.32); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(96,100,255,.42); }
.btn-ghost { background: rgba(43,110,243,.08); color: var(--brand-1); }
.btn-block { width: 100%; margin-top: 6px; padding: 15px; font-size: 16px; }

.tips { margin-top: 16px; font-size: 12px; color: #98a1b6; text-align: center; }

/* ============ 答题区 ============ */
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.quiz-counter { font-size: 15px; font-weight: 800; color: var(--brand-1); }
.quiz-score { font-size: 13px; color: var(--text-sub); font-weight: 600; }
.progress-bar { height: 6px; background: rgba(43,110,243,.10); border-radius: 6px; overflow: hidden; margin-bottom: 22px; }
.progress-fill { height: 100%; background: var(--brand-grad); border-radius: 6px; transition: width .3s; }

.question-title { font-size: 17px; font-weight: 800; line-height: 1.6; margin-bottom: 18px; }
.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.9); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 14px 16px; cursor: pointer; font-size: 15px;
  transition: all .18s; user-select: none;
}
.option:hover { border-color: rgba(43,110,243,.4); }
.option .opt-key {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: rgba(43,110,243,.08); color: var(--brand-1);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.option.selected { background: rgba(43,110,243,.08); border-color: var(--brand-1); box-shadow: 0 0 0 3px rgba(43,110,243,.10); }
.option.selected .opt-key { background: var(--brand-grad); color: #fff; }

.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.quiz-nav .btn { flex: 1; }

/* ============ 抽奖区 ============ */
.draw-stage { display: flex; justify-content: center; margin: 34px 0; }
.draw-btn {
  width: 172px; height: 172px; border-radius: 50%;
  background: var(--brand-grad);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: #fff; cursor: pointer; user-select: none;
  box-shadow: 0 16px 40px rgba(96,100,255,.45), inset 0 -6px 16px rgba(0,0,0,.12), inset 0 4px 12px rgba(255,255,255,.25);
  border: 6px solid rgba(255,255,255,.7);
  transition: transform .15s;
  position: relative;
}
.draw-btn::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px dashed rgba(43,110,243,.35); animation: spin 16s linear infinite;
}
.draw-btn:active { transform: scale(.96); }
.draw-icon { font-size: 52px; }
.draw-text { font-size: 18px; font-weight: 800; letter-spacing: 4px; }

@keyframes spin { to { transform: rotate(360deg); } }

.rules-box {
  background: rgba(255,255,255,.7); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 18px; text-align: left;
}
.rules-box h4 { font-size: 14px; margin-bottom: 10px; color: var(--brand-1); }
.rules-box ul { list-style: none; }
.rules-box li { font-size: 13px; color: var(--text-sub); padding: 4px 0; padding-left: 16px; position: relative; }
.rules-box li::before { content: '·'; position: absolute; left: 4px; color: var(--brand-1); font-weight: 800; }

/* ============ 结果区 ============ */
.result-box { padding: 10px 0 20px; }
.result-emoji { font-size: 72px; margin-bottom: 10px; animation: bounceIn .6s ease; }
@keyframes bounceIn { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.result-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.result-title.win { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-title.lose { color: var(--text); }
.result-sub { font-size: 15px; color: var(--text-sub); margin-bottom: 22px; }

.result-card {
  background: rgba(255,255,255,.85); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 6px 18px; text-align: left; max-width: 400px; margin: 0 auto;
}
.result-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed rgba(43,110,243,.15); font-size: 14px; }
.result-row:last-child { border-bottom: none; }
.result-row span { color: var(--text-sub); }
.result-row b { color: var(--text); font-weight: 700; }

.foot-slogan { margin-top: 24px; font-size: 13px; color: var(--brand-1); font-weight: 600; letter-spacing: 1px; }

/* ============ 底部 ============ */
.footer { text-align: center; padding: 22px 0 4px; font-size: 12px; color: #98a1b6; line-height: 1.9; }
.admin-entry {
  display: inline-block; margin-top: 10px; padding: 6px 18px;
  font-size: 12px; color: var(--text-sub); text-decoration: none;
  border: 1px solid rgba(43,110,243,.22); border-radius: 50px;
  background: rgba(255,255,255,.6); transition: all .2s;
}
.admin-entry:hover { color: var(--brand-1); border-color: var(--brand-1); background: rgba(255,255,255,.9); }

/* ============ 抽奖动画遮罩 ============ */
.lottery-mask {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(20, 30, 70, 0.55); backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
}
.lottery-mask.show { display: flex; }
.lottery-box { text-align: center; color: #fff; }
.lottery-emoji { font-size: 96px; animation: shake 0.5s infinite; }
.lottery-text { margin-top: 18px; font-size: 18px; font-weight: 700; letter-spacing: 3px; }
@keyframes shake {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.12); }
}

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%) translateY(20px);
  background: rgba(28,35,51,.92); color: #fff; font-size: 14px;
  padding: 12px 22px; border-radius: 50px; opacity: 0; pointer-events: none;
  transition: all .3s; z-index: 100; max-width: 86%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 桌面端适配 ============ */
@media (min-width: 768px) {
  .page { padding: 36px 20px 50px; }
  .hero-title { font-size: 30px; }
  .card { padding: 36px 40px; }
  .step-line { width: 44px; }
  .panel-desc { font-size: 15px; }
  .footer { font-size: 13px; }
}
