/**
 * 线下展演电子签名系统 - 全局样式
 * 逻辑分辨率：1053(W) × 1872(H)
 * 视觉风格：宇宙科技深蓝 + 流光星空 + 磨砂玻璃 UI
 */

/* ============================================================
   字体：站酷文艺体（页脚标语专用）
   ============================================================ */
@font-face {
  font-family: 'ZhanKuWenYiTi';
  src: url('assets/fonts/ZhanKuWenYiTi-2.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   全局重置 & 防误触
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  /* 大屏防误触：禁止文本选中与浏览器默认手势 */
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
  cursor: default;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: #0a1628;
  color: #ffffff;
}

#app {
  position: relative;
  width: 1053px;
  height: 1872px;
  overflow: hidden;
  transform-origin: top left;
}

/* ============================================================
   最底层动效底图（视频轮播）
   ============================================================ */
#bg-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #1a3a6e 0%, #0a1628 60%, #050d18 100%);
}

.bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.bg-media--active {
  opacity: 1;
}

/* ============================================================
   固定页脚标语
   ============================================================ */
#page-footer {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  font-family: 'ZhanKuWenYiTi', serif;
  font-size: 22px;
  font-weight: normal;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   视图状态机：三态切换
   ============================================================ */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.view--active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.view--leaving {
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   顶部固定区：Logo / 主副标题 — 三页共用，不参与视图切换动效
   ============================================================ */
.top-fixed-zone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.conference-header {
  width: 100%;
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.conference-header__img {
  width: 880px;
  max-width: 92%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* ============================================================
   磨砂玻璃通用样式
   ============================================================ */
.glass-panel {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
}

.glass-btn {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 4px;
  padding: 18px 48px;
  cursor: pointer;
  outline: none;
  transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.glass-btn:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.22);
}

.glass-btn--primary {
  font-size: 32px;
  padding: 22px 80px;
  letter-spacing: 8px;
  margin-top: auto;
  margin-bottom: auto;
}

.glass-btn--accent {
  background: rgba(255, 224, 130, 0.18);
  border-color: rgba(255, 224, 130, 0.35);
}

.glass-btn--ghost {
  font-size: 22px;
  padding: 12px 36px;
  letter-spacing: 3px;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 16px;
}

.glass-btn--disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================================================
   状态一：欢迎首页
   ============================================================ */
#btn-checkin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 360px;
  text-align: center;
}

/* 定格页「返回签到」与欢迎页「点击签到」同规格 */
.animation-back-btn {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  min-width: 360px;
  text-align: center;
  margin-top: 0;
}

/* ============================================================
   状态二：互动签名页 — 签名框与按钮上移至中下部（见设计稿粉框示意）
   ============================================================ */
.signature-zone {
  position: absolute;
  top: 41%;
  left: 0;
  width: 100%;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.signature-panel {
  position: relative;
  width: 100%;
  height: 400px;
  flex-shrink: 0;
  overflow: hidden;
}

.signature-panel__hint {
  position: absolute;
  top: 20px;
  left: 28px;
  z-index: 2;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 2px;
  pointer-events: none;
}

#signature-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.signature-actions {
  display: flex;
  gap: 32px;
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
}

.signature-actions .glass-btn {
  flex: 0 1 280px;
  width: 280px;
  max-width: 42%;
  text-align: center;
}

/* ============================================================
   状态三：高光动效页
   ============================================================ */
.ghost-signature {
  position: absolute;
  z-index: 50;
  pointer-events: none;
  object-fit: contain;
  /* 初始位置由 JS 动态设定，不加发光描边 */
}

/* 签名面板消失时的过渡 */
.signature-panel--hidden {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

/* 空画布校验提示动画 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.signature-panel--shake {
  animation: shake 0.45s ease;
  border-color: rgba(255, 100, 100, 0.5);
}

