/* ================================================================
   pages.css —— 页面层与各类浮层
   · .pcanvas  页面自绘画布（对应 QPainter 的 paintEvent）
   · .ovl      页面上的 DOM 子控件（对应 Qt 的子控件叠加）
   · .mpanel   入场登记 / 退出确认面板
   · #boot     启动遮罩
   · #archive  共享存档查看
   ================================================================ */

/* ---------------- 层级 ---------------- */
#bg-canvas   { z-index: 1; }
#fx-canvas   { z-index: 5; }
#pages       { z-index: 10; }
#music-hud   { z-index: 60; }
#mask-canvas { z-index: 90; }

/* ---------------- 制作者水印 ----------------
   固定在舞台左下角：导航按钮在 bottom:100px，音乐胶囊在右下角，
   两者都不冲突；pointer-events:none 保证绝不遮挡任何按钮点击。 */
#credit-watermark {
  position: absolute;
  left: 20px;
  bottom: 12px;
  z-index: 45;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .6px;
  color: rgba(233, 214, 255, .32);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

/* ---------------- 音乐自动播放兜底提示（AUTO_START_MUSIC_V1） ----------------
   只在浏览器拒绝自动出声时出现；pointer-events:none 保证绝不挡按钮。 */
#music-tip {
  position: absolute;
  right: 26px;
  bottom: 74px;
  z-index: 61;
  display: none;
  padding: 7px 14px;
  border-radius: 16px;
  font-size: 12px;
  letter-spacing: .5px;
  white-space: nowrap;
  color: rgba(255, 236, 190, .95);
  background: rgba(40, 22, 70, .72);
  border: 1px solid rgba(246, 211, 101, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  animation: musicTipPulse 1.8s ease-in-out infinite;
}
#music-tip.show { display: block; }
@keyframes musicTipPulse { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }

/* ---------------- 页面 ---------------- */
.page { position: absolute; inset: 0; }

/* 页面自绘画布：铺满整页，逻辑坐标恒为 1440×880 */
.pcanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* 页面上的 DOM 控件层：整体不挡点击，只有具体控件可点 */
.ovl {
  position: absolute;
  inset: 0;
  /* 必须高于底部全局导航按钮(.linkbtn 为 30)，否则页面内的选集/操作按钮会被压住 */
  z-index: 40;
  pointer-events: none;
}
.ovl > * { pointer-events: auto; }
.pg-header, .pg-footer { pointer-events: none; }

/* ---------------- 视频选集小方块 ---------------- */
.vtile {
  position: absolute;
  border-radius: 10px;
  border: 1.1px solid rgba(196, 169, 255, .34);
  background: rgba(255, 255, 255, .06);
  color: rgba(232, 222, 255, .82);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  z-index: 30;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.vtile:hover {
  background: rgba(246, 211, 101, .18);
  border-color: rgba(246, 211, 101, .8);
  color: var(--gold);
}
.vtile.on {
  background: linear-gradient(180deg, rgba(246, 211, 101, .92), rgba(214, 158, 46, .82));
  border-color: rgba(246, 211, 101, .95);
  color: var(--night);
}

/* ---------------- 通用底部导航按钮 ---------------- */
.navbtn {
  position: absolute;
  bottom: 100px;
  font-size: 14px;
  padding: 8px 18px;
}
#nav-back { left: 46px; }
#nav-next { right: 46px; }

/* ---------------- 弹层通用 ---------------- */
#modal, #confirm {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  background: rgba(8, 3, 18, .74);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#modal.show, #confirm.show { display: flex; }

/* 登记 / 确认面板 */
.mpanel {
  width: 560px;
  max-width: 82%;
  padding: 38px 40px 30px;
  border-radius: 28px;
  text-align: center;
  animation: mpop .34s cubic-bezier(.22, 1.2, .36, 1);
}
@keyframes mpop {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.mtitle {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--white);
  text-shadow: 0 0 18px rgba(139, 92, 246, .55);
}
.msub {
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: .6px;
  color: rgba(232, 222, 255, .72);
}
.mfield {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  height: 52px;
  padding: 0 20px;
  border-radius: 26px;
  background: rgba(255, 253, 255, .93);
  border: 1.2px solid rgba(196, 169, 255, .32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.mfield .ico { color: rgba(139, 92, 246, .7); font-size: 19px; flex: 0 0 auto; }
.mfield .unit { color: rgba(118, 99, 158, .9); font-size: 14px; flex: 0 0 auto; }
.mfield input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  font-family: inherit;
  padding: 0;
}
.mfield input::placeholder { color: rgba(118, 99, 158, .55); }
.mfoot {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.mfoot .btn { position: static; width: 210px; height: 54px; font-size: 18px; }

/* ---------------- 共享存档 ---------------- */
#archive {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  background: rgba(8, 3, 18, .78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#archive.show { display: flex; }
#archive .apanel {
  width: 720px;
  max-width: 86%;
  max-height: 76%;
  padding: 30px 34px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
}
#archive .arc-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold);
  text-align: center;
  text-shadow: 0 0 14px rgba(246, 211, 101, .5);
}
#archive-body {
  margin-top: 18px;
  overflow-y: auto;
  padding-right: 8px;
}
#archive-body::-webkit-scrollbar { width: 6px; }
#archive-body::-webkit-scrollbar-thumb {
  background: rgba(196, 169, 255, .35);
  border-radius: 3px;
}
.arc-sec {
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: rgba(196, 169, 255, .85);
}
.arc-empty { font-size: 13px; color: rgba(232, 222, 255, .45); }
.arc-list { display: flex; flex-direction: column; gap: 6px; }
.arc-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  font-size: 14px;
  color: rgba(232, 222, 255, .88);
}
.arc-item b { color: var(--gold); font-weight: 600; }
.arc-y { color: rgba(255, 158, 200, .85); font-size: 12px; }
.arc-t { margin-left: auto; font-size: 11px; color: rgba(232, 222, 255, .38); }
.arc-msg span { color: rgba(232, 222, 255, .82); }
#archive .arc-close {
  margin: 18px auto 0;
  position: static;
  display: flex;
}

/* ---------------- 结束派对 ---------------- */
.bye {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 160;
  background: radial-gradient(circle at 50% 42%, #2a1150 0%, #120726 62%, #080313 100%);
  text-align: center;
}
.bye.show { display: flex; }
.bye-star {
  font-size: 52px;
  color: var(--gold);
  text-shadow: 0 0 26px rgba(246, 211, 101, .8);
  animation: bspin 5s linear infinite;
}
@keyframes bspin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.bye-t {
  margin-top: 18px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--white);
  text-shadow: 0 0 22px rgba(139, 92, 246, .7);
}
.bye-s {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(232, 222, 255, .72);
}
.bye .btn { position: static; margin-top: 30px; width: 200px; height: 54px; font-size: 17px; }

/* ---------------- 启动遮罩 ---------------- */
#boot {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #2a1150 0%, #140829 58%, #080313 100%);
  transition: opacity .65s ease;
}
#boot.gone { opacity: 0; }
.boot-inner { text-align: center; }
.boot-star {
  font-size: 46px;
  color: var(--gold);
  text-shadow: 0 0 26px rgba(246, 211, 101, .8);
  animation: bspin 4s linear infinite;
}
.boot-txt {
  margin-top: 16px;
  font-size: 15px;
  letter-spacing: 4px;
  color: rgba(232, 222, 255, .72);
}
