@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* ── 基础重置与根变量 ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-pink: #ff0080;
  --c-magenta: #ff00ff;
  --c-dark: #26171f;
  --c-dark2: #1a0e16;
  --c-dark3: #320d22;
  --c-text: #f5e6f0;
  --c-text-muted: #c8a8bc;
  --c-border: rgba(255, 0, 128, 0.3);
  --c-card-bg: rgba(38, 23, 31, 0.82);
  --c-card-hover: rgba(60, 20, 45, 0.95);
  --font-pixel: 'Press Start 2P', monospace;
  --font-vt: 'VT323', monospace;
  --font-sys: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 56px;
  --radius: 18px;
  --shadow: 0 4px 32px rgba(255, 0, 128, 0.18), 0 2px 8px rgba(255, 0, 255, 0.10);
  --shadow-hover: 0 8px 48px rgba(255, 0, 128, 0.36), 0 4px 16px rgba(255, 0, 255, 0.22);
  --max-w: 1200px;
  --content-w: 780px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--c-dark2);
  color: var(--c-text);
  font-family: var(--font-sys);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + 16px);
}

/* ── Aurora 背景 ── */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: screen;
  animation: aurora-float 12s ease-in-out infinite alternate;
}

.aurora-layer.a1 {
  width: 70vw;
  height: 60vh;
  background: radial-gradient(ellipse at center, rgba(255,0,128,0.35) 0%, transparent 70%);
  top: -20%;
  left: -10%;
  animation-delay: 0s;
  animation-duration: 14s;
}

.aurora-layer.a2 {
  width: 60vw;
  height: 55vh;
  background: radial-gradient(ellipse at center, rgba(255,0,255,0.28) 0%, transparent 70%);
  top: 20%;
  right: -15%;
  animation-delay: -5s;
  animation-duration: 18s;
}

.aurora-layer.a3 {
  width: 50vw;
  height: 50vh;
  background: radial-gradient(ellipse at center, rgba(128,0,255,0.22) 0%, transparent 70%);
  bottom: 10%;
  left: 20%;
  animation-delay: -9s;
  animation-duration: 22s;
}

@keyframes aurora-float {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.7; }
  33% { transform: translate(4vw, -3vh) scale(1.08) rotate(4deg); opacity: 0.9; }
  66% { transform: translate(-3vw, 4vh) scale(0.95) rotate(-3deg); opacity: 0.75; }
  100% { transform: translate(2vw, 2vh) scale(1.05) rotate(2deg); opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-layer { animation: none; }
}

/* ── 布局基础 ── */
header,
main,
footer {
  position: relative;
  z-index: 1;
}

main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px 40px;
}

main > div {
  min-width: 0;
}

/* ── 导航（底部固定条） ── */
.site-header {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(135deg, rgba(38,23,31,0.97) 0%, rgba(50,13,34,0.97) 50%, rgba(38,23,31,0.97) 100%);
  border-top: 1px solid var(--c-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -4px 32px rgba(255,0,128,0.2);
  display: flex;
  align-items: center;
  min-height: var(--nav-h);
  gap: 0;
}

.nav-bar {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-bar::-webkit-scrollbar {
  display: none;
}

.nav-bar p {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  white-space: nowrap;
}

.nav-bar p a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  min-height: 40px;
  color: var(--c-text-muted);
  text-decoration: none;
  font-family: var(--font-vt);
  font-size: 18px;
  letter-spacing: 0.02em;
  border-right: 1px solid rgba(255,0,128,0.12);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-bar p a:hover,
.nav-bar p a[aria-current="page"] {
  color: var(--c-pink);
  background: rgba(255,0,128,0.08);
  text-shadow: 0 0 12px var(--c-pink);
}

.nav-search {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--c-border);
  flex-shrink: 0;
}

.nav-search form {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-search input[type="search"] {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  color: var(--c-text);
  font-family: var(--font-vt);
  font-size: 16px;
  padding: 6px 12px;
  width: 160px;
  outline: none;
  transition: border-color 0.2s, width 0.3s;
}

.nav-search input[type="search"]:focus {
  border-color: var(--c-pink);
  box-shadow: 0 0 8px rgba(255,0,128,0.3);
  width: 200px;
}

.nav-search button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  min-height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Hero（首页）── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
  min-height: 45vh;
  padding: 40px 32px;
  background: linear-gradient(135deg, rgba(38,23,31,0.6) 0%, rgba(60,13,40,0.5) 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,0,128,0.15) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,0,255,0.1) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px;
  background-position: 0 0, 16px 16px;
  pointer-events: none;
}

.hero-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.hero-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, rgba(255,0,128,0.15), rgba(255,0,255,0.1));
  border: 2px solid var(--c-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pixel-glyph {
  font-family: var(--font-pixel);
  font-size: 48px;
  color: var(--c-pink);
  text-shadow: 0 0 24px var(--c-pink), 0 0 48px var(--c-magenta);
  animation: pixel-pulse 2s ease-in-out infinite alternate;
}

@keyframes pixel-pulse {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-glyph { animation: none; }
}

.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,0,128,0.2) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  border-radius: 12px;
}

.hero-logo-img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.hero-text {
  text-align: right;
  padding-right: 8px;
}

.hero-eyebrow {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--c-magenta);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  text-shadow: 0 0 12px var(--c-magenta);
}

.hero-text h1 {
  font-family: var(--font-pixel);
  font-size: clamp(13px, 2vw, 18px);
  line-height: 1.6;
  color: #fff;
  text-shadow: 0 0 20px var(--c-pink), 0 0 40px var(--c-magenta);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.hero-desc {
  font-family: var(--font-vt);
  font-size: 20px;
  color: var(--c-text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── 按钮 ── */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--c-pink), var(--c-magenta));
  color: #fff;
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 12px 24px;
  border-radius: 8px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 20px rgba(255,0,128,0.4);
  transition: box-shadow 0.2s, transform 0.2s;
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(255,0,128,0.6);
  transform: translateY(-2px);
}

/* ── 标题装饰 ── */
h2 {
  font-family: var(--font-pixel);
  font-size: clamp(11px, 1.8vw, 15px);
  color: var(--c-pink);
  letter-spacing: 0.06em;
  line-height: 1.5;
  margin-bottom: 8px;
  text-shadow: 0 0 16px rgba(255,0,128,0.4);
}

h2 + hr,
h3 + hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin-bottom: 24px;
  position: relative;
  overflow: visible;
}

h2 + hr::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-pink), var(--c-magenta));
  border-radius: 2px;
}

h3 {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--c-magenta);
  letter-spacing: 0.06em;
  line-height: 1.6;
  margin-bottom: 6px;
}

h1 {
  font-family: var(--font-pixel);
  font-size: clamp(13px, 2.5vw, 20px);
  line-height: 1.6;
  color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(255,0,128,0.5);
  margin-bottom: 16px;
}

/* ── 章节间距 ── */
section {
  margin-bottom: 48px;
}

/* ── 频道卡片块（child-block）── */
.channel-blocks,
.child-blocks-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

a.child-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--c-text);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s, background 0.25s;
}

a.child-block:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--c-pink);
  background: var(--c-card-hover);
}

a.child-block strong {
  font-family: var(--font-vt);
  font-size: 20px;
  color: var(--c-pink);
  display: block;
  line-height: 1.3;
}

a.child-block span {
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

a.child-block time {
  font-family: var(--font-vt);
  font-size: 14px;
  color: rgba(200,168,188,0.6);
}

/* ── 卡片网格 ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-cat {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--c-magenta);
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.card-desc {
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.6;
  flex: 1;
}

.card-date {
  font-family: var(--font-vt);
  font-size: 15px;
  color: rgba(200,168,188,0.6);
}

.card-link {
  display: inline-block;
  color: var(--c-pink);
  text-decoration: none;
  font-family: var(--font-vt);
  font-size: 17px;
  transition: text-shadow 0.2s;
  margin-top: 4px;
}

.card-link:hover {
  text-shadow: 0 0 12px var(--c-pink);
}

/* ── Stagger 动效 ── */
.stagger-item {
  animation: stagger-in 0.5s ease both;
}

.stagger-item:nth-child(2) { animation-delay: 0.08s; }
.stagger-item:nth-child(3) { animation-delay: 0.16s; }
.stagger-item:nth-child(4) { animation-delay: 0.24s; }
.stagger-item:nth-child(5) { animation-delay: 0.32s; }
.stagger-item:nth-child(6) { animation-delay: 0.40s; }

@keyframes stagger-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .stagger-item { animation: none; }
}

/* ── 侧边栏 ── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
  position: sticky;
  top: 24px;
}

.sidebar-widget {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.sidebar-widget h3 {
  margin-bottom: 6px;
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.sidebar-links li a {
  display: block;
  color: var(--c-text-muted);
  text-decoration: none;
  font-family: var(--font-vt);
  font-size: 17px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,0,128,0.08);
  transition: color 0.2s;
  line-height: 1.4;
}

.sidebar-links li a:hover {
  color: var(--c-pink);
}

/* ── 正文内容 ── */
.content-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text);
  max-width: var(--content-w);
}

.content-body p {
  margin-bottom: 1.2em;
}

.content-body h2,
.content-body h3,
.content-body h4 {
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

.content-body a {
  color: var(--c-pink);
  text-decoration: underline;
  text-decoration-color: rgba(255,0,128,0.4);
  transition: text-decoration-color 0.2s;
}

.content-body a:hover {
  text-decoration-color: var(--c-pink);
}

.content-body ul,
.content-body ol {
  padding-left: 1.6em;
  margin-bottom: 1.2em;
}

.content-body li {
  margin-bottom: 0.5em;
}

.content-body blockquote {
  border-left: 3px solid var(--c-pink);
  padding-left: 1.2em;
  margin: 1.5em 0;
  color: var(--c-text-muted);
  font-style: italic;
}

.article-content {
  max-width: 100%;
}

/* ── 文章页专用 ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-vt);
  font-size: 16px;
  color: var(--c-text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--c-pink);
}

.article-hero {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
}

.article-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.meta-date {
  font-family: var(--font-vt);
  font-size: 16px;
  color: var(--c-text-muted);
}

.meta-cat {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--c-magenta);
  text-decoration: none;
  background: rgba(255,0,255,0.1);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,0,255,0.2);
  letter-spacing: 0.08em;
  transition: background 0.2s;
}

.meta-cat:hover {
  background: rgba(255,0,255,0.2);
}

.article-lead {
  font-family: var(--font-vt);
  font-size: 20px;
  color: var(--c-text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* ── 频道页 Hero ── */
.channel-hero {
  background: linear-gradient(135deg, rgba(38,23,31,0.8) 0%, rgba(80,0,50,0.5) 50%, rgba(38,23,31,0.8) 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 40px 40px 48px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.channel-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255,0,128,0.03) 3px,
    rgba(255,0,128,0.03) 4px
  );
  pointer-events: none;
}

.channel-hero-inner {
  position: relative;
  z-index: 1;
}

.channel-hero h1 {
  font-size: clamp(14px, 2.5vw, 22px);
}

.channel-desc {
  font-family: var(--font-vt);
  font-size: 20px;
  color: var(--c-text-muted);
  margin-top: 12px;
  line-height: 1.5;
  max-width: 600px;
}

/* ── eyebrow tag ── */
.eyebrow-tag {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--c-magenta);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  text-shadow: 0 0 10px var(--c-magenta);
}

/* ── About 页 ── */
.about-header-section {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 40px;
}

.about-lead {
  font-family: var(--font-vt);
  font-size: 20px;
  color: var(--c-text-muted);
  max-width: 600px;
  line-height: 1.5;
  margin-top: 12px;
}

/* ── Privacy 页 ── */
.privacy-header-section {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 40px;
}

.privacy-updated {
  font-family: var(--font-vt);
  font-size: 17px;
  color: var(--c-text-muted);
  margin-top: 12px;
}

.privacy-lead {
  font-family: var(--font-vt);
  font-size: 20px;
  color: var(--c-text-muted);
  max-width: 600px;
  line-height: 1.5;
  margin-top: 8px;
}

.privacy-content h2,
.privacy-content h3 {
  margin-top: 2em;
}

/* ── 页脚 ── */
footer {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 0;
  max-width: var(--max-w);
  margin: 40px auto 80px;
  padding: 0 20px;
  border-top: 1px solid var(--c-border);
  padding-top: 40px;
}

footer > section {
  padding: 24px 32px;
}

footer > section + section {
  border-left: 1px solid var(--c-border);
}

.footer-logo-text {
  font-family: var(--font-pixel);
  font-size: clamp(14px, 3vw, 28px);
  color: var(--c-pink);
  text-shadow: 0 0 24px var(--c-pink), 0 0 48px var(--c-magenta);
  line-height: 1.4;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.footer-slogan {
  font-family: var(--font-vt);
  font-size: 17px;
  color: var(--c-text-muted);
  line-height: 1.5;
  max-width: 320px;
}

footer h4 {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--c-magenta);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  text-shadow: 0 0 10px var(--c-magenta);
}

footer > section.footer-nav a,
footer > section.footer-info a {
  display: block;
  color: var(--c-text-muted);
  text-decoration: none;
  font-family: var(--font-vt);
  font-size: 17px;
  padding: 4px 0;
  transition: color 0.2s;
  line-height: 1.5;
}

footer > section.footer-nav a:hover,
footer > section.footer-info a:hover {
  color: var(--c-pink);
}

.footer-copy {
  font-size: 13px;
  color: rgba(200,168,188,0.5);
  margin-top: 16px;
  line-height: 1.5;
}

/* ── 响应式断点 ── */
@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
    padding: 16px 16px 32px;
  }

  .sidebar {
    position: static;
  }

  footer {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 72px;
  }

  footer > .footer-brand {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--c-border);
    border-left: none !important;
  }
}

@media (max-width: 600px) {
  :root {
    --nav-h: 52px;
  }

  body {
    padding-bottom: calc(var(--nav-h) + 12px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px 20px;
  }

  .hero-media {
    display: none;
  }

  .hero-text {
    text-align: left;
    padding-right: 0;
  }

  .hero-text h1 {
    font-size: 12px;
  }

  .hero-eyebrow {
    font-size: 8px;
  }

  .hero-desc {
    font-size: 17px;
  }

  .channel-blocks,
  .child-blocks-wrap {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  footer {
    grid-template-columns: 1fr;
    margin-bottom: 64px;
    padding-top: 24px;
  }

  footer > section {
    padding: 20px 16px;
    border-left: none !important;
    border-top: 1px solid var(--c-border);
  }

  footer > .footer-brand {
    border-top: none;
  }

  .footer-logo-text {
    font-size: 16px;
  }

  .nav-bar p a {
    font-size: 15px;
    padding: 8px 10px;
  }

  .nav-search input[type="search"] {
    width: 100px;
  }

  h1 {
    font-size: 12px;
  }

  h2 {
    font-size: 10px;
  }

  .channel-hero {
    padding: 24px 20px 28px;
  }

  .channel-hero h1 {
    font-size: 13px;
  }
}

@media (max-width: 375px) {
  .nav-search {
    display: none;
  }

  .nav-bar p {
    justify-content: flex-start;
  }
}

/* ── 全局链接与焦点 ── */
a:focus-visible {
  outline: 2px solid var(--c-pink);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── 滚动条美化 ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--c-dark2);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--c-pink), var(--c-magenta));
  border-radius: 3px;
}

/* ── 文字选中 ── */
::selection {
  background: rgba(255,0,128,0.35);
  color: #fff;
}
