/* ============================================================
   Shikunpunk 的大脑 — 共享样式
   多页架构：index / thoughts / gallery / desk / contact
   ============================================================ */
:root {
  --bg-black: #050403;
  --light-warm: #fff4e6;
  --wood-light: #3a2c1b;
  --wood-dark: #2a1e12;
  --text-main: #f0ece4;
  --text-warm-gray: #d4c9b8;
  --thought-bg: #141210;
  --curtain-color: #6b3a1f;
  --accent: #e8b04a; /* 琥珀强调色，用于锐利排版 */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  background: var(--bg-black);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* 全局胶片颗粒 */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 900;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="240" height="240"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/></filter><rect width="240" height="240" filter="url(%23n)"/></svg>');
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* ============================================================
   赛博朋克拉绳开关（可复用）
   暗铬底座 + 霓虹能量绳 + 六边形拉环
   ============================================================ */
.lamp-switch {
  position: absolute;
  cursor: pointer;
  z-index: 100;
  display: flex; flex-direction: column; align-items: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  --neon: #00f0ff;                 /* 默认青色霓虹 */
  --neon-glow: rgba(0,240,255,0.6);
  filter: drop-shadow(0 0 8px var(--neon-glow));
}
.lamp-switch.alt {                 /* 第二个拉环：品红霓虹 */
  --neon: #ff2d78;
  --neon-glow: rgba(255,45,120,0.55);
}
/* 底座：暗铬 + 底部霓虹灯带 */
.lamp-base {
  width: 66px; height: 16px;
  background: linear-gradient(180deg, #2b303c 0%, #14171d 55%, #090b0f 100%);
  border-radius: 3px;
  border-top: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 4px 12px rgba(0,0,0,0.75);
  position: relative;
}
.lamp-base::after {
  content: '';
  position: absolute; bottom: -3px; left: 10px; right: 10px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 10px var(--neon), 0 0 22px var(--neon-glow);
  animation: neonPulse 3.2s ease-in-out infinite;
}
.pull-string {
  display: flex; flex-direction: column; align-items: center;
  transform-origin: top center;
  will-change: transform;
}
/* 能量绳：发光数据线，内有数据脉冲向下流动 */
.bead-chain {
  width: 3px; height: 140px;
  background: linear-gradient(180deg, var(--neon) 0%, var(--neon-glow) 100%);
  box-shadow: 0 0 6px var(--neon), 0 0 14px var(--neon-glow);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.bead-chain::after {
  content: '';
  position: absolute; left: 0; top: -30px; width: 100%; height: 26px;
  background: linear-gradient(180deg, transparent, #ffffff, transparent);
  opacity: 0.9;
  animation: dataPulse 2.2s linear infinite;
}
/* 六边形拉环：暗铬壳 + 霓虹核心 */
.pull-handle {
  margin-top: 6px;
  width: 30px; height: 34px;
  background: linear-gradient(135deg, #232936 0%, #2e3542 50%, #10131a 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: relative;
}
.pull-handle::before {
  content: '';
  position: absolute; inset: 2px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border: none;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--neon);
}
.pull-handle::after {
  content: '';
  position: absolute; inset: 9px;
  background: radial-gradient(circle, #ffffff 0%, var(--neon) 45%, transparent 75%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: neonPulse 2s ease-in-out infinite;
}
.lamp-switch:hover .pull-handle {
  filter: brightness(1.4);
}
.lamp-switch:hover .bead-chain {
  box-shadow: 0 0 10px var(--neon), 0 0 24px var(--neon-glow);
}
@keyframes neonPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes dataPulse {
  0% { top: -30px; }
  100% { top: 110%; }
}
/* 拉环标签（上一页/下一页） */
.switch-tag {
  margin-top: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: rgba(240,236,228,0.45);
  writing-mode: vertical-rl;
  text-shadow: 0 0 8px var(--neon-glow);
}
.lamp-switch:hover .switch-tag { color: var(--neon); }

/* 左上双拉环布局 */
.switch-cluster { position: fixed; top: 0; left: 5vw; display: flex; gap: 4vw; z-index: 100; }
.switch-cluster .lamp-switch { position: relative; }
.switch-cluster .bead-chain { height: 100px; }

/* ============================================================
   翻页转场遮罩（忽明忽暗）
   ============================================================ */
.page-veil {
  position: fixed; inset: 0; background: var(--bg-black);
  z-index: 800; pointer-events: none; opacity: 0;
}

/* ============================================================
   全屏 PDF 阅读器
   ============================================================ */
.pdf-reader {
  position: fixed; inset: 0; z-index: 850;
  background: rgba(5,4,3,0.96);
  display: none;
  flex-direction: column;
}
.pdf-reader.open { display: flex; }
.pdf-reader-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,244,230,0.1);
}
.pdf-reader-title {
  font-family: 'Caveat', cursive; font-size: 1.3rem; color: var(--text-warm-gray);
}
.pdf-close {
  background: none; border: 1px solid rgba(255,244,230,0.3); color: var(--text-main);
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  font-size: 1.1rem; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.pdf-close:hover { background: rgba(255,244,230,0.1); transform: rotate(90deg); }
.pdf-frame { flex: 1; border: none; width: 100%; }

/* ============================================================
   房间元素（可复用）
   ============================================================ */
.room-ceiling {
  position: absolute; top: 0; left: 0; right: 0; height: 12vh;
  background: linear-gradient(180deg, #2a221a 0%, #1f1812 70%, #17110c 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
  z-index: 1;
}
.room-cornice {
  position: absolute; top: 12vh; left: 0; right: 0; height: 8px;
  background: linear-gradient(180deg, #3a2e22 0%, #241a10 100%);
  z-index: 1;
}
.wall-texture {
  position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg,
    rgba(255,244,230,0.008) 0px, rgba(255,244,230,0.008) 2px,
    transparent 2px, transparent 8px);
}

/* ============================================================
   通用动效类
   ============================================================ */
.reveal { opacity: 0; transform: translateY(40px); }

@media (max-width: 768px) {
  .switch-cluster { left: 4vw; gap: 6vw; }
  .switch-cluster .bead-chain { height: 70px; }
  .switch-tag { font-size: 0.7rem; }
}
