/* ===== 全局变量 ===== */
:root {
  /* 首页深色主题 */
  --bg: #0d0f14;
  --panel: #13161d;
  --panel-hover: #1a1e28;
  --line: #1e2330;
  --text: #e8ecf5;
  --text-muted: #7a83a0;
  --accent-cyan: #00e5c8;
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  --glow-cyan: rgba(0, 229, 200, 0.18);
  --glow-purple: rgba(168, 85, 247, 0.18);

  /* 详情页亮色主题 */
  --detail-bg: #f8f5ff;
  --detail-panel: #ffffff;
  --detail-line: #e8e0f8;
  --detail-text: #1a1535;
  --detail-text-muted: #6b6080;
  --detail-accent: #8b5cf6;
  --detail-accent2: #7c3aed;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(1160px, 94vw); margin: 0 auto; }

/* ===== 首页 body ===== */
body[data-page="home"] {
  background: var(--bg);
  color: var(--text);
}

/* ===== 首页 Header ===== */
body[data-page="home"] .site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
body[data-page="home"] .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
body[data-page="home"] .brand {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(90deg, #00e5c8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
}
body[data-page="home"] .nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-muted);
}
body[data-page="home"] .nav-links a:hover { color: var(--accent-cyan); }

/* ===== 首页 Hero ===== */
.home-hero {
  position: relative;
  text-align: center;
  padding: 96px 0 64px;
  overflow: hidden;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(0,229,200,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 75% 60%, rgba(168,85,247,0.14) 0%, transparent 70%);
  pointer-events: none;
}
.home-hero h1 {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 900;
  line-height: 1.15;
  background: linear-gradient(135deg, #00e5c8 0%, #a855f7 60%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}
.home-hero .hero-sub {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}
.home-hero .tag-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  position: relative;
}
.home-hero .tag {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.home-hero .tag:nth-child(4n+1) { background: var(--glow-cyan); border-color: rgba(0,229,200,0.4); color: #00e5c8; }
.home-hero .tag:nth-child(4n+2) { background: var(--glow-purple); border-color: rgba(168,85,247,0.4); color: #a855f7; }
.home-hero .tag:nth-child(4n+3) { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.4); color: #60a5fa; }
.home-hero .tag:nth-child(4n+4) { background: rgba(244,114,182,0.12); border-color: rgba(244,114,182,0.4); color: #f472b6; }
.home-hero .tag:hover { transform: translateY(-2px); filter: brightness(1.2); }

/* ===== 首页 Section ===== */
body[data-page="home"] .section { padding: 56px 0; }
body[data-page="home"] .section-title {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #00e5c8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body[data-page="home"] .section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 36px;
}
body[data-page="home"] .section-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #00e5c8, #a855f7);
  border-radius: 999px;
  margin: 10px auto 36px;
}

/* ===== 首页 分类卡片 ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 20px 24px;
  text-align: center;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: 16px;
}
.cat-card:nth-child(4n+1)::before { background: radial-gradient(circle at 50% 0%, rgba(0,229,200,0.15), transparent 70%); }
.cat-card:nth-child(4n+2)::before { background: radial-gradient(circle at 50% 0%, rgba(168,85,247,0.15), transparent 70%); }
.cat-card:nth-child(4n+3)::before { background: radial-gradient(circle at 50% 0%, rgba(59,130,246,0.15), transparent 70%); }
.cat-card:nth-child(4n+4)::before { background: radial-gradient(circle at 50% 0%, rgba(244,114,182,0.15), transparent 70%); }
.cat-card:hover { border-color: rgba(0,229,200,0.35); transform: translateY(-4px); }
.cat-card:hover::before { opacity: 1; }
.cat-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 14px;
  display: block;
}
.cat-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.cat-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== 首页 作品卡片 ===== */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.album-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s;
  display: block;
}
.album-card:hover {
  border-color: rgba(168,85,247,0.5);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(168,85,247,0.15);
}
.album-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #1a1e28;
}
.album-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  border-radius: 0;
}
.album-card:hover .album-card-img img { transform: scale(1.06); }
.album-card-img .img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,15,20,0.75) 0%, transparent 50%);
  pointer-events: none;
}
.album-card-body { padding: 16px; }
.album-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.35;
}
.album-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.album-card-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.album-card-model {
  font-weight: 600;
  color: var(--accent-cyan);
}

/* ===== 首页 关于 ===== */
body[data-page="home"] .about-box {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

/* ===== 首页 Footer ===== */
body[data-page="home"] .site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
body[data-page="home"] .footer-inner {
  display: flex;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* =========================================================
   详情页 —— 亮色渐变风格
   ========================================================= */
body[data-page="detail"] {
  background: var(--detail-bg);
  color: var(--detail-text);
}

/* 详情页背景装饰光晕 */
body[data-page="detail"]::before {
  content: "";
  position: fixed;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(168,85,247,0.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
body[data-page="detail"]::after {
  content: "";
  position: fixed;
  bottom: -150px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

body[data-page="detail"] .site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 245, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--detail-line);
}
body[data-page="detail"] .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
body[data-page="detail"] .brand {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body[data-page="detail"] .nav-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}
body[data-page="detail"] .nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--detail-text-muted);
  transition: all 0.2s;
}
body[data-page="detail"] .nav-links a:hover {
  background: rgba(139,92,246,0.1);
  color: var(--detail-accent);
}
body[data-page="detail"] #nav-back-btn {
  background: var(--detail-accent);
  color: #fff;
}
body[data-page="detail"] #nav-back-btn:hover {
  background: var(--detail-accent2);
  color: #fff;
}
body[data-page="detail"] #nav-next-btn {
  background: rgba(139,92,246,0.1);
  color: var(--detail-accent);
  border: 1px solid rgba(139,92,246,0.25);
}
body[data-page="detail"] #nav-next-btn:hover {
  background: var(--detail-accent);
  color: #fff;
}

/* 详情页 Hero区 */
.detail-hero {
  position: relative;
  z-index: 1;
  padding: 64px 0 40px;
}
.detail-hero .breadcrumb {
  font-size: 13px;
  color: var(--detail-text-muted);
  margin-bottom: 16px;
}
.detail-hero .breadcrumb a { color: var(--detail-accent); }
.detail-hero h1 {
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(135deg, #1a1535 30%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.detail-hero .detail-desc {
  font-size: 16px;
  color: var(--detail-text-muted);
  max-width: 640px;
  line-height: 1.7;
}

/* 详情页 Hero 按钮 */
.detail-hero-btns {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-primary {
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  background: var(--detail-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover { background: var(--detail-accent2); transform: translateY(-1px); }
.btn-outline {
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  background: transparent;
  color: var(--detail-accent);
  border: 2px solid rgba(139,92,246,0.35);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline:hover { background: rgba(139,92,246,0.08); }

/* 详情页 Meta 信息条 */
.detail-meta-bar {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 0 36px;
}
.detail-meta-pill {
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--detail-panel);
  border: 1px solid var(--detail-line);
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(139,92,246,0.06);
}
.detail-meta-pill .meta-label {
  font-size: 12px;
  color: var(--detail-text-muted);
  display: block;
}
.detail-meta-pill .meta-val {
  font-weight: 600;
  color: var(--detail-text);
}

/* 详情页 Tag */
.detail-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.detail-tag {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(139,92,246,0.1);
  color: var(--detail-accent);
  border: 1px solid rgba(139,92,246,0.2);
}

/* 详情页 封面大图 */
.detail-cover-section {
  position: relative;
  z-index: 1;
  padding: 0 0 40px;
}
.detail-cover-wrap {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(139,92,246,0.15);
  border: 1px solid var(--detail-line);
}
.detail-cover-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

/* 详情页 图片网格 */
.detail-gallery-section {
  position: relative;
  z-index: 1;
  padding: 40px 0;
}
.detail-section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--detail-text);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--detail-line);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-img-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(139,92,246,0.08);
  aspect-ratio: 3/4;
  border: 1px solid var(--detail-line);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-img-wrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(139,92,246,0.18);
}
.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* 详情页 相关模特 */
.related-section {
  position: relative;
  z-index: 1;
  padding: 40px 0 56px;
  background: rgba(255,255,255,0.6);
  border-top: 1px solid var(--detail-line);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-card {
  background: var(--detail-panel);
  border: 1px solid var(--detail-line);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s;
  display: block;
  box-shadow: 0 2px 12px rgba(139,92,246,0.06);
}
.related-card:hover {
  border-color: rgba(139,92,246,0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(139,92,246,0.15);
}
.related-card-icon {
  width: 100%;
  aspect-ratio: 3/2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(99,102,241,0.12));
  overflow: hidden;
}
.related-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.related-card-body { padding: 14px 16px; }
.related-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--detail-text);
  margin-bottom: 4px;
}
.related-card-model {
  font-size: 13px;
  color: var(--detail-accent);
  font-weight: 500;
}
.related-card-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--detail-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 详情页 翻页导航 */
.detail-pager {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 48px;
  gap: 12px;
  flex-wrap: wrap;
}

/* 详情页 Footer */
body[data-page="detail"] .site-footer {
  border-top: 1px solid var(--detail-line);
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.7);
}
body[data-page="detail"] .footer-inner {
  min-height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--detail-text-muted);
  font-size: 14px;
}

/* ===== 图片灯箱 ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .cat-grid, .album-grid, .gallery-grid, .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  body[data-page="home"] .nav-links,
  body[data-page="detail"] .nav-links { display: none; }
  .cat-grid, .album-grid, .gallery-grid, .related-grid {
    grid-template-columns: 1fr;
  }
  .home-hero { padding: 60px 0 40px; }
  .detail-hero { padding: 40px 0 24px; }
}
