/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

/* ===== CSS 变量 ===== */
:root {
  --c-red: #ff0000;
  --c-pink: #ff006e;
  --c-dark: #1a1a2e;
  --c-darker: #0d0d1a;
  --c-mid: #16213e;
  --c-surface: #1e1e3a;
  --c-text: #e8e8f0;
  --c-text-dim: #9999bb;
  --c-cyan: #00ffff;
  --c-accent: #ff006e;
  --font-main: 'Cormorant Infant', 'Noto Serif SC', serif;
  --font-script: 'Great Vibes', cursive;
  --font-mono: 'Courier New', Courier, monospace;
  --nav-h: 64px;
  --radius: 10px;
  --glow-red: 0 0 8px #ff0000, 0 0 20px rgba(255,0,0,0.4);
  --glow-pink: 0 0 8px #ff006e, 0 0 20px rgba(255,0,110,0.4);
  --glow-cyan: 0 0 8px #00ffff, 0 0 20px rgba(0,255,255,0.3);
  --transition: 0.25s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--c-darker);
  color: var(--c-text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* ===== CRT 扫描线全局叠层 ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-pink); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-red); }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ===== 像素几何纹理背景 ===== */
.site-wrap {
  position: relative;
  min-height: 100vh;
}
.site-wrap::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,0,110,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,0,110,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ===== 站点头部 ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(13,13,26,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,0,110,0.3);
  z-index: 1000;
}
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-pink), transparent);
  animation: scanH 3s linear infinite;
}
@keyframes scanH {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== 品牌 Logo ===== */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--c-text);
  text-decoration: none;
}
.logo-img { width: 36px; height: 36px; object-fit: contain; }
.brand-name {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--c-pink);
  text-shadow: var(--glow-pink);
  line-height: 1;
}

/* ===== 汉堡按钮 ===== */
.nav-toggle {
  background: none;
  border: 1px solid rgba(255,0,110,0.5);
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: 4px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav-toggle:hover {
  border-color: var(--c-pink);
  box-shadow: var(--glow-pink);
}
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-pink);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== 全屏遮罩导航 ===== */
.fullscreen-nav {
  position: fixed;
  inset: 0;
  background: rgba(10,10,20,0.97);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.fullscreen-nav.is-open {
  opacity: 1;
  pointer-events: all;
}
.fullscreen-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255,0,110,0.04) 3px,
    rgba(255,0,110,0.04) 4px
  );
  pointer-events: none;
}
.nav-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid rgba(255,0,110,0.5);
  color: var(--c-pink);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  min-width: 44px;
  border-radius: 4px;
  transition: all var(--transition);
  line-height: 1;
}
.nav-close:hover {
  background: rgba(255,0,110,0.1);
  box-shadow: var(--glow-pink);
}
.fullnav ol {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: center;
}
.fullnav ol li a {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--c-text);
  font-family: var(--font-main);
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.5rem;
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  position: relative;
  transition: color var(--transition), text-shadow var(--transition);
}
.fullnav ol li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--c-pink);
  transition: width var(--transition);
}
.fullnav ol li a:hover {
  color: var(--c-pink);
  text-shadow: var(--glow-pink);
}
.fullnav ol li a:hover::before { width: 80%; }

/* ===== 通用 Banner ===== */
.page-banner, .article-banner, .about-banner, .privacy-banner {
  margin-top: var(--nav-h);
  min-height: 280px;
  background: linear-gradient(135deg, var(--c-darker) 0%, var(--c-mid) 100%);
  border-bottom: 1px solid rgba(255,0,110,0.2);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 3rem 1.5rem;
}
.banner-bg-text {
  position: absolute;
  right: -0.05em;
  bottom: -0.15em;
  font-family: var(--font-mono);
  font-size: clamp(6rem, 18vw, 14rem);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,0,110,0.08);
  line-height: 1;
  user-select: none;
  letter-spacing: -0.05em;
}
.banner-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}
.banner-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--c-pink);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}
.banner-h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.banner-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-text-dim);
}
.article-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.meta-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-text-dim);
}

/* ===== Hero（首页） ===== */
.hero {
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  background: linear-gradient(135deg, var(--c-darker) 0%, var(--c-mid) 60%, #0f0f2a 100%);
  position: relative;
  overflow: hidden;
}
.hero__bg-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: clamp(8rem, 25vw, 22rem);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,0,110,0.06);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  animation: heroTextFloat 8s ease-in-out infinite;
}
@keyframes heroTextFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-20px); }
}
.hero__media {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 3rem 2rem 3rem 3rem;
}
.hero__img {
  max-height: 60vh;
  width: auto;
  border-radius: var(--radius);
  box-shadow: 0 0 40px rgba(255,0,110,0.3), 0 0 80px rgba(255,0,0,0.15);
  animation: heroGlow 4s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% { box-shadow: 0 0 40px rgba(255,0,110,0.3), 0 0 80px rgba(255,0,0,0.15); }
  50% { box-shadow: 0 0 60px rgba(255,0,110,0.5), 0 0 120px rgba(255,0,0,0.25); }
}
.hero__img-placeholder {
  width: 320px;
  height: 320px;
  border: 2px solid rgba(255,0,110,0.3);
  border-radius: var(--radius);
  background: repeating-linear-gradient(
    45deg,
    rgba(255,0,110,0.05) 0px,
    rgba(255,0,110,0.05) 2px,
    transparent 2px,
    transparent 12px
  );
}
.hero__content {
  grid-column: 2;
  position: relative;
  z-index: 1;
  padding: 3rem 3rem 3rem 2rem;
  text-align: center;
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--c-pink);
  margin-bottom: 1rem;
  display: block;
}
.hero__h1 {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--c-text);
  text-shadow: var(--glow-red);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
.hero__desc {
  font-size: 1rem;
  color: var(--c-text-dim);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== 霓虹按钮 ===== */
.btn-neon {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid var(--c-pink);
  color: var(--c-pink);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  min-height: 44px;
  line-height: 1.8;
}
.btn-neon:hover {
  background: rgba(255,0,110,0.1);
  box-shadow: var(--glow-pink);
  color: var(--c-pink);
}

/* ===== 通用 Section ===== */
.home-main, .topic-main, .article-main, .about-main, .privacy-main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.home-section, .topic-section, .article-section, .about-section, .privacy-section {
  margin-bottom: 4rem;
}
.section-header {
  margin-bottom: 2rem;
}
.section-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--c-pink);
  text-shadow: var(--glow-pink);
  margin-bottom: 0.6rem;
}

/* ===== 霓虹分割线 ===== */
.neon-hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--c-pink), transparent);
  margin: 0;
  box-shadow: 0 0 6px rgba(255,0,110,0.4);
}
.neon-hr--sm {
  margin-bottom: 0.75rem;
}

/* ===== 内容区布局（figure + aside 并排） ===== */
.content-section, .article-section, .about-section, .privacy-section {
  display: grid;
  grid-template-areas:
    "header header"
    "figure aside";
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
  gap: 0 2rem;
}
.content-section .section-header,
.about-section .section-header,
.privacy-section .section-header {
  grid-area: header;
}
.content-figure, .article-figure {
  grid-area: figure;
}
.home-aside, .topic-aside, .article-aside, .about-aside, .privacy-aside {
  grid-area: aside;
}
.article-section {
  grid-template-areas: "figure aside";
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto;
  gap: 0 2rem;
}

/* ===== 正文文章 ===== */
.prose-block {
  color: var(--c-text);
  line-height: 1.8;
}
.prose-block h2,
.prose-block h3,
.prose-block h4 {
  color: var(--c-text);
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-main);
}
.prose-block h2 { font-size: 1.4rem; }
.prose-block h3 { font-size: 1.2rem; color: var(--c-pink); }
.prose-block p { margin-bottom: 1rem; }
.prose-block ul, .prose-block ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  list-style: disc;
}
.prose-block ol { list-style: decimal; }
.prose-block li { margin-bottom: 0.4rem; }
.prose-block a { color: var(--c-pink); border-bottom: 1px solid rgba(255,0,110,0.3); }
.prose-block a:hover { color: var(--c-red); border-bottom-color: var(--c-red); }
.prose-block strong { color: var(--c-pink); font-weight: 600; }
.prose-block code {
  font-family: var(--font-mono);
  background: rgba(255,0,110,0.1);
  border: 1px solid rgba(255,0,110,0.2);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  font-size: 0.875em;
}
.prose-block blockquote {
  border-left: 3px solid var(--c-pink);
  padding-left: 1rem;
  color: var(--c-text-dim);
  font-style: italic;
  margin: 1rem 0;
}
.prose-block hr {
  border: none;
  border-top: 1px solid rgba(255,0,110,0.2);
  margin: 1.5rem 0;
}

/* ===== Aside ===== */
.home-aside, .topic-aside, .article-aside, .about-aside, .privacy-aside {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  align-self: start;
}
.aside-block {
  margin-bottom: 1.75rem;
}
.aside-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--c-pink);
  margin-bottom: 0.5rem;
}
.aside-links {
  list-style: none;
}
.aside-links li {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.aside-links li a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--c-text-dim);
  transition: color var(--transition), padding-left var(--transition);
  min-height: 40px;
  line-height: 40px;
}
.aside-links li a:hover {
  color: var(--c-pink);
  padding-left: 0.5rem;
}
.aside-info li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--c-text-dim);
}
.info-label {
  color: var(--c-text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

/* ===== Hero 文章图片 ===== */
.article-hero-wrap {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* ===== 首页分类卡片 ===== */
.topics-section, .articles-section {
  display: block;
}
.topics-section .section-header,
.articles-section .section-header {
  margin-bottom: 1.5rem;
}
.topics-grid-wrap, .articles-table-wrap, .children-table-wrap {
  display: block;
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.topic-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-red), var(--c-pink));
}
.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(255,0,110,0.2);
}
.topic-card__link {
  display: block;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}
.topic-card__num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255,0,110,0.2);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.topic-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.topic-card__desc {
  font-size: 0.825rem;
  color: var(--c-text-dim);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.topic-card__arrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-pink);
  letter-spacing: 0.1em;
}

/* ===== 表格（首页近期文章 + 栏目子页） ===== */
.articles-table, .children-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.articles-table thead th, .children-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--c-pink);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,0,110,0.2);
  background: rgba(255,0,110,0.05);
}
.articles-table tbody tr, .children-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--transition);
}
.articles-table tbody tr:hover, .children-table tbody tr:hover {
  background: rgba(255,0,110,0.05);
}
.articles-table td, .children-table td {
  padding: 0.85rem 1rem;
  color: var(--c-text-dim);
  vertical-align: top;
}
.art-link, .child-title a {
  color: var(--c-text);
  font-weight: 500;
  transition: color var(--transition);
}
.art-link:hover, .child-title a:hover { color: var(--c-pink); }
.child-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,0,110,0.4);
  width: 50px;
}
.child-desc { font-size: 0.825rem; }
.child-date { font-family: var(--font-mono); font-size: 0.75rem; white-space: nowrap; width: 120px; }
time { font-family: var(--font-mono); font-size: 0.8rem; }

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--c-darker);
  border-top: 1px solid rgba(255,0,110,0.15);
  padding: 1rem 1.5rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand { flex-shrink: 0; }
.footer-logo-link {
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--c-pink);
  text-shadow: var(--glow-pink);
  text-decoration: none;
}
.footer-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}
.footer-nav ol li a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--c-text-dim);
  letter-spacing: 0.05em;
  padding: 0.5rem 0.4rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
}
.footer-nav ol li a:hover { color: var(--c-pink); }
.footer-copy small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--c-text-dim);
  white-space: nowrap;
}

/* ===== 霓虹文字动效 ===== */
.glitch {
  position: relative;
  animation: glitchText 6s infinite;
}
@keyframes glitchText {
  0%, 90%, 100% { transform: skew(0deg); filter: none; }
  91% { transform: skew(-1deg); filter: hue-rotate(90deg); }
  92% { transform: skew(1.5deg) translateX(2px); filter: hue-rotate(-90deg); }
  93% { transform: skew(0deg); filter: none; }
}

/* ===== Parallax 辅助 ===== */
.hero__bg-text, .banner-bg-text {
  will-change: transform;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: auto;
    padding: 3rem 0 2rem;
  }
  .hero__media {
    grid-column: 1;
    grid-row: 1;
    padding: 2rem 1.5rem 1rem;
  }
  .hero__content {
    grid-column: 1;
    grid-row: 2;
    padding: 1rem 1.5rem 2rem;
  }
  .content-section, .about-section, .privacy-section {
    grid-template-areas:
      "header"
      "figure"
      "aside";
    grid-template-columns: 1fr;
  }
  .article-section {
    grid-template-areas:
      "figure"
      "aside";
    grid-template-columns: 1fr;
  }
  .home-aside, .topic-aside, .article-aside, .about-aside, .privacy-aside {
    position: static;
  }
  .topics-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .children-table .child-desc { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav ol { justify-content: center; }
}

@media (max-width: 600px) {
  :root { --nav-h: 56px; }
  .hero__h1 { font-size: 2rem; }
  .banner-h1 { font-size: 1.5rem; }
  .topics-grid { grid-template-columns: 1fr; }
  .children-table .child-date { display: none; }
  .home-main, .topic-main, .article-main, .about-main, .privacy-main {
    padding: 2rem 1rem 3rem;
  }
  .page-banner, .article-banner, .about-banner, .privacy-banner {
    min-height: 200px;
    padding: 2rem 1rem;
  }
  .articles-table td:last-child { display: none; }
  .articles-table thead th:last-child { display: none; }
  .footer-nav ol { flex-direction: column; align-items: center; }
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
