/* 主字体：霞鹜文楷（LXGW WenKai Screen），本地自托管，清晰不虚；Noto Serif SC 仅作兜底 */
@import url('/fonts/lxgw/lxgwwenkaiscreen.css');
@import url('https://fonts.googleapis.cn/css2?family=Noto+Serif+SC:wght@300;400;500;600;700&display=swap');

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 配色完全沿用原站 */
  --bg: #0a0807;
  --bg-soft: #120d09;
  --bg-card: #16110d;
  --bg-card-hover: #1f1712;
  --text: #cdbfa6;
  --text-dim: #8a7d68;
  --text-faint: #5f564a;
  --accent: #9e1b1b;          /* 朱砂 */
  --accent-bright: #c1272d;
  --accent-glow: rgba(158, 27, 27, 0.22);
  --gold: #c9a45b;            /* 描金 */
  --gold-bright: #e8c878;
  --gold-dim: rgba(201, 164, 91, 0.10);
  --border: rgba(201, 164, 91, 0.18);
  --border-soft: rgba(201, 164, 91, 0.09);
  --radius: 3px;
  --maxw: 960px;
  /* 全站统一字体：霞鹜文楷（清晰、中式、不虚） */
  --font: 'LXGW WenKai Screen', 'Noto Serif SC', 'STKaiti', 'KaiTi', 'Songti SC', serif;
  --font-brush: var(--font);
  --font-serif: var(--font);
  --font-elegant: var(--font);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg);
  /* 极淡墨晕 + 边角暗角，替代原密集窗棂 */
  background-image:
    radial-gradient(ellipse 50% 38% at 50% -6%, rgba(158, 27, 27, 0.10), transparent 60%),
    radial-gradient(circle at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  background-attachment: fixed;
}

body {
  font-family: var(--font-serif);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: transparent;
  position: relative;
  overflow-x: hidden;
  line-height: 1.75;
}

/* 极淡描金内框，营造装裱感 */
body::before {
  content: '';
  position: fixed;
  inset: 14px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid var(--border-soft);
  border-radius: 2px;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #f3e9d2; }
img { max-width: 100%; }

/* 缓慢墨晕漂移，尊重 reduced-motion */
body::after {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 30%, rgba(158, 27, 27, 0.045), transparent 42%),
    radial-gradient(circle at 75% 70%, rgba(201, 164, 91, 0.04), transparent 46%);
  filter: blur(50px);
  animation: inkDrift 32s ease-in-out infinite alternate;
}
@keyframes inkDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(2.5%, -2.5%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== Layout ===== */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
main { flex: 1; position: relative; z-index: 1; }

/* ===== Top Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 8, 7, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.nav-brand {
  font-family: var(--font-brush); font-size: 1.35rem; color: var(--gold-bright);
  letter-spacing: 0.12em; text-shadow: 0 0 18px rgba(201, 164, 91, 0.25);
}
.nav-links { display: flex; gap: 26px; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--font-elegant); font-size: 0.95rem; color: var(--text-dim);
  letter-spacing: 0.08em; position: relative; padding: 4px 0; transition: color 0.25s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold); transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-bright); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ===== Hero ===== */
.hero { text-align: center; padding: 88px 0 30px; position: relative; }
.hero-name {
  font-family: var(--font-brush); font-size: 3.4rem; font-weight: 400;
  color: var(--gold-bright); letter-spacing: 0.14em;
  text-shadow: 0 0 36px rgba(201, 164, 91, 0.30), 0 2px 6px rgba(0, 0, 0, 0.6);
}
.hero-tagline {
  margin-top: 14px; color: var(--text-dim); font-family: var(--font-elegant);
  font-style: italic; font-size: 1rem; letter-spacing: 0.06em;
}
.hero-rule {
  width: 120px; height: 1px; margin: 30px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  position: relative;
}
.hero-rule::after {
  content: '\273b'; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); color: var(--accent-bright);
  background: var(--bg); padding: 0 10px; font-size: 0.8rem;
}

/* ===== Card grid (首页) ===== */
.card-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; padding: 52px 0 64px;
}
.tile {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px 30px;
  position: relative; overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), border-color 0.3s, background 0.3s, box-shadow 0.4s;
}
.tile::before {
  content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width 0.4s ease;
}
.tile:hover {
  transform: translateY(-5px); background: var(--bg-card-hover);
  border-color: rgba(158, 27, 27, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 24px var(--accent-glow);
}
.tile:hover::before { width: 100%; }
.tile-icon {
  font-size: 1.5rem; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-dim); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--gold-bright);
}
.tile-title { font-size: 1.25rem; font-weight: 600; color: var(--text); letter-spacing: 0.04em; }
.tile-desc { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; }
.tile-arrow { margin-top: auto; color: var(--accent-bright); font-size: 1.05rem; opacity: 0; transform: translateX(-5px); transition: all 0.3s ease; }
.tile:hover .tile-arrow { opacity: 0.75; transform: translateX(0); }

/* ===== Page header ===== */
.page-head { text-align: center; padding: 64px 0 28px; position: relative; }
.page-back {
  display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim);
  font-size: 0.88rem; margin-bottom: 26px; transition: color 0.2s;
}
.page-back:hover { color: var(--accent-bright); }
.page-title {
  font-family: var(--font-brush); font-size: 2.2rem; color: var(--gold-bright);
  letter-spacing: 0.1em; text-shadow: 0 0 24px rgba(201, 164, 91, 0.20);
}
.page-subtitle { margin-top: 12px; color: var(--text-dim); font-family: var(--font-elegant); font-style: italic; font-size: 0.98rem; }

/* ===== Card / panel ===== */
.card-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 32px; margin-bottom: 20px;
}
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); margin-bottom: 20px; overflow: hidden; }
.panel-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: transparent; border: none; cursor: pointer; color: inherit;
  padding: 22px 28px; text-align: left; font-family: inherit;
  transition: background 0.25s;
}
.panel-head:hover { background: var(--bg-card-hover); }
.panel-title {
  font-family: var(--font-serif); font-size: 1.12rem; font-weight: 600;
  color: var(--gold-bright); letter-spacing: 0.04em;
  padding-left: 14px; border-left: 3px solid var(--accent);
}
.chevron {
  flex: 0 0 auto; width: 9px; height: 9px;
  border-right: 2px solid var(--gold-bright); border-bottom: 2px solid var(--gold-bright);
  transform: rotate(45deg); transition: transform 0.35s ease;
}
.panel.open .chevron { transform: rotate(-135deg); }
.panel-body { max-height: 0; overflow: hidden; transition: max-height 0.45s ease; }
.panel-inner { padding: 0 28px 26px; }

/* ===== Divider ===== */
.divider {
  border: none; height: 1px; margin: 36px 0;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  position: relative;
}
.divider::after {
  content: '\273b'; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); color: var(--accent-bright);
  background: var(--bg); padding: 0 14px; font-size: 0.75rem;
}

/* ===== Profile (陪玩) ===== */
.profile { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.avatar {
  width: 66px; height: 66px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: var(--bg); box-shadow: 0 0 16px rgba(201, 164, 91, 0.18);
}
.profile-name { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; color: var(--text); }
.meta-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 22px; }
.meta-grid li { display: flex; gap: 10px; font-size: 0.92rem; }
.meta-label { color: var(--text-dim); flex: 0 0 auto; }
.meta-label::after { content: '\ff1a'; }
.meta-value { color: var(--text); }

/* ===== Skill / project grid ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.chip {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 18px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.chip:hover { border-color: rgba(158, 27, 27, 0.45); box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 0 14px var(--accent-glow); transform: translateY(-1px); }
.chip-icon { font-size: 1.5rem; flex: 0 0 auto; width: 34px; text-align: center; color: var(--gold-bright); }
.chip-name { font-family: var(--font-serif); font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.chip-brief { color: var(--text-dim); font-size: 0.82rem; }
a.chip { color: inherit; }

/* ===== Text blocks ===== */
.lead { color: var(--text-dim); font-size: 0.95rem; line-height: 1.85; }
.warn {
  background: var(--gold-dim); border: 1px solid rgba(201, 164, 91, 0.26);
  border-radius: var(--radius); padding: 13px 18px; margin: 14px 0;
  display: flex; align-items: flex-start; gap: 10px;
}
.warn-icon { flex: 0 0 auto; color: var(--gold-bright); font-size: 0.95rem; line-height: 1.7; }
.warn p { color: var(--text-dim); font-size: 0.88rem; line-height: 1.7; }

.list-dot { list-style: none; }
.list-dot li { color: var(--text-dim); font-size: 0.92rem; line-height: 1.8; padding-left: 18px; position: relative; margin-bottom: 6px; }
.list-dot li::before { content: '\2022'; position: absolute; left: 0; color: var(--accent-bright); }

/* ===== Gallery + lightbox ===== */
.gallery { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 14px; }
.gallery-item {
  width: 200px; height: 200px; flex: 0 0 auto; padding: 0; margin: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden; cursor: pointer; line-height: 0;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.gallery-item:hover { border-color: rgba(158, 27, 27, 0.5); box-shadow: 0 0 18px var(--accent-glow); transform: translateY(-2px); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-empty { width: 100%; text-align: center; color: var(--text-faint); font-size: 0.9rem; padding: 22px 0; }

.lightbox {
  position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 4, 3, 0.92); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; padding: 24px; transition: opacity 0.3s ease, visibility 0.3s ease; cursor: zoom-out;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img, .lightbox video {
  max-width: 92vw; max-height: 90vh; object-fit: contain;
  border: 1px solid rgba(201, 164, 91, 0.5); border-radius: 6px; box-shadow: 0 0 40px rgba(0,0,0,0.8);
  transform: scale(0.96); transition: transform 0.3s ease;
}
.lightbox.open img, .lightbox.open video { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 18px; right: 26px; font-size: 2.2rem; line-height: 1;
  color: var(--gold-bright); cursor: pointer; text-shadow: 0 0 12px rgba(0,0,0,0.9);
}
.lightbox-close:hover { color: #fff; }

/* ===== Empty state ===== */
.empty { flex: 1; display: flex; align-items: center; justify-content: center; padding: 80px 0; }
.empty-inner { text-align: center; color: var(--text-dim); }
.empty-icon { font-size: 2.6rem; opacity: 0.4; color: var(--gold); margin-bottom: 14px; }
.empty-text { font-size: 0.95rem; }

/* ===== Footer ===== */
.footer { padding: 34px 0; text-align: center; border-top: 1px solid var(--border-soft); margin-top: 40px; position: relative; z-index: 1; }
.footer-icp { color: var(--text-dim); font-size: 0.75rem; letter-spacing: 0.04em; opacity: 0.85; }
.footer-icp a { color: var(--text-dim); border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.footer-icp a:hover { color: var(--gold-bright); border-bottom-color: var(--gold-bright); }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero { padding: 56px 0 22px; }
  .hero-name { font-size: 2.3rem; }
  .card-grid { grid-template-columns: 1fr; gap: 14px; padding: 30px 0 44px; }
  .tile { padding: 26px 22px; }
  .page-head { padding: 44px 0 22px; }
  .page-title { font-size: 1.6rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .card-box, .panel-head, .panel-inner { padding-left: 20px; padding-right: 20px; }
  .profile { flex-direction: column; text-align: center; }
  .gallery-item { width: calc(50% - 7px); height: auto; aspect-ratio: 1/1; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.88rem; }
}

/* ===== 键盘可访问性：统一焦点描边（配色内） ===== */
a:focus-visible, button:focus-visible,
.tile:focus-visible, .chip:focus-visible, .gallery-item:focus-visible,
.panel-head:focus-visible, .nav-links a:focus-visible, .to-top:focus-visible {
  outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 2px;
}

/* ===== 折叠面板展开态强化（不改配色/字体） ===== */
.panel.open > .panel-head { background: linear-gradient(90deg, var(--gold-dim), transparent); }
.panel.open .panel-title { border-left-color: var(--gold-bright); }
.panel-head { border-left: 3px solid transparent; transition: background 0.25s, border-color 0.25s; }
.panel.open .panel-head { border-left-color: var(--accent); }

/* ===== 返回顶部（配色内） ===== */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22, 17, 13, 0.85); border: 1px solid var(--border);
  color: var(--gold-bright); cursor: pointer; line-height: 0;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, border-color 0.3s, background 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--gold-bright); background: var(--bg-card-hover); box-shadow: 0 0 18px var(--accent-glow); }
.to-top svg { width: 18px; height: 18px; }

/* ===== 详情页：标签与“更多游戏”导航（无新增顶部导航项） ===== */
.detail-tag {
  display: inline-block; margin-top: 10px; padding: 3px 12px;
  font-size: 0.8rem; letter-spacing: 0.08em; color: var(--gold-bright);
  border: 1px solid var(--border); border-radius: 999px; background: var(--gold-dim);
}
.related { margin-top: 8px; }
.related .grid-2 { margin-top: 14px; }

