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

/* ===== 基础变量 ===== */
:root {
  --mint: #5cc6b0;
  --sand: #d4c4a8;
  --ink: #172623;
  --mint-dark: #3da890;
  --mint-light: #8ed9c8;
  --sand-dark: #b8a88a;
  --sand-light: #e8ddd0;
  --ink-light: #2a3f3b;
  --ink-lighter: #3d5a54;
  --white: #faf8f4;
  --radius: 0;
  --bar-h: 60px;
  --font-pixel: 'Press Start 2P', monospace;
  --font-vt: 'VT323', monospace;
  --font-body: 'VT323', 'Courier New', monospace;
  --shadow-soft: 4px 4px 0 rgba(23,38,35,0.15);
  --shadow-strong: 6px 6px 0 rgba(23,38,35,0.25);
  --grain-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)' opacity='0.06'/%3E%3C/svg%3E");
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; line-height: 1.6; scroll-behavior: smooth; }
body {
  background-color: var(--ink);
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  padding-bottom: calc(var(--bar-h) + 8px);
  overflow-x: hidden;
  position: relative;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--mint-light); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== 像素点阵底纹 ===== */
.pixel-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(92,198,176,0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  background-attachment: fixed;
}
.pixel-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--grain-url);
  background-repeat: repeat;
  opacity: 0.4;
}

/* ===== 主体布局 ===== */
main {
  position: relative;
  z-index: 1;
  min-height: 60vh;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 内容+侧边栏布局 ===== */
.content-sidebar-wrap {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-top: 32px;
  margin-bottom: 48px;
}
.content-sidebar-wrap > section {
  flex: 1 1 0;
  min-width: 0;
}
aside.sidebar {
  flex: 0 0 260px;
  width: 260px;
  position: sticky;
  top: 20px;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--sand-dark);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.breadcrumb a { color: var(--mint); }
.breadcrumb a:hover { color: var(--mint-light); }
.breadcrumb .sep { color: var(--sand-dark); }

/* ===== 像素标签 ===== */
.pixel-tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--ink);
  background: var(--mint);
  padding: 4px 8px;
  letter-spacing: 0.05em;
  box-shadow: 2px 2px 0 var(--mint-dark);
}

/* ===== 标题系统 ===== */
h1 {
  font-family: var(--font-pixel);
  font-size: clamp(0.85rem, 2.5vw, 1.4rem);
  line-height: 1.4;
  color: var(--white);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
  margin-top: 12px;
  text-shadow: 3px 3px 0 var(--ink-light);
}
h2 {
  font-family: var(--font-pixel);
  font-size: clamp(0.65rem, 1.8vw, 0.9rem);
  line-height: 1.5;
  color: var(--mint);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  margin-top: 32px;
  text-shadow: 2px 2px 0 var(--ink-light);
}
h2 > span {
  display: inline-block;
  border-bottom: 3px solid var(--mint);
  padding-bottom: 4px;
}
h3 {
  font-family: var(--font-pixel);
  font-size: clamp(0.55rem, 1.5vw, 0.75rem);
  color: var(--sand);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  margin-top: 24px;
}
h3 > span {
  display: inline-block;
  border-left: 3px solid var(--mint);
  padding-left: 8px;
}
h4 {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--mint-light);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
h4 > span {
  display: inline-block;
}

/* ===== 页面元信息 ===== */
.page-meta {
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--sand-dark);
  margin-bottom: 12px;
}
.article-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.pub-date, .mod-date {
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--sand-dark);
}

/* ===== 正文内容 ===== */
.prose-content {
  font-family: var(--font-vt);
  font-size: 1.25rem;
  line-height: 1.75;
  color: var(--sand-light);
}
.prose-content p { margin-bottom: 1em; }
.prose-content h2 { font-size: 0.75rem; }
.prose-content h3 { font-size: 0.6rem; }
.prose-content ul, .prose-content ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
  list-style: initial;
}
.prose-content ol { list-style: decimal; }
.prose-content li { margin-bottom: 0.4em; }
.prose-content a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.prose-content a:hover { color: var(--mint-light); }
.prose-content strong { color: var(--white); }
.prose-content blockquote {
  border-left: 4px solid var(--mint);
  padding-left: 16px;
  color: var(--sand-dark);
  margin: 1.5em 0;
}
.prose-content code {
  font-family: 'Courier New', monospace;
  background: var(--ink-light);
  padding: 2px 6px;
  font-size: 0.9em;
  color: var(--mint-light);
}
.article-footer-meta {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px dashed var(--ink-lighter);
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--sand-dark);
}

/* ===== 英雄区（首页） ===== */
.hero-section {
  padding: 60px 0 40px;
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
}
.hero-article {
  display: flex;
  gap: 40px;
  align-items: center;
  width: 100%;
}
.hero-content {
  flex: 1 1 0;
  min-width: 0;
}
.hero-eyebrow { margin-bottom: 16px; }
.hero-desc {
  font-family: var(--font-vt);
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--sand);
  margin-bottom: 28px;
  max-width: 560px;
}
.hero-media {
  flex: 0 0 220px;
  width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-icon {
  font-size: 5rem;
  text-shadow: 4px 4px 0 var(--ink-light);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-img { border-radius: 0; box-shadow: var(--shadow-strong); }

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--ink);
  background: var(--mint);
  padding: 14px 24px;
  letter-spacing: 0.05em;
  box-shadow: 4px 4px 0 var(--mint-dark);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  min-height: 44px;
  line-height: 1.4;
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--mint-dark);
  color: var(--ink);
}
.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--mint-dark);
}

/* ===== 频道卡片 ===== */
.channels-section { margin-top: 48px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.card {
  background: var(--ink-light);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.card a {
  display: block;
  color: var(--sand);
  height: 100%;
}
.card-inner {
  padding: 20px;
  border-left: 4px solid var(--mint);
}
.card-inner h3 {
  font-size: 0.55rem;
  color: var(--mint-light);
  margin-top: 0;
  margin-bottom: 10px;
}
.card-inner h3 > span { border-left: none; padding-left: 0; }
.card-inner p {
  font-family: var(--font-vt);
  font-size: 1.1rem;
  color: var(--sand);
  margin-bottom: 12px;
  line-height: 1.5;
}
.card-arrow {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--mint);
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-strong);
}

/* ===== 文章列表（ol > li > a + small） ===== */
.article-list, .tag-page-list {
  margin-top: 16px;
}
.article-list li, .tag-page-list li {
  border-bottom: 1px dashed var(--ink-lighter);
}
.article-list li a, .tag-page-list li a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 4px;
  color: var(--sand);
  transition: color 0.15s ease-out, padding-left 0.15s ease-out;
}
.article-list li a:hover, .tag-page-list li a:hover {
  color: var(--mint-light);
  padding-left: 8px;
}
.article-list .item-title, .tag-page-list .item-title {
  font-family: var(--font-vt);
  font-size: 1.2rem;
  flex: 1;
}
.article-list small, .tag-page-list small {
  font-family: var(--font-vt);
  font-size: 0.95rem;
  color: var(--sand-dark);
  white-space: nowrap;
}

/* ===== 频道页子列表 ===== */
.children-list { margin-top: 12px; }
.channel-child {
  background: var(--ink-light);
  margin-bottom: 12px;
  border-left: 4px solid var(--mint);
  transition: transform 0.2s ease-out;
}
.channel-child a {
  display: block;
  padding: 16px 20px;
  color: var(--sand);
}
.channel-child a:hover { color: var(--mint-light); }
.channel-child .child-meta {
  margin-bottom: 6px;
}
.channel-child small {
  font-family: var(--font-vt);
  font-size: 0.95rem;
  color: var(--sand-dark);
}
.channel-child strong {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--mint-light);
  margin-bottom: 8px;
  line-height: 1.5;
}
.channel-child p {
  font-family: var(--font-vt);
  font-size: 1.05rem;
  color: var(--sand);
  margin: 0;
}
.channel-child:hover { transform: translateX(4px); }

/* ===== 相关文章 ===== */
.related-articles { margin-top: 40px; }
.related-list { margin-top: 12px; }
.related-list li {
  border-bottom: 1px dashed var(--ink-lighter);
}
.related-list li a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 4px;
  color: var(--sand);
  transition: color 0.15s ease-out, padding-left 0.15s ease-out;
}
.related-list li a:hover {
  color: var(--mint-light);
  padding-left: 8px;
}
.related-list li a > span {
  font-family: var(--font-vt);
  font-size: 1.15rem;
  flex: 1;
}
.related-list small {
  font-family: var(--font-vt);
  font-size: 0.95rem;
  color: var(--sand-dark);
  white-space: nowrap;
}

/* ===== About 快速列表 ===== */
.about-quick-list { margin-top: 12px; }
.about-quick-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--ink-lighter);
}
.about-quick-list li a {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--mint);
  flex: 0 0 auto;
}
.about-quick-list li a:hover { color: var(--mint-light); }
.about-quick-list small {
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--sand-dark);
}

/* ===== 侧边栏 ===== */
.sidebar-block {
  background: var(--ink-light);
  padding: 20px;
  margin-bottom: 16px;
  border-top: 3px solid var(--mint);
}
.sidebar-block h3 {
  margin-top: 0;
  font-size: 0.55rem;
}
.sidebar-block ul li {
  border-bottom: 1px dashed var(--ink-lighter);
}
.sidebar-block ul li a {
  display: block;
  font-family: var(--font-vt);
  font-size: 1.15rem;
  color: var(--sand);
  padding: 8px 0;
  transition: color 0.15s ease-out, padding-left 0.15s ease-out;
  min-height: 40px;
  line-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}
.sidebar-block ul li a:hover {
  color: var(--mint-light);
  padding-left: 6px;
}
.sidebar-block p {
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--sand-dark);
  line-height: 1.6;
  margin-bottom: 12px;
}
.sidebar-link {
  display: inline-block;
  font-family: var(--font-vt);
  font-size: 1.05rem;
  color: var(--mint);
  padding: 6px 0;
  transition: color 0.15s;
}
.sidebar-link:hover { color: var(--mint-light); }

/* ===== 频道头部 ===== */
.channel-header-section {
  padding: 48px 0 28px;
  border-bottom: 2px solid var(--ink-lighter);
  margin-bottom: 0;
}

/* ===== 文章头部 ===== */
.article-top-section {
  padding: 48px 0 24px;
  border-bottom: 2px solid var(--ink-lighter);
}
.article-hero {
  margin-top: 20px;
  max-height: 400px;
  overflow: hidden;
}
.article-hero-img {
  width: 100%;
  object-fit: cover;
  max-height: 400px;
}

/* ===== 其他页头 ===== */
.tag-header-section,
.about-top-section,
.privacy-top-section,
.default-top-section {
  padding: 48px 0 24px;
  border-bottom: 2px solid var(--ink-lighter);
}
.tag-eyebrow, .about-eyebrow, .privacy-eyebrow { margin-bottom: 16px; }

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--ink-light);
  border-top: 4px solid var(--mint);
  margin-top: 40px;
  margin-bottom: var(--bar-h);
}
.footer-top {
  padding: 48px 20px 32px;
  max-width: 1100px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col h4 { margin-top: 0; }
.footer-col ul li {
  border-bottom: 1px dashed var(--ink-lighter);
}
.footer-col ul li a {
  display: block;
  font-family: var(--font-vt);
  font-size: 1.1rem;
  color: var(--sand);
  padding: 7px 0;
  min-height: 40px;
  line-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  transition: color 0.15s, padding-left 0.15s;
}
.footer-col ul li a:hover {
  color: var(--mint-light);
  padding-left: 6px;
}
/* address */
address {
  font-style: normal;
  font-family: var(--font-vt);
  font-size: 1.05rem;
  color: var(--sand-dark);
  margin-bottom: 16px;
  line-height: 1.7;
}
address a {
  color: var(--mint);
  display: inline-block;
  min-height: 40px;
  line-height: 40px;
}
address a:hover { color: var(--mint-light); }

/* 订阅表单 */
.subscribe-form label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--sand-dark);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.form-row {
  display: flex;
  gap: 0;
}
.subscribe-form input[type="email"] {
  flex: 1;
  background: var(--ink);
  border: 2px solid var(--ink-lighter);
  border-right: none;
  color: var(--sand);
  padding: 10px 12px;
  font-size: 1rem;
  font-family: var(--font-vt);
  outline: none;
  transition: border-color 0.15s;
  min-height: 44px;
}
.subscribe-form input[type="email"]:focus {
  border-color: var(--mint);
}
.subscribe-form button {
  background: var(--mint);
  border: 2px solid var(--mint);
  color: var(--ink);
  padding: 10px 16px;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  min-height: 44px;
  white-space: nowrap;
}
.subscribe-form button:hover {
  background: var(--mint-light);
  border-color: var(--mint-light);
}

/* 页脚底栏 */
.footer-bottom {
  border-top: 1px solid var(--ink-lighter);
  padding: 20px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.copyright {
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--sand-dark);
}

/* 页脚 dl 导航 */
.footer-nav-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.footer-nav-dl dt,
.footer-nav-dl dd {
  margin: 0;
}
.footer-nav-dl dt a,
.footer-nav-dl dd a {
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--sand-dark);
  display: inline-block;
  min-height: 40px;
  line-height: 40px;
  transition: color 0.15s;
}
.footer-nav-dl dt a:hover,
.footer-nav-dl dd a:hover {
  color: var(--mint-light);
}

/* ===== 底部固定导航条 ===== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  background: var(--ink-light);
  border-top: 3px solid var(--mint);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.35);
}
.bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: var(--bar-h);
  color: var(--sand-dark);
  text-decoration: none;
  transition: color 0.15s;
  padding: 4px 0;
  gap: 2px;
}
.bar-item:hover { color: var(--mint-light); }
.bar-icon { font-size: 1.3rem; line-height: 1; }
.bar-label {
  font-family: var(--font-vt);
  font-size: 0.85rem;
  line-height: 1;
}
.bar-brand {
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bar-brand a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--mint);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  box-shadow: 0 0 0 3px var(--mint-dark);
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.bar-brand a:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px var(--mint-light);
  color: var(--ink);
}

/* ===== 错列动画 ===== */
@media (prefers-reduced-motion: no-preference) {
  .stagger-item {
    opacity: 0;
    transform: translateY(16px);
    animation: stagger-in 0.4s ease-out forwards;
    animation-delay: calc(var(--i, 0) * 0.08s);
  }
  @keyframes stagger-in {
    to { opacity: 1; transform: none; }
  }
  .card { transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; }
  .channel-child { transition: transform 0.2s ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  .stagger-item { opacity: 1; transform: none; animation: none; }
  * { transition: none !important; animation: none !important; }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  :root { --bar-h: 56px; }
  html { font-size: 17px; }

  .wrap { padding: 0 14px; }

  h1 { font-size: clamp(0.7rem, 3vw, 1rem); }
  h2 { font-size: 0.6rem; }
  h3 { font-size: 0.5rem; }

  .hero-section {
    min-height: auto;
    padding: 40px 0 28px;
  }
  .hero-article {
    flex-direction: column;
    gap: 24px;
  }
  .hero-media { display: none; }

  .content-sidebar-wrap {
    flex-direction: column;
    gap: 24px;
  }
  aside.sidebar {
    width: 100%;
    position: static;
    flex: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
  }
  .footer-nav-dl {
    gap: 0 12px;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .channels-section { margin-top: 32px; }

  .bar-label { font-size: 0.75rem; }
  .bar-icon { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
  }
  .subscribe-form input[type="email"] {
    border-right: 2px solid var(--ink-lighter);
    border-bottom: none;
  }
  .subscribe-form button {
    width: 100%;
  }
  .about-quick-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
