/* ===== 前台样式 (适配 1080x1920 竖屏触摸屏) ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #cfe9e3 url("../img/bg.jpg") center/cover no-repeat;
  color: #333;
  overflow: hidden;
  user-select: none;
}

.screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
}

.logo {
  position: absolute;
  top: 44px;
  left: 0;
  
  width: 100%;
  z-index: 5;
}

/* 答题页顶部品牌横幅 logo（占满整行宽度） */
.banner-logo {
  display: block;
  width: 100%;
}

/* ---- 通用面板 ---- */
.panel {
  margin-top: 14vh;
  width: 84%;
  max-width: 860px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(30, 80, 90, 0.18);
  padding: 56px 48px;
  min-height: 30vh;;
}
/* 开始页: 卡片在 logo 以下的剩余空间内上下居中 (flex 列中 auto 外边距均分剩余空间), 其它状态维持到顶位置 */
.intro-panel { margin-top: auto; margin-bottom: auto; }
/* 结果页: 与开始页一致, 卡片上下居中 */
.result-panel { margin-top: auto; margin-bottom: auto; }
.panel-title { font-size: 46px; color: #2f7d76; text-align: center; margin-bottom: 28px; }
.intro-desc { font-size: 30px; text-align: center; color: #557; margin-bottom: 44px; }

/* ---- 大按钮 ---- */
.big-btn {
  display: block;
  width: 100%;
  padding: 26px;
  font-size: 34px;
  color: #fff;
  background: linear-gradient(135deg, #38b6a5, #2f8fd6);
  border: none;
  border-radius: 60px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(47, 143, 214, 0.35);
  transition: transform .1s, opacity .2s;
}
.big-btn:active { transform: scale(.98); }
.big-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- 进度条 ---- */
.progress { margin-bottom: 30px; }
.progress-bar {
  height: 18px;
  background: #d7e6ea;
  border-radius: 12px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #38b6a5, #6fd0c0);
  border-radius: 12px;
  transition: width .4s ease;
}
.progress-text { margin-top: 12px; text-align: right; font-size: 24px; color: #678; }

/* ---- 题目 ---- */
.q-title { font-size: 34px; line-height: 1.5; color: #234; margin-bottom: 34px; }
.q-type {
  display: inline-block;
  font-size: 22px;
  color: #fff;
  background: #f0954a;
  border-radius: 8px;
  padding: 4px 14px;
  margin-right: 12px;
  vertical-align: middle;
}

/* ---- 选项 ---- */
.options { display: flex; flex-direction: column; gap: 22px; margin-bottom: 40px; }
.option {
  position: relative;
  display: flex;
  align-items: center;
  padding: 24px 26px;
  font-size: 30px;
  background: #fff;
  border: 3px solid #dbe6ea;
  border-radius: 18px;
  cursor: pointer;
  transition: all .15s;
}
.opt-key {
  flex: none;
  width: 52px; height: 52px;
  line-height: 52px;
  text-align: center;
  margin-right: 20px;
  border-radius: 50%;
  background: #eef3f5;
  color: #567;
  font-weight: bold;
}
.opt-val { flex: 1; }
.opt-mark { position: absolute; right: 26px; font-size: 34px; font-weight: bold; }

.option.chosen { border-color: #2f8fd6; background: #eaf4ff; }
.option.chosen .opt-key { background: #2f8fd6; color: #fff; }
.option.right  { border-color: #21a95f; background: #e9f9ef; }
.option.right .opt-key { background: #21a95f; color: #fff; }
.option.right .opt-mark { color: #21a95f; }
.option.wrong  { border-color: #e0483b; background: #fdeeec; }
.option.wrong .opt-key { background: #e0483b; color: #fff; }
.option.wrong .opt-mark { color: #e0483b; }

/* ---- 结果 ---- */
.result-score { font-size: 40px; text-align: center; color: #f0954a; margin-bottom: 40px; }

/* ---- Toast ---- */
.toast {
  position: fixed;
  left: 50%; bottom: 14vh;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-size: 28px;
  padding: 20px 40px;
  border-radius: 50px;
  z-index: 999;
}
.fade-enter-active, .fade-leave-active { transition: opacity .3s; }
.fade-enter, .fade-leave-to { opacity: 0; }

/* ===== 抽奖页 ===== */
.draw-screen { justify-content: flex-start; }
.wheel-wrap {
  position: relative;
  margin-top: 20vh;
  width: 88vw;
  max-width: 900px;
  aspect-ratio: 1 / 1.05;
}
/* 底座 (最底层) */
.wheel-base {
  position: absolute;
  left: 50%;
  bottom: -6%;
  transform: translateX(-50%);
  width: 96%;
  z-index: 1;
  pointer-events: none;
}
/* 盘面容器: 外圈静止灯环 + 内圈转动奖品盘, 两层同框叠放 */
.wheel-pan {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 88%;
  aspect-ratio: 1 / 1;
  z-index: 2;
}
.pan-disc, .pan-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* 外圈灯环: 静止。注意素材中部为不透明白底, 必须位于奖品盘之下 */
.pan-ring { pointer-events: none; }
/* 奖品盘: 转动元素, 绕自身中心旋转; 盘体(851px)略大于灯环内孔(832px), 盖住白底 */
.pan-disc { z-index: 1; transform-origin: 50% 50%; }
/* 装饰点: 与底座同尺寸, 水平居中、底部对齐, 位于盘面之上 */
.wheel-dot {
  position: absolute;
  left: 50%;
  bottom: -6%;
  transform: translateX(-50%);
  width: 96%;
  z-index: 3;
  pointer-events: none;
}
/* 右上角装饰 (吉祥物): 锚定转盘容器, top 随转盘顶部定位, 尺寸随转盘等比缩放 */
.wheel-dot-2 {
  position: absolute;
  top: -10%;
  right: 7%;
  width: 18%;
  height: auto;
  z-index: 4;
  pointer-events: none;
}
/* 指针: 与盘面同尺寸, 叠在盘面正上方, 静止, 中心按钮可点击抽奖, 最上层 */
.pointer {
  position: absolute;
  left: 50%;
  top: 0;
  width: 88%;
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  transform-origin: 50% 50%;
  cursor: pointer;
  z-index: 4;
}
.draw-tip { margin-top: 120px; font-size: 26px; color: #2f6f6a; }

/* ---- 中奖弹框 (vant 风格) ---- */
.dialog-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.dialog {
  width: 66%; max-width: 560px;
  background: #fff; border-radius: 24px; overflow: hidden;
}
.dialog-body { padding: 56px 40px 40px; text-align: center; }
.dialog-emoji { font-size: 90px; }
.dialog-title { font-size: 40px; color: #2f7d76; margin: 20px 0 12px; }
.dialog-prize { font-size: 34px; color: #f0954a; font-weight: bold; }
.dialog-actions { border-top: 1px solid #eee; }
.dialog-btn {
  width: 100%; padding: 30px; font-size: 32px; color: #2f8fd6;
  background: #fff; border: none; cursor: pointer;
}
.dialog-btn:active { background: #f2f6fa; }

/* ===== 手机端适配 (≤480px, 不影响 1080x1920 一体机布局) ===== */
@media (max-width: 480px) {
  body { overflow-y: auto; }
  .screen { height: auto; min-height: 100vh; padding: 20px 0 40px; }
  .logo { top: 16px; left: 0; width: 100%; }
  .banner-logo { width: 100%; }

  .panel { margin-top: 24px; width: 90%; max-width: none; padding: 28px 22px; border-radius: 20px; }
  /* 手机端同步: 开始页卡片在剩余空间内上下居中 */
  .intro-panel { margin-top: auto; margin-bottom: auto; }
  .result-panel { margin-top: auto; margin-bottom: auto; }
  .panel-title { font-size: 26px; margin-bottom: 16px; }
  .intro-desc { font-size: 16px; margin-bottom: 26px; }

  .big-btn { padding: 15px; font-size: 19px; border-radius: 40px; }

  .progress { margin-bottom: 18px; }
  .progress-bar { height: 10px; }
  .progress-text { margin-top: 8px; font-size: 14px; }

  .q-title { font-size: 18px; margin-bottom: 20px; }
  .q-type { font-size: 13px; padding: 3px 9px; margin-right: 8px; }

  .options { gap: 12px; margin-bottom: 24px; }
  .option { padding: 14px 15px; font-size: 16px; border-width: 2px; border-radius: 12px; }
  .opt-key { width: 32px; height: 32px; line-height: 32px; margin-right: 12px; font-size: 14px; }
  .opt-mark { right: 14px; font-size: 20px; }

  .result-score { font-size: 22px; margin-bottom: 24px; }

  .toast { font-size: 15px; padding: 12px 24px; bottom: 24px; }

  /* 抽奖页: 手机端整体上下居中, 文字不贴底 */
  .draw-screen { justify-content: center; }
  .wheel-wrap { margin-top: auto; margin-bottom: 28px; width: 92vw; }
  .draw-tip { font-size: 15px; margin-top: 0; margin-bottom: auto; }
  .dialog { width: 82%; max-width: none; }
  .dialog-body { padding: 30px 22px 22px; }
  .dialog-emoji { font-size: 52px; }
  .dialog-title { font-size: 22px; margin: 12px 0 8px; }
  .dialog-prize { font-size: 18px; }
  .dialog-btn { padding: 16px; font-size: 17px; }
}
