@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ===== CSS 变量 ===== */
:root {
  --ice: #c8e0f4;
  --pink: #f5e0e8;
  --dark: #171f26;
  --ice-lt: #dff0ff;
  --ice-dk: #a4c5e0;
  --pink-lt: #fdf0f4;
  --pink-dk: #d4b0c0;
  --dark-lt: #253444;
  --dark-lter: #334455;
  --text: #1a2535;
  --text-muted: #5a7080;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-out: -4px -4px 12px rgba(255,255,255,0.75), 5px 5px 14px rgba(0,0,0,0.13);
  --shadow-in:  inset 3px 3px 8px rgba(0,0,0,0.12), inset -3px -3px 8px rgba(255,255,255,0.7);
  --shadow-card: -3px -3px 8px rgba(255,255,255,0.8), 4px 4px 10px rgba(0,0,0,0.1);
  --bottom-nav-h: 60px;
  --font-body: 'Source Sans 3', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'Bebas Neue', 'Arial Black', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--ice);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-h) + 16px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--dark); text-decoration: none; }
a:hover { color: var(--dark-lt); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); }

/* ===== 辅助 ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.bebas { font-family: var(--font-display); letter-spacing: 0.04em; }

/* ===== 全屏遮罩菜单 ===== */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}
.nav-overlay[open] {
  pointer-events: all;
  visibility: visible;
}
.nav-overlay[open]::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(23, 31, 38, 0.92);
  backdrop-filter: blur(4px);
}
.nav-overlay-close {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 201;
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--ice-lt);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--dark-lt);
  border: 1px solid var(--ice-dk);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  min-height: 44px;
  list-style: none;
}
.nav-overlay[open] .nav-overlay-close {
  display: flex;
}
.nav-overlay-close::-webkit-details-marker { display: none; }
.nav-overlay-close::marker { display: none; }

.overlay-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 201;
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 40px 48px;
  background: var(--dark);
  border: 1px solid var(--dark-lter);
  border-radius: var(--radius-lg);
  min-width: 280px;
  box-shadow: var(--shadow-out);
}
.nav-overlay[open] .overlay-menu {
  display: flex;
}
.overlay-menu li a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--ice-lt);
  padding: 8px 0;
  border-bottom: 1px solid var(--dark-lter);
  transition: color 150ms, padding-left 150ms;
  min-height: 44px;
  line-height: 44px;
}
.overlay-menu li a:hover {
  color: var(--pink);
  padding-left: 10px;
}

/* ===== 底部固定导航条 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  z-index: 100;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-top: 1px solid var(--dark-lter);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.bottom-nav-left,
.bottom-nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bottom-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ice-lt);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0 10px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  transition: background 150ms, color 150ms;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.bottom-nav-item:hover,
.bottom-nav-item[aria-current="page"] {
  background: var(--dark-lter);
  color: var(--pink);
}
.brand-center {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--pink);
  padding: 0 14px;
  min-height: 44px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.logo-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--pink);
  letter-spacing: 0.05em;
}
.logo-mark { width: 32px; height: 32px; border-radius: 6px; }

.bottom-search {
  background: var(--dark-lt);
  border: 1px solid var(--dark-lter);
  border-radius: var(--radius-sm);
  color: var(--ice-lt);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 8px 12px;
  width: 120px;
  height: 36px;
  outline: none;
  transition: border-color 150ms, width 200ms;
}
.bottom-search:focus {
  border-color: var(--ice-dk);
  width: 160px;
}
.bottom-search::placeholder { color: var(--text-muted); }

.menu-toggle {
  background: var(--dark-lt);
  border: 1px solid var(--dark-lter);
  border-radius: var(--radius-sm);
  color: var(--ice-lt);
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms;
}
.menu-toggle:hover { background: var(--dark-lter); color: var(--pink); }
.menu-toggle:active { transform: scale(0.95); }

/* ===== 站点容器 ===== */
.site-wrap { min-height: 100vh; }

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--dark);
}
.hero-dot-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--ice-dk) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.18;
  z-index: 1;
}
.hero-figure {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 48px 32px 40px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}
.hero-h1 {
  font-size: clamp(2.2rem, 7vw, 5.5rem);
  color: var(--pink-lt);
  line-height: 1.05;
  text-shadow: 0 3px 18px rgba(0,0,0,0.6);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.hero-sub {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--ice-lt);
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

/* ===== 页面头部（非首页） ===== */
.page-header {
  position: relative;
  background: var(--dark);
  overflow: hidden;
  padding: 32px 0 28px;
}
.page-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.page-header-dot {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--ice-dk) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.1;
  z-index: 0;
}
.breadcrumb {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--ice-dk); }
.breadcrumb a:hover { color: var(--ice-lt); }
.page-h1 {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  color: var(--pink-lt);
  line-height: 1.1;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.page-desc {
  font-size: 0.95rem;
  color: var(--ice-lt);
  opacity: 0.85;
}
.page-meta {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.entry-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.pub-date, .mod-date {
  font-size: 0.82rem;
  color: var(--ice-dk);
  background: var(--dark-lt);
  border-radius: 6px;
  padding: 3px 10px;
}

/* ===== 主内容区 ===== */
.main-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 24px;
}

/* ===== 内容区：aside 左栏 + figure 右侧 ===== */
.content-section {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 40px;
}
.content-aside {
  flex: 0 0 220px;
  background: linear-gradient(145deg, var(--ice-lt), var(--ice));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-out);
  padding: 22px 18px;
  position: sticky;
  top: 24px;
  min-width: 0;
}
.content-figure {
  flex: 1 1 0;
  min-width: 0;
}
.aside-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--dark);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ice-dk);
}
.aside-subtitle {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--dark);
  letter-spacing: 0.05em;
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ice-dk);
}
.aside-title span,
.aside-subtitle span {
  display: inline;
}
.aside-nav-list li {
  margin-bottom: 4px;
}
.aside-nav-list a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  background: linear-gradient(145deg, var(--ice-lt), var(--ice));
  box-shadow: var(--shadow-card);
  transition: box-shadow 150ms, transform 150ms;
  min-height: 40px;
  line-height: 1.4;
  display: flex;
  align-items: center;
}
.aside-nav-list a:hover,
.aside-nav-list a[aria-current="page"] {
  box-shadow: var(--shadow-in);
  transform: scale(0.98);
  color: var(--dark);
}
.tag-list a {
  background: linear-gradient(145deg, var(--pink-lt), var(--pink));
}

/* ===== 正文 ===== */
.page-content {
  background: linear-gradient(145deg, #ffffff, var(--ice-lt));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-out);
  padding: 28px 28px 24px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}
.page-content h2 { font-size: 1.25rem; font-weight: 700; margin: 1.5em 0 0.6em; color: var(--dark); }
.page-content h3 { font-size: 1.1rem; font-weight: 600; margin: 1.2em 0 0.5em; }
.page-content p { margin-bottom: 1em; }
.page-content ul, .page-content ol { padding-left: 1.5em; margin-bottom: 1em; list-style: disc; }
.page-content a { color: var(--dark-lt); text-decoration: underline; }
.page-content a:hover { color: var(--dark); }
.page-content img { border-radius: var(--radius-sm); margin: 1em 0; }

/* ===== 分区标题 ===== */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--dark);
  letter-spacing: 0.06em;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--ice-dk);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title span { display: inline; }
.section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 1.2em;
  background: var(--pink-dk);
  border-radius: 3px;
  flex-shrink: 0;
}

/* ===== 栏目卡片网格（首页） ===== */
.cat-section {
  margin-bottom: 48px;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(145deg, var(--ice-lt), var(--ice));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
  border: 1px solid rgba(164, 197, 224, 0.4);
  transition: box-shadow 150ms, transform 150ms;
  overflow: hidden;
}
.cat-card:hover {
  box-shadow: -5px -5px 15px rgba(255,255,255,0.8), 6px 6px 16px rgba(0,0,0,0.14);
  transform: translateY(-2px);
}
.cat-card:active {
  box-shadow: var(--shadow-in);
  transform: scale(0.97);
}
.cat-card > strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--dark);
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.cat-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.card-fig {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  line-height: 0;
}
.card-fig img,
.card-img { border-radius: var(--radius-sm); width: 100%; height: auto; }

/* ===== 条目卡片网格 ===== */
.entry-section {
  margin-bottom: 48px;
}
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.entry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(145deg, var(--pink-lt), var(--pink));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px 14px;
  border: 1px solid rgba(212, 176, 192, 0.4);
  transition: box-shadow 150ms, transform 150ms;
  overflow: hidden;
}
.entry-card:hover {
  box-shadow: -5px -5px 15px rgba(255,255,255,0.8), 6px 6px 16px rgba(0,0,0,0.14);
  transform: translateY(-2px);
}
.entry-card:active {
  box-shadow: var(--shadow-in);
  transform: scale(0.97);
}
.entry-card > strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--dark);
  letter-spacing: 0.03em;
  line-height: 1.25;
}
.entry-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.card-date {
  font-size: 0.78rem;
  color: var(--pink-dk);
  font-weight: 500;
}
.entry-thumb { border-radius: 8px; width: 100%; height: auto; }

/* ===== 条目页 Hero ===== */
.entry-hero {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-out);
  line-height: 0;
}
.entry-hero-img { width: 100%; height: auto; border-radius: var(--radius-md); }

/* ===== 相关内容 ===== */
.related-section {
  margin-bottom: 40px;
}
.rel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.rel-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(145deg, var(--ice-lt), var(--ice));
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 12px 12px;
  border: 1px solid rgba(164, 197, 224, 0.35);
  transition: box-shadow 150ms, transform 150ms;
  overflow: hidden;
}
.rel-card:hover {
  box-shadow: -4px -4px 12px rgba(255,255,255,0.8), 5px 5px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.rel-card:active {
  box-shadow: var(--shadow-in);
  transform: scale(0.97);
}
.rel-card > strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
}
.rel-thumb { border-radius: 6px; width: 100%; height: auto; }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--dark);
  color: var(--ice-lt);
  margin-top: 40px;
}
.footer-cta {
  padding: 48px 32px;
  text-align: center;
  border-bottom: 1px solid var(--dark-lter);
  background: linear-gradient(180deg, var(--dark-lt) 0%, var(--dark) 100%);
}
.footer-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 3rem);
  color: var(--pink-lt);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-cta-title span { display: inline; }
.footer-cta-desc {
  font-size: 0.95rem;
  color: var(--ice-dk);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--pink), var(--pink-dk));
  color: var(--dark);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  border-radius: var(--radius-md);
  padding: 14px 36px;
  min-height: 48px;
  box-shadow: var(--shadow-out);
  transition: box-shadow 150ms, transform 150ms;
  font-weight: 700;
}
.btn-cta:hover {
  box-shadow: -6px -6px 16px rgba(255,255,255,0.7), 7px 7px 18px rgba(0,0,0,0.18);
  transform: translateY(-2px);
  color: var(--dark);
}
.btn-cta:active {
  box-shadow: var(--shadow-in);
  transform: scale(0.97);
}
.footer-meta {
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-copy {
  font-size: 0.83rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 0.83rem;
  color: var(--ice-dk);
  transition: color 150ms;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.footer-links a:hover { color: var(--pink); }
.footer-links a[aria-current="page"] { color: var(--pink); }

/* ===== 空提示 ===== */
.empty-tip {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 24px;
  text-align: center;
}

/* ===== 移动端响应 ===== */
@media (max-width: 768px) {
  .content-section {
    flex-direction: column;
    gap: 20px;
  }
  .content-aside {
    flex: none;
    width: 100%;
    position: static;
  }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .entry-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .rel-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .main-content { padding: 20px 14px 16px; }
  .hero-content { padding: 32px 18px 28px; }
  .page-header-inner { padding: 0 16px; }
  .bottom-nav-item { font-size: 0.72rem; padding: 0 7px; }
  .bottom-search { width: 90px; }
  .bottom-search:focus { width: 120px; }
  .footer-cta { padding: 36px 18px; }
  .footer-meta { padding: 16px 18px; flex-direction: column; gap: 10px; }
  .page-content { padding: 18px 16px; }
  .overlay-menu { min-width: 240px; padding: 30px 30px; }
  .overlay-menu li a { font-size: 1.3rem; }
}

@media (max-width: 375px) {
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .entry-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .rel-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bottom-search { width: 70px; }
  .bottom-search:focus { width: 100px; }
  .hero-h1 { font-size: 2rem; }
  .page-h1 { font-size: 1.6rem; }
  .brand-center { font-size: 0.85rem; }
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
