/* ============================================================
   作品详情页 · 左文右片布局（像素风）
   ============================================================ */

/* ---------- 页面容器 ---------- */
.work-page {
  position: relative;
  min-height: 100vh;
  padding: 150px 24px 80px;
  --lv: var(--yellow);
  --lv-deep: #d9b022;
  background:
    radial-gradient(ellipse at 75% 0%, rgba(255, 217, 61, 0.05), transparent 55%),
    var(--bg);
}
.work-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.work-page > * { position: relative; z-index: 2; }

/* 主题色变体 */
.work-page[data-accent="cyan"] { --lv: var(--cyan); --lv-deep: #2bb8d6; }
.work-page[data-accent="pink"] { --lv: var(--pink); --lv-deep: #d64f87; }
.work-page[data-accent="pink"] {
  background:
    radial-gradient(ellipse at 75% 0%, rgba(255, 107, 168, 0.06), transparent 55%),
    var(--bg);
}

/* ---------- 返回按钮 ---------- */
.hud-back {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 12px;
  border: 3px solid var(--ink-dim);
  font-size: 15px;
  transition: all 0.12s steps(2);
}
.hud-back .en { font-size: 7.5px; }
.hud-back:hover {
  background: var(--yellow);
  border-color: var(--ink);
  color: var(--bg);
}
.hud-back:hover .en { color: rgba(12, 12, 31, 0.7); }

/* ---------- 任务头部 ---------- */
.quest-head {
  position: relative;
  max-width: 1080px;
  margin: 0 auto 56px;
  overflow: hidden;
}
.quest-head .sky-dim { position: absolute; inset: -100px 0 0; }
.quest-head-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
  align-items: center;
}
.quest-tag { font-size: 10px; color: var(--yellow); }
.quest-title { display: flex; flex-direction: column; gap: 12px; }
.quest-title .zh {
  font-size: clamp(26px, 4.6vw, 44px);
  line-height: 1.35;
  text-shadow: 4px 4px 0 var(--outline), 8px 8px 0 rgba(0, 0, 0, 0.35);
}
.quest-title .en { font-size: clamp(8px, 1.2vw, 11px); color: var(--cyan); line-height: 1.9; }

/* 奖项徽章 */
.quest-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 18px;
  font-size: 16px;
  border: 3px solid var(--outline);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.25), inset -3px -3px 0 rgba(0, 0, 0, 0.3), 4px 4px 0 rgba(0, 0, 0, 0.4);
}
.badge i {
  font-style: normal;
  font-family: var(--font-en);
  font-size: 7px;
  letter-spacing: 0.08em;
  opacity: 0.8;
}
.badge-gold { background: var(--yellow); color: var(--bg); }
.badge-silver { background: #b9c0d4; color: var(--bg); }
.badge-plain { background: var(--panel); color: var(--ink); font-size: 14px; }

.quest-meta { display: flex; flex-direction: column; gap: 4px; }
.quest-meta .zh { font-size: 15px; color: var(--ink-dim); }
.quest-meta .en { font-size: 8px; }

/* ---------- 主体：左文右片 ---------- */
.work-main { max-width: 1240px; margin: 0 auto; }
.work-grid {
  display: grid;
  grid-template-columns: minmax(320px, 5fr) minmax(340px, 6fr);
  gap: 44px;
  align-items: start;
}

/* 左栏：任务简报 */
.work-text { display: flex; flex-direction: column; gap: 26px; }

.log { padding: 20px 24px 18px; }
.log-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--panel-bottom);
}
.log-icon { color: var(--lv); animation: blink 0.9s steps(1) infinite; }
.log-title .zh { font-size: 21px; }
.log-title .en { font-size: 9px; color: var(--lv); }
.log-body { display: flex; flex-direction: column; gap: 10px; }
.log-body .zh { font-size: 17px; line-height: 1.9; }
.log-body .en { font-size: 8.5px; line-height: 2.1; }

/* 属性面板 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 6px 12px;
  text-align: center;
}
.stat-num { font-size: 13px; color: var(--lv); }
.stat-zh { font-size: 13px; }
.stat-en { font-size: 6.5px; }

/* 右栏：放映机 */
.work-video { position: sticky; top: 110px; }

.console { padding: 0; background: var(--panel); }
.console-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--panel-top);
  border-bottom: 4px solid var(--outline);
}
.console-dot { width: 10px; height: 10px; border: 2px solid var(--outline); }
.dot-r { background: #ff5f56; }
.dot-y { background: #ffd93d; }
.dot-g { background: #54e38a; }
.console-title { margin-left: 6px; font-size: 8px; color: var(--ink-dim); }

.console-screen { position: relative; background: #000; }
.film {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.screen-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 2px,
    transparent 2px,
    transparent 4px
  );
}

/* ---------- 画廊画框（平面作品） ---------- */
.art-screen { padding: 14px; }
.art-screen a { display: block; }
.art-screen .art {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--outline);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  image-rendering: auto;
  transition: transform 0.15s steps(3);
}
.art-screen a:hover .art { transform: scale(1.02); }
.art-screen .screen-scan { inset: 14px; opacity: 0.35; }

.console-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel-bottom);
  border-top: 4px solid var(--outline);
}
.console-foot .pixel-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 16px;
  background: var(--bg-alt);
  border: 3px solid var(--ink-dim);
  font-size: 13px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  transition: all 0.12s steps(2);
}
.console-foot .pixel-btn i { font-style: normal; font-family: var(--font-en); font-size: 7px; color: var(--ink-faint); }
.console-foot .pixel-btn:hover {
  background: var(--yellow);
  color: var(--bg);
  border-color: var(--ink);
}
.console-foot .pixel-btn:hover i { color: rgba(12, 12, 31, 0.7); }
.console-hint { font-size: 8px; color: var(--ink-faint); }

.video-caption {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}
.video-caption .zh { font-size: 13px; color: var(--ink-dim); }
.video-caption .en { font-size: 7.5px; }

/* ---------- 底部导航 ---------- */
.work-footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 70px;
}
.work-footer .ending-link { background: var(--panel); }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .work-grid { grid-template-columns: 1fr; gap: 40px; }
  .work-video { position: static; order: -1; } /* 窄屏时影片置顶 */
  .work-page { padding-top: 130px; }
}
@media (max-width: 640px) {
  .work-page { padding: 120px 16px 60px; }
  .hud-back { font-size: 13px; padding: 4px 10px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .badge { font-size: 14px; padding: 6px 12px; }
  .work-footer { flex-direction: column; align-items: center; }
}

/* ---------- 大图灯箱（不跳页查看高清大图） ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 4vw;
  background: rgba(5, 5, 16, 0.88);
}
.lightbox.open { display: flex; animation: lb-in 0.2s steps(4); }
@keyframes lb-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lightbox-panel {
  display: flex;
  flex-direction: column;
  max-width: min(1400px, 94vw);
  max-height: 92vh;
  background: var(--panel);
}
.lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 3px solid var(--outline);
}
.lightbox-title { font-size: 9px; color: var(--lv, var(--yellow)); letter-spacing: 1px; }
.lightbox-close {
  font-family: var(--font-en);
  font-size: 12px;
  padding: 4px 10px;
  background: var(--pink);
  color: var(--bg);
  border: 3px solid var(--outline);
  cursor: pointer;
}
.lightbox-close:hover { background: var(--yellow); }
.lightbox-close:active { transform: translate(2px, 2px); }
.lightbox-body {
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 14px;
  background: #0d0d1f;
  cursor: zoom-out;
}
.lightbox-body img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 110px);
  width: auto;
  height: auto;
  image-rendering: auto;
}
.lightbox-foot {
  padding: 8px 14px;
  border-top: 3px solid var(--outline);
  text-align: center;
}
.lightbox-foot .en { font-size: 8px; color: var(--ink-faint); }

/* ---------- IP 形象设计：按部件分块展示（图片保持原始比例，不拉伸） ---------- */
.ip-block {
  max-width: 1080px;
  margin: 0 auto 56px;
  padding: 0 4vw;
}
.ip-block-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 4px solid var(--outline);
}
.ip-block-title .zh { font-size: 22px; font-weight: bold; text-shadow: 3px 3px 0 var(--outline); }
.ip-block-title .en { display: block; font-size: 9px; letter-spacing: 2px; color: var(--lv, var(--pink)); opacity: .9; }

.ip-grid { display: grid; gap: 22px; }
.ip-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ip-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ip-grid-sticker { grid-template-columns: repeat(3, 1fr); }

.ip-shot {
  margin: 0;
  background: var(--panel);
  border: 3px solid var(--outline);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.10), inset -2px -2px 0 rgba(0,0,0,.35), 5px 5px 0 rgba(0,0,0,.4);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ip-shot img {
  display: block;
  width: 100%;
  height: auto;          /* 关键：高度自适应，绝不拉伸 */
  object-fit: contain;
  background: #0d0d1f;
  image-rendering: auto;
  border: 2px solid rgba(255,255,255,.08);
}
.ip-shot figcaption {
  margin-top: 8px;
  text-align: center;
}
.ip-shot figcaption .zh { display: block; font-size: 13px; color: var(--ink-dim); }
.ip-shot figcaption .en { display: block; font-size: 8px; color: var(--ink-faint); letter-spacing: 1px; margin-top: 3px; }
.ip-shot-frame { max-width: 420px; margin: 0 auto; }

.ip-note { margin-top: 14px; }
.ip-note .zh { display: block; font-size: 13px; color: var(--ink-dim); }
.ip-note .en { display: block; font-size: 8px; color: var(--ink-faint); letter-spacing: 1px; margin-top: 4px; }

/* IP 档案列表 */
.ip-profile { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ip-profile li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 2px dashed rgba(255,255,255,.12);
}
.ip-profile .k {
  flex: 0 0 56px;
  font-size: 13px;
  color: var(--bg);
  background: var(--lv, var(--pink));
  padding: 2px 8px;
  text-align: center;
}
.ip-profile .v { font-size: 15px; color: var(--ink); }

/* 完整展板：竖版，按原比例 */
.ip-board { max-width: 720px; margin: 0 auto; }
.ip-board a { display: block; border: 3px solid var(--outline); background: var(--panel); padding: 10px; }
.ip-board img { display: block; width: 100%; height: auto; image-rendering: auto; }

@media (max-width: 860px) {
  .ip-grid-2 { grid-template-columns: 1fr; }
  .ip-grid-3, .ip-grid-sticker { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .ip-grid-3, .ip-grid-sticker { grid-template-columns: 1fr; }
}
