html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;  /* ✅ 禁止横向滚动 */
}

/* 加载像素字体（可选） */
@font-face {
  font-family: 'FusionPixelCN';
  src: url('../fusionpixel-hans.woff2') format('woff2');
  font-display: swap;
}



.current-tag-label {
  position: fixed;
  top: 12px;
  left: 16px;
  font-family: 'FusionPixelCN', monospace;
  font-size: 22px;
  color: white;
  text-shadow: 0 0 10px rgba(0, 255, 224, 0.5);
  background: none;
  padding: 4px 10px;
  border-radius: 0;
  z-index: 100;
  pointer-events: none;
}

/* 背景图容器 */
.background-container {
  position: fixed;      /* ✅ 关键修改：固定在视口 */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;          /* ✅ 保证在最底层 */
  overflow: hidden;
}

.background-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 面部互动区域 */
.face-area {
  position: absolute;
  width: 8%;
  aspect-ratio: 1 / 1;
  pointer-events: auto;
  z-index: 10;
}

.face-highlight {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(0, 255, 224, 0.7);
  box-shadow: 0 0 10px rgba(0, 255, 224, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.face-info {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 10px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #00ffe0;
  font-family: "Press Start 2P", monospace;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.face-highlight:hover {
  opacity: 1;
}

.face-highlight:hover + .face-info {
  opacity: 1;
  transform: translateX(0);
}

/* 可选动画 */
@keyframes pulse {
  0% {
    box-shadow: 0 0 4px #00ffe0;
  }
  50% {
    box-shadow: 0 0 12px #00ffe0;
  }
  100% {
    box-shadow: 0 0 4px #00ffe0;
  }
}

/* ===============================
   基础设置
   =============================== */

/* ---------- 字体 ---------- */
/* Google 字体预下载到本地也可，用 fallback 防止加载失败 */
@font-face {
  font-family: 'IBMPlexSans';
  src: local('IBM Plex Sans'), local('IBM Plex Sans Regular');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'NotoSansSC';
  src: local('Noto Sans SC'), local('Noto Sans SC Regular');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0d1117;
  --panel: rgba(20, 24, 28, 0.60);
  --panel-hover: rgba(28, 34, 40, 0.72);
  --border: rgba(255,255,255,0.08);
  --text: #dce3ea;
  --muted: #93a1af;
  --heading: #f0f6fc;
  --accent: #1fddb7;
  --shadow: 0 10px 24px rgba(0,0,0,.35);
}

body {
  font-family: 'IBMPlexSans','NotoSansSC',sans-serif;
  color: var(--text);
  line-height: 1.85;
  letter-spacing: .2px;
}

/* ===============================
   小说正文页（index.html / content.html）
   =============================== */
main.novel {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 20px;
  font-family: 'IBM Plex Sans', 'Noto Sans SC', sans-serif;
  color: #e6edf3;
  line-height: 1.8;
}

.novel-title {
  font-family: 'FusionPixelCN', monospace;
  color: var(--heading);
  font-weight: 600;
  font-size: clamp(32px, 3.1vw, 44px);
  margin: 0 0 2rem 0;
  text-align: center;
  letter-spacing: .5px;
  text-shadow: 0 0 6px #00ffe0;
  position: relative;
}


/* 正文容器 */
#novel-content {
  width: min(860px, 100%);
  margin: 1.25rem auto 0;
  padding: clamp(18px, 3vw, 28px) clamp(18px, 3.2vw, 36px);
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 段落 */
#novel-content p {
  margin: 0 0 1.05em 0;
  font-size: 17.5px;
  line-height: 1.95;
  color: var(--text);
  letter-spacing: 0.3px;
  margin: 0 0 1.2em 0;      /* 保持段落之间有间距 */
  line-height: 1.95;
}

#novel-content p + p { margin-top: .15em; }

/* 链接 */
#novel-content a {
  color: var(--accent);
  text-decoration: none;
}
#novel-content a:hover {
  text-decoration: underline;
}

/* 插图 */
#novel-content img {
  max-width: 100%;
  display: block;
  margin: 1rem auto;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}

/* 引用 */
#novel-content blockquote {
  margin: 1.2em 0;
  padding: .9em 1em;
  border-left: 3px solid var(--accent);
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  color: var(--muted);
  font-style: italic;
}

/* ===============================
   多章节章节列表
   =============================== */
.chapter-list {
  list-style: none;
  padding: 0;
  margin: .25rem 0 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.chapter-list a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(22,26,31,.55);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background .18s ease, transform .15s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.chapter-list a:hover {
  background: rgba(28,34,40,.72);
  transform: translateY(-1px);
}

/* ===============================
   响应式
   =============================== */
@media (max-width: 640px){
  .novel-item { width: 94%; }
  #novel-content { padding: 16px 18px; }
  #novel-content p { font-size: 16.5px; line-height: 1.9; }
}

.back-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-family: 'FusionPixelCN', monospace, sans-serif; /* 像素字体 */
  font-size: 14px;
  color: white;
  text-shadow: 0 0 10px rgba(0, 255, 224, 0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1.5;
  text-align: center;
  z-index: 9999;
  text-decoration: none;
  user-select: none;
}

.chapter-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 3rem auto 1rem;
  max-width: 760px;
  gap: 12px;
}

.chapter-nav-bar .chapter-nav {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(20,24,28,.6);
  color: #e6edf3;
  border: 1px solid rgba(255,255,255,.08);
  transition: background .25s, box-shadow .25s, transform .25s;
  backdrop-filter: blur(6px);
}

.chapter-nav-bar .chapter-nav:hover {
  background: rgba(28,34,40,.75);
  box-shadow: 0 0 12px rgba(0,255,224,.4);
  transform: translateY(-2px);
}

.chapter-nav-bar .chapter-nav.index {
  flex: 0 0 auto;
  min-width: 120px;
}

.back-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-family: 'FusionPixelCN', monospace, sans-serif; /* 像素字体 */
  font-size: 14px;
  color: white;
  text-shadow: 0 0 10px rgba(0, 255, 224, 0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1.5;
  text-align: center;
  z-index: 9999;
  text-decoration: none;
  user-select: none;
}

.back-button:hover {
  text-shadow: 0 0 6px #ff4e4e;
  transform: scale(1.05);
}


