@font-face {
  font-family: 'WowPixel';
  src: url('../assets/fonts/wow-pixel-full.woff2') format('woff2');
  font-display: swap;
}

:root {
  --pink: #ff57e4;
  --pink-deep: #e800c8;
  --yellow: #e6f200;
  --yellow-deep: #c7d300;
  --blue: #2584ff;
  --blue-deep: #0066f0;
  --purple: #a442ff;
  --green: #76f514;
  --green-deep: #4fc400;
  --red: #ff2626;
  --ink: #0d0d0d;
  --paper: #f3f2ef;
  --white: #fff;
  --muted: #5d5a57;
  --line: 2px solid var(--ink);
  --px: 'WowPixel', 'Silkscreen', ui-monospace, monospace;
  --en: 'Silkscreen', 'WowPixel', ui-monospace, monospace;
  --mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  --sans: 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --shadow: 8px 8px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #17161a;
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ================= 舞台 ================= */
#viewport {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, #2a2830 0%, #17161a 60%);
}

#stage {
  position: relative;
  width: 1600px;
  height: 900px;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(13, 13, 13, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 13, 13, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow: hidden;
  transform-origin: center center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.slide {
  position: absolute;
  inset: 0;
  padding: 78px 92px 86px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.slide-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.slide-body.align-center {
  justify-content: center;
}

.slide-body.align-top {
  justify-content: flex-start;
}

/* 入场动画 */
.slide.active .rise {
  animation: rise 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= 通用文字 ================= */
.px {
  font-family: var(--px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.18;
}

.en {
  font-family: var(--en);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mono {
  font-family: var(--mono);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--en);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px 7px;
  font-family: var(--en);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
}

.label::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--yellow);
}

.hl {
  display: inline-block;
  background: var(--hl, var(--yellow));
  color: var(--hl-fg, var(--ink));
  padding: 0.02em 0.16em 0.14em;
  margin: 0 -0.06em;
}

.hl-pink { --hl: var(--pink); }
.hl-yellow { --hl: var(--yellow); }
.hl-blue { --hl: var(--blue); --hl-fg: #fff; }
.hl-green { --hl: var(--green); }
.hl-purple { --hl: var(--purple); --hl-fg: #fff; }

/* ================= 顶部 / 底部 chrome ================= */
.chrome-top {
  position: absolute;
  top: 30px;
  left: 92px;
  right: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 6;
  pointer-events: none;
}

.chrome-top .brandline {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--en);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.chrome-top .brandline img {
  width: 20px;
  height: auto;
  opacity: 0.85;
}

.chrome-foot {
  position: absolute;
  left: 92px;
  right: 92px;
  bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--en);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #8d8a86;
  text-transform: uppercase;
  z-index: 6;
  pointer-events: none;
}

.chrome-foot .dotline {
  flex: 1;
  height: 2px;
  margin: 0 18px;
  background: repeating-linear-gradient(90deg, rgba(13, 13, 13, 0.22) 0 4px, transparent 4px 10px);
}

/* 页码块 */
.pageno {
  font-family: var(--en);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border: var(--line);
  background: var(--paper);
  color: var(--ink);
}

/* ================= 装饰 ================= */
.deco-dots {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(6, 10px);
  gap: 8px;
  z-index: 0;
}

.deco-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.14;
}

.deco-bar {
  position: absolute;
  height: 10px;
  background: var(--yellow);
  border: var(--line);
  z-index: 0;
}

.stamp {
  position: absolute;
  font-family: var(--en);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a5a19c;
  transform: rotate(-90deg);
  transform-origin: left top;
  white-space: nowrap;
}

/* 胶片相框 */
.frame {
  position: relative;
  border: var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.frame img,
.frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame.tilt-l { transform: rotate(-1.6deg); }
.frame.tilt-r { transform: rotate(1.4deg); }

/* 空图占位 */
.slotbox {
  position: relative;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(13, 13, 13, 0.4);
  background: repeating-linear-gradient(
    -45deg,
    rgba(13, 13, 13, 0.045) 0 10px,
    transparent 10px 20px
  );
  color: #98938d;
  text-align: center;
  gap: 6px;
  padding: 18px;
}

.slotbox .slot-tag {
  font-family: var(--en);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1.5px solid rgba(13, 13, 13, 0.3);
  color: #7d7872;
}

.slotbox .slot-name {
  font-size: 13px;
  line-height: 1.5;
  color: #6c6761;
  max-width: 88%;
}

.slotbox::after {
  content: '+';
  position: absolute;
  right: 10px;
  bottom: 6px;
  font-family: var(--px);
  font-size: 22px;
  color: rgba(13, 13, 13, 0.18);
}


/* 像素字体没有粗体变体，浏览器合成粗体会把字形挤到一起，统一压回 400 */
.slide h1,
.slide h2,
.slide h3,
.slide h4,
.slide blockquote {
  font-weight: 400;
  font-synthesis: none;
}
