@font-face { font-family: 'ZHCustom'; src: url('zh-cn.ttf') format('truetype'); font-display: swap; }
/* ===== 全局 ===== */
:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --primary-light: #a78bfa; --gold: #d4b896;
  --cream: #f8f6fc;
  --bg-dark: #1a1a2e;
  --glass-border: rgba(160,140,200,0.35);
  --text: #e0d8f0;
  --text-light: #b0a0c8;
  --font-cn: "Noto Serif SC", "Source Han Serif SC", "SimSun", "STSong", serif;
  --font-ja: "Noto Serif JP", serif;
  --nav-height: 64px;
}

* { margin:0; padding:0; box-sizing:border-box; }

html { background: #0d0d0d; }

body {
  font-family: 'ZHCustom', var(--font-cn);
  background:
    radial-gradient(ellipse at 20% 20%, rgba(120,60,220,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(160,100,200,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(100,40,180,0.06) 0%, transparent 40%),
    #111;
  color: var(--text);
  overflow-x: hidden;
  padding-bottom: 88px;
  min-height: 100vh;
}

/* ===== 飘落枫叶粒子 ===== */
.maple-particles {
  position: fixed; top:0; left:0; width:100%; height:100%;
  pointer-events: none; z-index: 5; overflow: hidden;
}
.particle {
  position: absolute;
  font-size: 20px;
  opacity: 0.18;
  animation: fall linear forwards;
  user-select: none;
}
@keyframes fall {
  0%   { transform: translateY(-60px) rotate(0deg) translateX(0px); opacity:0; }
  10%  { opacity:0.18; }
  90%  { opacity:0.12; }
  100% { transform: translateY(105vh) rotate(720deg) translateX(80px); opacity:0; }
}

/* ===== 页面容器（不创建层叠上下文，让毛玻璃能透到枫叶） ===== */
.page { display:none; }
.page.active { display:block; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:translateY(0);} }

/* ===== 液态玻璃（CSS 水滴风格：多层阴影 + 反光点） ===== */

/* ===== 头部横幅 ===== */
.hero {
  height: 70vh; min-height: 480px; max-height: 720px;
  position: relative; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, #0f0a1a 0%, #2d1155 30%, #1a1a2e 60%, #0a0a0a 100%);
  text-align: center; overflow: hidden;
}
.hero::before {
  content:""; position:absolute; inset:0;
  background: radial-gradient(ellipse at 50% 30%, rgba(120,60,220,0.3) 0%, transparent 70%);
}
.hero::after {
  content:""; position:absolute; bottom:0; left:0; right:0; height:40%;
  background: linear-gradient(to bottom, transparent, #111);
}
.hero-overlay {
  position:absolute; inset:0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.008) 2px, rgba(255,255,255,0.008) 4px);
}
.hero-content { position:relative; z-index:2; }
.hero-name {
  font-size: clamp(42px, 8vw, 80px);
  font-family: var(--font-ja);
  color: #e8d8f0;
  letter-spacing: 0.15em;
  text-shadow: 0 0 60px rgba(140,80,220,0.4), 0 2px 4px rgba(0,0,0,0.6);
  margin-bottom: 8px;
}
.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 24px);
  color: var(--gold);
  letter-spacing: 0.25em;
  font-family: var(--font-ja);
  margin-bottom: 24px;
}
.hero-tags {
  display:flex; gap:16px; justify-content:center; flex-wrap:wrap;
}
.hero-tags span {
  background: rgba(120,50,200,0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(180,140,220,0.4);
  padding: 6px 18px; border-radius: 20px;
  font-size: 14px; color: var(--cream);
}
.hero-scroll-hint {
  position:absolute; bottom:50px; left:50%; transform:translateX(-50%);
  color: var(--text-light); font-size:13px; z-index:2;
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100%{opacity:0.3;} 50%{opacity:1;} }

/* ===== 内容区 ===== */
.content {
  max-width: 1100px; margin: -60px auto 0; padding: 0 24px 60px;
  position:relative;
}

/* ===== 信息卡片（百度百科风） ===== */
.infobox-wrapper { display:flex; gap:32px; flex-wrap:wrap; }
.infobox {
  flex: 0 0 260px;
  /* 玻璃基底 */
  background: rgba(28,22,16,0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(180,140,200,0.25);
  border-radius: 8px; overflow: hidden;
  align-self: flex-start;
  position: sticky; top: 16px;
  z-index: 10;
  /* 多层阴影：外深度 + 内高光 + 内暗边 */
  box-shadow:
    0 8px 32px rgba(0,0,0,0.35),
    inset 1px 1px 0 rgba(255,255,255,0.07),
    inset -1px -1px 0 rgba(0,0,0,0.25),
    inset 0 1px 2px rgba(255,255,255,0.04);
}
.infobox-header {
  background: linear-gradient(135deg, var(--primary-dark), #3b0f6b);
  color: var(--cream); text-align:center;
  padding: 12px; font-size: 18px; font-weight: bold;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(180,140,200,0.3);
}
.infobox-avatar {
  padding: 24px; text-align: center;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(180,140,200,0.2);
}
.avatar-placeholder {
  width: 140px; height: 140px; border-radius: 50%;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(120,50,200,0.3), rgba(50,20,100,0.5));
  display:flex; align-items:center; justify-content:center;
  font-size: 64px;
  border: 2px solid rgba(180,140,220,0.4);
}
.infobox-table { width:100%; border-collapse:collapse; font-size:13px; }
.infobox-table th {
  background: rgba(160,120,200,0.12); color: var(--gold);
  padding: 9px 12px; text-align:right; width:80px;
  font-weight: normal; white-space: nowrap;
  border-bottom: 1px solid rgba(180,140,200,0.2);
}
.infobox-table td {
  padding: 9px 12px; color: var(--cream);
  border-bottom: 1px solid rgba(180,140,200,0.2);
}

/* ===== 正文 ===== */
.article { flex:1; min-width: 300px; }
.section {
  background: rgba(22,18,12,0.5);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 8px; padding: 28px 32px; margin-bottom: 20px;
}
.section-title {
  font-size: 22px; color: var(--gold);
  margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(180,140,200,0.25);
  letter-spacing: 0.05em;
}
.section p {
  line-height: 1.9; font-size: 15px; color: var(--text);
  margin-bottom: 14px; text-indent: 2em;
}
.section p:last-child { margin-bottom:0; }

/* ===== 性格列表 ===== */
.trait-list { list-style:none; }
.trait-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(180,140,200,0.15);
  line-height: 1.8; font-size: 15px;
}
.trait-list li:last-child { border-bottom:none; }
.trait-list strong { color: var(--gold); }

/* ===== 引用块 ===== */
.quote-block {
  background: rgba(120,50,200,0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(160,130,220,0.3);
  border-left: 3px solid var(--primary);
  padding: 18px 24px; margin: 16px 0 20px;
  border-radius: 0 6px 6px 0;
}
.quote-block p {
  font-size: 16px; color: #c8b8e8; text-indent:0;
  font-style: italic; line-height: 1.9;
}

/* ===== 能力卡片 ===== */
.ability-cards { display:flex; gap:16px; flex-wrap:wrap; }
.ability-card {
  flex: 1; min-width: 240px;
  background: rgba(120,50,200,0.06);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  border: 1px solid var(--glass-border);
  border-radius: 8px; padding: 20px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.ability-card:hover {
  transform: translateY(-2px);
  border-color: rgba(160,130,220,0.5);
  box-shadow: 0 4px 20px rgba(120,40,200,0.12);
}
.ability-icon { font-size: 32px; margin-bottom: 10px; }
.ability-card h3 {
  color: var(--gold); font-size: 16px; margin-bottom: 8px;
}
.ability-card p { font-size: 13px; line-height:1.7; text-indent:0; color: var(--text-light); }

/* ===== 第二页 - 图库 ===== */
.page-gallery { padding-top: 24px; }
.gallery-header {
  text-align:center; padding: 40px 24px 30px;
}
.gallery-header h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-family: var(--font-ja);
  color: #e8d8f0; letter-spacing: 0.12em;
}
.gallery-header p {
  color: var(--text-light); margin-top:8px; font-size: 14px; letter-spacing: 0.15em;
}
.gallery-grid {
  max-width: 1200px; margin: 0 auto; padding: 0 16px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative; overflow: hidden; border-radius: 8px;
  cursor: pointer; aspect-ratio: 3/4;
  background: rgba(22,18,12,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 30px rgba(120,40,200,0.25);
  border-color: rgba(160,130,220,0.5);
}
.gallery-item img {
  width:100%; height:100%; object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item:hover img { transform: scale(1.08); }

/* ===== 灯箱 ===== */
.lightbox {
  display:none; position:fixed; inset:0; z-index:1000;
  background: rgba(0,0,0,0.92);
  align-items:center; justify-content:center;
}
.lightbox.active { display:flex; animation: fadeIn 0.25s ease; }
.lightbox img {
  max-width: 90vw; max-height: 85vh; object-fit:contain;
  border-radius: 4px; box-shadow: 0 4px 40px rgba(0,0,0,0.6);
}
.lightbox-close {
  position:absolute; top:24px; right:32px;
  font-size: 40px; color: #ccc; cursor:pointer;
  z-index:1001; transition: color 0.2s;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
  position:absolute; bottom:30px; left:50%; transform:translateX(-50%);
  display:flex; gap:24px;
}
.lightbox-nav button {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #ccc; font-size: 20px; width: 44px; height: 44px;
  border-radius: 50%; cursor:pointer;
  transition: background 0.2s, color 0.2s;
}
.lightbox-nav button:hover { background: rgba(255,255,255,0.2); color:#fff; }

/* ===== 第四页 - 动漫 ===== */
.page-anime {
  padding-top: 24px;
  min-height: 100vh;
}
.anime-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
}
.anime-title {
  font-size: clamp(28px, 5vw, 44px);
  font-family: var(--font-ja);
  color: #e8d8f0;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.anime-sub {
  color: var(--text-light);
  font-size: 14px;
  letter-spacing: 0.12em;
  margin-bottom: 28px;
}
.anime-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(120, 50, 200, 0.25);
  border: 1px solid rgba(160, 140, 220, 0.2);
}
.anime-player iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.anime-note {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 16px;
  opacity: 0.7;
}

/* ===== 底部导航：WebGL2 路径追踪液态玻璃 ===== */
.bottom-nav {
  position:fixed; bottom: 32px;
  left: 50%; transform: translateX(-50%);
  width: 85vw;
  height: 56px; padding: 0 8px;
  border-radius: 28px;
  display:flex; align-items:center; justify-content:center; gap: 4px;
  z-index:100;
  pointer-events: auto;
  isolation: isolate;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  box-shadow: none;
  filter: none;
}

.bottom-nav::before {
  content: none;
}

.bottom-nav::after {
  content: none;
}

.liquid-glass-nav-canvas {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 50%;
  width: 100%;
  height: 140%;
  transform: translateY(-50%);
  border-radius: 0;
  pointer-events: none;
  background: transparent;
  contain: strict;
}

.nav-btn {
  display:flex; align-items:center; justify-content:center; gap: 6px;
  height: 42px; padding: 0 18px;
  background: none; border: none; color: var(--text-light);
  font-family: 'ZHCustom', var(--font-cn); font-size: 13px;
  cursor: pointer; transition: all 0.25s ease;
  position: relative;
  border-radius: 21px;
  white-space: nowrap;
  z-index: 3;
}
.nav-btn:hover:not(.active) {
  color: #fff;
  background: transparent;
}
.nav-btn.active {
  color: #fff;
  background: transparent;
  border: 0;
  text-shadow: 0 0 12px rgba(200,160,255,0.3);
  box-shadow: none;
}
.nav-btn.active:active {
  background: transparent;
  border-color: transparent;
}
.nav-btn.active::after { display:none; }
.nav-btn .nav-icon { font-size: 18px; }
.nav-btn .nav-label { font-size: 13px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .infobox-wrapper { flex-direction:column; }
  .infobox { position:static; flex: auto; width:100%; }
  .section { padding: 20px 18px; }
  .section p { font-size:14px; text-indent:1.5em; }
  .ability-cards { flex-direction:column; }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  .bottom-nav {
    width: 92vw;
    height: 58px;
    bottom: 24px;
    padding: 0 6px;
    border-radius: 29px;
  }
  .bottom-nav::before,
  .bottom-nav::after {
    border-radius: 29px;
  }
  .liquid-glass-nav-canvas { border-radius: 0; }
  .nav-btn {
    height: 46px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 23px;
  }
  .nav-btn .nav-icon { font-size: 15px; }
  .nav-btn .nav-label { font-size: 12px; }
}

.nav-btn[data-page="pageAnime"],
.nav-btn[hidden] {
  display: none !important;
}

.bottom-nav.liquid-glass-css-only {
  background: rgba(16, 17, 22, 0.34);
  backdrop-filter: blur(5px) saturate(112%);
  -webkit-backdrop-filter: blur(5px) saturate(112%);
}

.bottom-nav.liquid-glass-css-only .liquid-glass-nav-canvas {
  display: none;
}
