@import url('https://fonts.googleapis.cn/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;500;600;700&family=ZCOOL+XiaoWei&display=swap');

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

:root {
  /* 墨黑基底（哥特暗调） */
  --bg: #0a0807;
  --bg-card: #16110d;
  --bg-card-hover: #1f1712;
  /* 宣纸 / 米色文字 */
  --text: #cdbfa6;
  --text-dim: #8a7d68;
  /* 朱砂（中式红，主点缀） */
  --accent: #9e1b1b;
  --accent-bright: #c1272d;
  --accent-glow: rgba(158, 27, 27, 0.20);
  /* 描金（哥特金饰） */
  --gold: #c9a45b;
  --gold-bright: #e8c878;
  --gold-dim: rgba(201, 164, 91, 0.12);
  --border: rgba(201, 164, 91, 0.20);
  --radius: 2px;
  --font-brush: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-elegant: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* 水墨晕染 + 边缘暗角(vignette)，营造神秘纵深 */
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 55% 45% at 50% -8%, rgba(158, 27, 27, 0.12), transparent 60%),
    radial-gradient(ellipse 45% 40% at 12% 102%, rgba(201, 164, 91, 0.07), transparent 60%),
    radial-gradient(ellipse 45% 40% at 88% 102%, rgba(158, 27, 27, 0.07), transparent 60%),
    radial-gradient(circle at 50% 42%, transparent 52%, rgba(0, 0, 0, 0.62) 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;
  background: transparent;
  position: relative;
  overflow-x: hidden;
}

/* 窗棂纹（极淡金线网格） */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 41px, rgba(201, 164, 91, 0.045) 41px 42px),
    repeating-linear-gradient(90deg, transparent 0 41px, rgba(201, 164, 91, 0.045) 41px 42px);
  background-attachment: fixed;
}

/* 缓慢水墨漂移（仅 transform，60fps，尊重 reduced-motion） */
body::after {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 32%, rgba(158, 27, 27, 0.05), transparent 42%),
    radial-gradient(circle at 72% 68%, rgba(20, 16, 12, 0.45), transparent 46%);
  filter: blur(42px);
  animation: inkDrift 30s ease-in-out infinite alternate;
}

@keyframes inkDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3%, -3%, 0) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  html { scroll-behavior: auto; }
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #f3e9d2; }

/* ===== Layout ===== */
.container { max-width: 900px; margin: 0 auto; padding: 0 28px; width: 100%; }
main { flex: 1; }

/* ===== Header（哥特尖拱水印 + 书法标题 + 闲章） ===== */
.site-header {
  padding: 64px 0 22px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute;
  top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 240px; height: 320px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='240'%20height='320'%20viewBox='0%200%20240%20320'%3E%3Cpath%20d='M20%20320%20V120%20Q20%2020%20120%2020%20Q220%2020%20220%20120%20V320'%20fill='none'%20stroke='%23c9a45b'%20stroke-width='2'/%3E%3Cpath%20d='M120%2020%20V120'%20stroke='%23c9a45b'%20stroke-width='1'%20opacity='0.5'/%3E%3Cpath%20d='M70%20320%20V120%20Q70%2060%20120%2060%20Q170%2060%20170%20120%20V320'%20fill='none'%20stroke='%23c9a45b'%20stroke-width='1.2'%20opacity='0.6'/%3E%3Ccircle%20cx='120'%20cy='170'%20r='10'%20fill='none'%20stroke='%239e1b1b'%20stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}
.site-header::after {
  content: '\2726';
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 12px;
  color: var(--gold);
  font-size: 1.2rem;
  z-index: 1;
}
.site-name {
  position: relative;
  z-index: 1;
  font-family: var(--font-brush);
  font-size: 3rem;
  font-weight: 400;
  color: var(--gold-bright);
  letter-spacing: 0.14em;
  text-shadow: 0 0 30px rgba(201, 164, 91, 0.28), 0 2px 6px rgba(0, 0, 0, 0.6);
}

.site-tagline {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: var(--text-dim);
  font-family: var(--font-elegant);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

/* ===== Card Grid（哥特窗格卡片） ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding: 52px 0;
}
.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px 30px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, background 0.3s, box-shadow 0.35s;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(201, 164, 91, 0.05);
}
/* 顶部尖拱窗饰 */
.card::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 66px; height: 30px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='48'%20height='32'%20viewBox='0%200%2048%2032'%3E%3Cpath%20d='M3%2032%20V14%20Q3%202%2024%202%20Q45%202%2045%2014%20V32'%20fill='none'%20stroke='%23c9a45b'%20stroke-width='1.4'/%3E%3Cpath%20d='M24%202%20V13'%20stroke='%23c9a45b'%20stroke-width='0.9'%20opacity='0.55'/%3E%3Ccircle%20cx='24'%20cy='19'%20r='2.4'%20fill='%239e1b1b'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.7;
  transition: opacity 0.3s, filter 0.3s;
  pointer-events: none;
}
/* 底部描金流光线 */
.card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(158, 27, 27, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(158, 27, 27, 0.35), 0 0 22px var(--accent-glow);
}
.card:hover::before { opacity: 1; filter: drop-shadow(0 0 5px rgba(158, 27, 27, 0.6)); }
.card:hover::after { opacity: 1; }
.card-icon {
  font-size: 1.8rem;
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  color: var(--gold-bright);
}
.card-title { font-family: var(--font-serif); font-size: 1.18rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.card-desc { color: var(--text-dim); font-size: 0.88rem; line-height: 1.65; }
.card-arrow {
  position: absolute; bottom: 24px; right: 24px;
  color: var(--accent-bright); font-size: 1.1rem;
  opacity: 0; transform: translateX(-4px);
  transition: all 0.3s ease;
}
.card:hover .card-arrow { opacity: 0.7; transform: translateX(0); }

/* ===== Sub-page ===== */
.page-header { padding: 64px 0 40px; text-align: center; position: relative; }
.page-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-dim); font-size: 0.88rem;
  margin-bottom: 32px; transition: color 0.2s;
}
.page-back:hover { color: var(--accent-bright); }
.page-title {
  font-family: var(--font-brush);
  font-size: 2rem;
  color: var(--gold-bright);
  text-shadow: 0 0 24px rgba(201, 164, 91, 0.22);
}
.page-subtitle { margin-top: 12px; color: var(--text-dim); font-family: var(--font-elegant); font-style: italic; font-size: 0.95rem; }

/* ===== Profile ===== */
.profile-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 32px; margin-bottom: 24px;
  box-shadow: inset 0 0 0 1px rgba(201, 164, 91, 0.05);
}
.profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: var(--bg);
  box-shadow: 0 0 14px rgba(201, 164, 91, 0.18);
}
.profile-name { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; }

.info-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 24px; }
.info-list li { display: flex; gap: 12px; font-size: 0.92rem; line-height: 1.6; }
.info-label { color: var(--text-dim); min-width: 48px; flex-shrink: 0; }
.info-label::after { content: '\ff1a'; }
.info-value { color: var(--text); }

/* ===== Info Cards ===== */
.info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px; margin-bottom: 16px;
  box-shadow: inset 0 0 0 1px rgba(201, 164, 91, 0.05);
}
.card-heading {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; color: var(--gold-bright);
  margin-bottom: 12px; padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.card-text { color: var(--text-dim); font-size: 0.92rem; line-height: 1.75; }

/* ===== Warning ===== */
.warning-box {
  background: var(--gold-dim); border: 1px solid rgba(201, 164, 91, 0.28);
  border-radius: var(--radius); padding: 14px 20px; margin: 12px 0;
  display: flex; align-items: flex-start; gap: 10px;
}
.warning-icon { flex-shrink: 0; font-size: 1rem; line-height: 1.6; color: var(--gold-bright); }
.warning-box p { color: var(--text-dim); font-size: 0.88rem; line-height: 1.6; }

/* ===== Divider（哥特尖拱分隔符） ===== */
.section-divider {
  border: none; height: 32px; margin: 34px 0;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='48'%20height='32'%20viewBox='0%200%2048%2032'%3E%3Cpath%20d='M3%2032%20V14%20Q3%202%2024%202%20Q45%202%2045%2014%20V32'%20fill='none'%20stroke='%23c9a45b'%20stroke-width='1.4'/%3E%3Cpath%20d='M24%202%20V13'%20stroke='%23c9a45b'%20stroke-width='0.9'%20opacity='0.55'/%3E%3Ccircle%20cx='24'%20cy='19'%20r='2.4'%20fill='%239e1b1b'/%3E%3C/svg%3E") center/48px 32px no-repeat;
  position: relative;
}
.section-divider::before, .section-divider::after {
  content: ''; position: absolute; top: 50%; height: 1px;
  width: calc(50% - 34px);
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.section-divider::before { left: 0; }
.section-divider::after { right: 0; }

/* ===== Skill / Game Buttons ===== */
.skill-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; margin-top: 16px; min-width: 0;
}
.skill-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  transition: all 0.25s ease; user-select: none;
  overflow: hidden; min-width: 0;
  box-shadow: inset 0 0 0 1px rgba(201, 164, 91, 0.04);
}
.skill-btn: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); }
.skill-btn-icon { font-size: 1.6rem; flex-shrink: 0; width: 36px; text-align: center; color: var(--gold-bright); }
.skill-btn-info { flex: 1; min-width: 0; overflow: hidden; }
.skill-btn-name { font-family: var(--font-serif); font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.skill-btn-brief {
  color: var(--text-dim); font-size: 0.82rem;
  word-break: keep-all; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
a.skill-btn { cursor: pointer; color: inherit; text-decoration: none; }
a.skill-btn:hover { transform: translateY(-1px); }

/* ===== Review Toggle ===== */
.review-toggle { cursor: pointer; display: flex; align-items: center; gap: 8px; user-select: none; padding: 4px 0; }
.review-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  width: 8px; height: 8px;
  border-right: 2px solid var(--gold-bright);
  border-bottom: 2px solid var(--gold-bright);
  transform: rotate(-45deg);
  transition: transform 0.3s ease, border-color 0.3s ease;
  filter: drop-shadow(0 0 3px rgba(201, 164, 91, 0.4));
}
.review-arrow.open { transform: rotate(45deg); }
.review-toggle:hover .review-arrow { border-color: var(--gold); }
.review-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.review-content.open { max-height: 2000px; }
.skill-collapse { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.skill-collapse.open { max-height: 2000px; }

/* ===== Image Placeholder ===== */
.img-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 0.85rem; font-style: italic;
}

/* ===== Image Gallery ===== */
.image-gallery { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; justify-content: center; }
.gallery-empty { width: 100%; text-align: center; color: #9a8f86; font-size: 0.9rem; padding: 22px 0; letter-spacing: 0.05em; }
.gallery-item {
  width: 220px; height: 220px; 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: all 0.3s ease;
}
.gallery-item:hover { border-color: rgba(158, 27, 27, 0.45); box-shadow: 0 0 16px var(--accent-glow); }
.gallery-img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center;
  transition: transform 0.4s ease;
}
.gallery-item:hover .gallery-img { transform: scale(1.06); }

/* ===== Detail Page ===== */
.detail-body { padding: 0 0 40px; }
.detail-title { font-family: var(--font-brush); font-size: 1.7rem; color: var(--gold-bright); margin-bottom: 20px; }
.detail-list { list-style: none; margin-bottom: 16px; }
.detail-list li {
  color: var(--text-dim); font-size: 0.92rem; line-height: 1.75;
  padding-left: 18px; position: relative; margin-bottom: 6px;
}
.detail-list li::before { content: '\2022'; position: absolute; left: 0; color: var(--accent-bright); }

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

/* ===== Footer ===== */
.site-footer { padding: 32px 0; text-align: center; border-top: 1px solid var(--border); }
.footer-icp {
  color: var(--text-dim);
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.footer-icp a {
  color: var(--text-dim);
  text-decoration: none;
  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);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  body::before { opacity: 0.5; }
  .card-grid { grid-template-columns: 1fr; gap: 16px; padding: 28px 0; }
  .site-header { padding: 40px 0 16px; }
  .site-header::before { width: 160px; height: 220px; opacity: 0.08; }
  .site-name { font-size: 2.1rem; }
  .card { padding: 28px 20px 24px; }
  .card::before { width: 52px; height: 24px; }
  .page-header { padding: 40px 0 24px; }
  .page-title { font-size: 1.5rem; }
  .skill-grid { grid-template-columns: 1fr; }
  .profile-card { padding: 24px 20px; }
  .info-list { grid-template-columns: 1fr; }

  .image-gallery { gap: 12px; }
  .gallery-item { width: calc(50% - 6px); height: auto; aspect-ratio: 1 / 1; }
}

/* ===== Card Head Row (chevron beside heading) ===== */
.card-head-row { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; padding: 4px 0; }
.card-head-row:hover .review-arrow { border-color: var(--gold); }

/* ===== Lightbox (preview -> original) ===== */
.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 {
  max-width: 92vw; max-height: 92vh;
  object-fit: contain;
  border: 1px solid rgba(201, 164, 91, 0.5); border-radius: 8px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  transform: scale(0.96); transition: transform 0.3s ease;
}
.lightbox.open .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 18px; right: 26px;
  font-size: 2.2rem; line-height: 1; color: var(--gold-bright);
  cursor: pointer; user-select: none;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
}
.lightbox-close:hover { color: #fff; }

/* lightbox 内视频播放 */
.lightbox-video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    background: #000;
    display: block;
    margin: 0 auto;
}
