/* ============================================================
   课件模板样式（Deck Template v2）
   与 styles.css 里的 .slide / .s-* 内容排版配合使用：
     styles.css  —— 一页纸上写什么、多大字
     deck.css    —— 这张纸怎么铺满屏幕、下面那条胶片条、批注工具
   ============================================================ */

.deck-body {
  background: #0d1014;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  overscroll-behavior: none;
}
.deck-body .topbar { display: none; }

.deck { position: fixed; inset: 0; display: flex; flex-direction: column; }

/* 画布区：胶片条占多少，这里就少多少；画布永远按这块区域精确铺满 */
.deck-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }

/* 设计坐标系 1280×720 起，但宽高由 JS 按屏幕比例改写，所以永远铺满 */
.stage {
  position: absolute; left: 0; top: 0;
  width: 1280px; height: 720px;
  transform-origin: 0 0;
  overflow: hidden;
}
.stage .slide { position: absolute; inset: 0; }

/* 手写批注画布：跟着 stage 一起缩放，坐标就是设计坐标 */
.ink {
  position: absolute; inset: 0; z-index: 6;
  width: 100%; height: 100%;
  pointer-events: none;
  touch-action: none;
}
body.pen-on .ink { pointer-events: auto; cursor: crosshair; }
body.pen-on .stage { cursor: crosshair; }

/* ---------------- 批注工具条 ---------------- */
.pen-bar {
  position: absolute; top: 12px; right: 14px;
  z-index: 12; display: flex; align-items: center; gap: 7px;
  padding: 7px 9px; border-radius: 11px;
  background: rgba(16, 20, 25, .93);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px);
}
.pen-bar[hidden] { display: none; }
.pen-colors { display: flex; align-items: center; gap: 8px; padding: 0 3px; }
.pen-dot {
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  background: var(--c); cursor: pointer; transition: transform .15s, box-shadow .15s;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
}
.pen-dot:hover { transform: scale(1.1); }
.pen-dot.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(255, 255, 255, .35); }
.pen-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .16); margin: 0 2px; }
.pen-act {
  height: 28px; min-width: 30px; padding: 0 8px;
  background: rgba(255, 255, 255, .07); color: #dfe3e8;
  border: 0; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-family: var(--sans); line-height: 1;
  transition: background .18s;
}
.pen-act:hover { background: rgba(255, 255, 255, .18); }
.pen-act.on { background: rgba(44, 107, 163, .55); color: #fff; }
.pen-act.pen-done { background: rgba(255, 255, 255, .14); letter-spacing: .08em; }

/* ---------------- 底部胶片条 ---------------- */
.filmstrip {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px;
  height: 104px; padding: 0 16px;
  background: #0d1014;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: #cfd4da;
  user-select: none;
}
.deck-body.no-strip .filmstrip { display: none; }

.fs-left { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.fs-exit { font-size: 19px; line-height: 1; color: #7d848c; padding: 2px 5px; border-radius: 5px; }
.fs-exit:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.fs-name { font-size: 11.5px; letter-spacing: .16em; color: #8d949c; }
.fs-ver { font-size: 10px; color: #5d646c; font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.fs-mid { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
.fs-arrow {
  flex: 0 0 auto; width: 24px; height: 60px; padding: 0;
  background: transparent; border: 0; color: #7d848c;
  font-size: 24px; line-height: 1; cursor: pointer; border-radius: 6px;
}
.fs-arrow:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.fs-track {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  overflow: hidden;
}
.fs-cell {
  position: relative; flex: 0 0 auto; overflow: hidden;
  border-radius: 3px; background: #fdfcfa;
  opacity: .7; cursor: pointer;
  transition: opacity .18s ease, box-shadow .18s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.fs-cell:hover { opacity: .92; }
.fs-cell.cur { opacity: 1; box-shadow: 0 0 0 2px #6fa8dc, 0 6px 16px rgba(0, 0, 0, .55); }
.fs-cell .slide {
  position: absolute; left: 0; top: 0; width: 1280px; height: 720px;
  opacity: 1; visibility: visible; transition: none;
  transform-origin: 0 0;
  transform: scale(var(--r, .1));
}
.fs-no {
  position: absolute; left: 3px; top: 3px;
  font-size: 9.5px; line-height: 1.4; padding: 0 4px;
  color: #fff; background: rgba(0, 0, 0, .42); border-radius: 2px;
  font-variant-numeric: tabular-nums;
}

.fs-right { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.fs-count { font-size: 11.5px; color: #7d848c; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.fs-count b { color: #fff; font-weight: 500; }
.fs-count i { font-style: normal; }

.dbtn {
  background: rgba(255, 255, 255, .07); color: #dfe3e8; border: 0; cursor: pointer;
  border-radius: 7px; padding: 7px 11px; font-size: 12px; font-family: var(--sans);
  letter-spacing: .04em; transition: background .18s, color .18s;
}
.dbtn:hover { background: rgba(255, 255, 255, .16); }
.dbtn.on { background: rgba(44, 107, 163, .55); color: #fff; }

/* ---------------- 进度 / 讲稿 ---------------- */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; background: rgba(255, 255, 255, .07); z-index: 41; pointer-events: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent-2); transition: width .3s ease; }

.notes-bar {
  position: fixed; left: 0; right: 0; bottom: 104px; z-index: 39;
  background: rgba(15, 19, 24, .95); color: #cfd4da;
  padding: 16px 40px; font-size: 15px; line-height: 1.8;
  backdrop-filter: blur(8px);
}
.notes-bar b { color: #fff; font-weight: 500; }

/* ---------------- 总览 ---------------- */
.overview {
  position: fixed; inset: 0; z-index: 90; background: rgba(12, 15, 19, .97);
  padding: 28px 38px 40px; overflow: auto;
}
.overview[hidden] { display: none; }
.ov-head { display: flex; justify-content: space-between; align-items: center; color: #8d949c; font-size: 12px; letter-spacing: .18em; margin-bottom: 20px; }
.ov-head .icon-btn { color: #8d949c; background: none; border: 0; font-size: 22px; cursor: pointer; }
.ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ov-cell { cursor: pointer; position: relative; }
.ov-thumb { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 4px; background: #fdfcfa; position: relative; }
.ov-thumb .slide {
  position: absolute; inset: 0; width: 1280px; height: 720px;
  transform: scale(.208); transform-origin: top left;
  opacity: 1; visibility: visible; transition: none;
}
.ov-cell .ov-n { font-size: 11px; color: #8d949c; margin-top: 7px; letter-spacing: .1em; }
.ov-cell.cur .ov-thumb { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------------- 竖屏提示 ---------------- */
.rotate-tip {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 45;
  display: flex; align-items: center; gap: 10px;
  background: rgba(15, 19, 24, .92); color: #cfd4da; border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px; padding: 6px 7px 6px 15px; font-size: 12px; letter-spacing: .04em;
  backdrop-filter: blur(8px);
}
.rotate-tip[hidden] { display: none; }
.rotate-tip button {
  background: rgba(255, 255, 255, .08); border: 0; color: #cfd4da;
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1;
}

/* ---------------- 窄屏 ---------------- */
@media (max-width: 900px) {
  .filmstrip { height: 62px; gap: 8px; padding: 0 8px; }
  .fs-name, .fs-ver { display: none; }
  .fs-track { display: none; }
  .fs-arrow { height: 42px; font-size: 20px; width: 20px; }
  .dbtn { padding: 6px 7px; font-size: 11px; }
  .fs-count { font-size: 10.5px; }
  .notes-bar { bottom: 62px; padding: 12px 16px; font-size: 13px; }
  .pen-bar { top: 8px; padding: 5px 7px; gap: 5px; }
  .pen-act { height: 26px; min-width: 26px; font-size: 12px; padding: 0 6px; }
  .pen-dot { width: 20px; height: 20px; }
  .ov-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .overview { padding: 16px 12px 26px; }
}

@media (max-width: 480px) {
  .fs-right { gap: 5px; }
  .dbtn { padding: 6px 5px; font-size: 10.5px; letter-spacing: 0; }
}
