/* ========================================
   kiosk.css - 一体机端样式
   目标分辨率：1080×1920 竖屏，铺满全屏、无滚动条
   全部使用 vw/vh 响应式单位，像"大型手机"一样放大元素
   ======================================== */

/* ---- 全局：签名/问卷/结果页共用背景图2 ---- */
#app {
  background: #003d3a url("../img/page-bg.jpg") center center / cover no-repeat;
}

/* ---- 屏幕切换 ---- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.screen.active {
  display: flex;
}

/* =====================================================
   屏幕0：待机页（首页）—— 单独用图1全屏显示
   ===================================================== */
.idle-screen {
  background: #003d3a url("../img/idle-bg.jpg") center center / cover no-repeat;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.idle-screen .idle-hint {
  position: absolute;
  bottom: 9vh;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 3.4vw;
  font-weight: 600;
  padding: 2.2vh 5vw;
  border: 0.4vw solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: idle-pulse 2s ease-in-out infinite;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.3vw;
}
@keyframes idle-pulse {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;    transform: translateX(-50%) scale(1.04); }
}

/* =====================================================
   通用头部 —— 文字使用浅色确保在绿松石背景上可读
   ===================================================== */
.screen-header {
  text-align: center;
  padding: 4vh 4vw 2vh;
  flex-shrink: 0;
}
.screen-header h1 {
  font-size: 6.5vw;
  font-weight: 700;
  margin-bottom: 1.2vh;
  letter-spacing: 0.2vw;
  color: #fff;
  text-shadow: 0 0.4vh 1.6vh rgba(0, 0, 0, 0.25);
}
.subtitle {
  font-size: 3vw;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0.2vh 0.6vh rgba(0, 0, 0, 0.2);
}

/* ---- 签名区 ---- */
.signature-area {
  flex: 1;
  margin: 2.5vh 4vw;
  position: relative;
  background: #fff;
  border-radius: 3vw;
  overflow: hidden;
  box-shadow: 0 1.5vh 6vh rgba(0, 0, 0, 0.3);
}
#sign-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.sign-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0, 0, 0, 0.18);
  font-size: 4vw;
  pointer-events: none;
  transition: opacity 0.3s;
}
.sign-placeholder.hidden {
  opacity: 0;
}

/* ---- 按钮区 —— 金色调主按钮搭配绿松石背景 ---- */
.action-bar {
  display: flex;
  gap: 3vw;
  padding: 2.5vh 5vw 4vh;
  justify-content: center;
  flex-shrink: 0;
}
.btn {
  flex: 1;
  max-width: 42vw;
  padding: 3vh 5vw;
  font-size: 4.6vw;
  font-weight: 600;
  border: none;
  border-radius: 2.6vw;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.btn:active {
  transform: scale(0.96);
  opacity: 0.85;
}
.btn-primary {
  background: linear-gradient(135deg, #d4a543, #b8892e);
  color: #fff;
  box-shadow: 0 0.8vh 4vh rgba(212, 165, 67, 0.4);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 0.35vw solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ---- 问卷进度 ---- */
.quiz-progress {
  font-size: 3.6vw;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5vh;
  text-shadow: 0 0.2vh 0.6vh rgba(0, 0, 0, 0.2);
}
#quiz-current {
  color: #f5d77a;
  font-size: 5.2vw;
  font-weight: 700;
}
.progress-bar {
  width: 34vw;
  height: 1.1vh;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1vh;
  margin: 0 auto;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f5d77a, #d4a543);
  border-radius: 1vh;
  transition: width 0.4s ease;
  width: 16.6%;
}

/* ---- 题目区 ---- */
.quiz-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3vh 5vw;
  gap: 3.5vh;
  overflow: hidden;
}
.question-image {
  width: 100%;
  max-width: 56vw;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.1);
  border: 0.35vw solid rgba(255, 255, 255, 0.15);
  border-radius: 3vw;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 1.5vh 6vh rgba(0, 0, 0, 0.25);
  overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.question-num {
  font-size: 12vw;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.25);
  z-index: 1;
}
.question-title {
  font-size: 5.2vw;
  font-weight: 600;
  text-align: center;
  max-width: 78vw;
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 0.4vh 1.2vh rgba(0, 0, 0, 0.3);
}

/* ---- 选项区 ---- */
.options-area {
  display: flex;
  flex-direction: column;
  gap: 2.2vh;
  padding: 2.5vh 6vw 4vh;
  flex-shrink: 0;
}
.option-btn {
  display: flex;
  align-items: center;
  gap: 3vw;
  width: 100%;
  max-width: 58vw;
  margin: 0 auto;
  padding: 3vh 3.5vw;
  background: rgba(255, 255, 255, 0.12);
  border: 0.35vw solid rgba(255, 255, 255, 0.25);
  border-radius: 2.6vw;
  color: #fff;
  font-size: 4vw;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.option-btn:active {
  background: rgba(212, 165, 67, 0.35);
  border-color: #f5d77a;
  transform: scale(0.98);
}
.option-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7.4vw;
  height: 7.4vw;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5d77a, #d4a543);
  color: #003d3a;
  font-weight: 700;
  font-size: 3.6vw;
  flex-shrink: 0;
}
.option-text {
  flex: 1;
  text-align: left;
}

/* =====================================================
   结果页：海报大图 + 小二维码（横向排列）
   ===================================================== */
.result-content {
  flex: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4vw;
  padding: 2vh 5vw;
  overflow: hidden;
}
.result-card-preview {
  width: min(56vh, 68vw);
  aspect-ratio: 4 / 5;
  border-radius: 3vw;
  overflow: hidden;
  box-shadow: 0 2.4vh 8vh rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}
#preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.qrcode-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6vh;
  flex-shrink: 0;
}
#qrcode {
  padding: 1.2vw;
  background: #fff;
  border-radius: 2vw;
  box-shadow: 0 1.2vh 5vh rgba(0, 0, 0, 0.3);
}
#qrcode img,
#qrcode canvas {
  display: block;
  width: min(28vh, 34vw) !important;
  height: min(28vh, 34vw) !important;
}
.qr-tip {
  font-size: 2.6vw;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0.2vh 0.6vh rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}
.qr-hint {
  font-size: 2.2vw;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 0.2vh 0.6vh rgba(0, 0, 0, 0.3);
  min-height: 1em;
  text-align: center;
}
