/* =============================================
   我的嫂嫂导航 — Gen Z Chaos Maximalist Theme
   Amatic SC + Cabin | #80ff00 / #00ff00 / #1f2617
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Cabin:wght@400;500;600;700&display=swap');

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

:root {
  --ink: #1f2617;
  --acid: #80ff00;
  --neon: #00ff00;
  --white: #f5f5f0;
  --mid: #2e3a20;
  --muted: #4a5c30;
  --border: #80ff00;
  --radius: 4px;
  --font-head: 'Amatic SC', 'Segoe UI', cursive;
  --font-body: 'Cabin', 'Helvetica Neue', Arial, sans-serif;
  --max-w: 1200px;
  --transition: 0.2s ease;
}

html {
  font-size: 17px;
  line-height: 1.65;
  color: var(--white);
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(128,255,0,0.06) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(128,255,0,0.06) 40px);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--acid); text-decoration: none; }
a:hover { color: var(--neon); }
a:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

/* ─── 跑马灯 ─── */
.marquee-bar {
  background: var(--acid);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
  position: relative;
  z-index: 100;
}

.marquee-inner {
  display: inline-block;
  animation: marquee-scroll 28s linear infinite;
  white-space: nowrap;
  padding-left: 100%;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ─── 导航 ─── */
.site-header {
  background: var(--ink);
  border-bottom: 2px solid var(--acid);
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 0 1rem;
}

.main-nav { max-width: var(--max-w); margin: 0 auto; }

.nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  padding: 0.5rem 0;
  margin: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--acid);
  letter-spacing: 0.04em;
  padding: 6px 10px;
  min-height: 44px;
  order: -1;
  flex: 0 0 auto;
  margin: 0 auto;
}

.nav-brand:hover { color: var(--neon); }
.brand-logo-mark { width: 28px; height: 28px; object-fit: contain; }
.brand-text { line-height: 1; }

.nav-link {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  padding: 8px 10px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--acid);
  border-color: var(--acid);
  background: rgba(128,255,0,0.08);
}

.nav-link.nav-current {
  color: var(--ink);
  background: var(--acid);
  border-color: var(--acid);
}

/* ─── 粘性锚点条（栏目页） ─── */
.sticky-anchor-bar {
  position: sticky;
  top: 57px;
  z-index: 80;
  background: var(--mid);
  border-bottom: 1px solid var(--muted);
  padding: 0 1rem;
  overflow-x: auto;
}

.anchor-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  padding: 0.35rem 0;
  min-height: 44px;
  align-items: center;
}

.anchor-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--acid);
  padding: 6px 12px;
  border: 1px solid var(--muted);
  border-radius: 2px;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.anchor-link:hover {
  background: rgba(128,255,0,0.12);
  border-color: var(--acid);
}

/* ─── 容器结构 ─── */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

main { flex: 1; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── 面包屑 ─── */
.breadcrumb {
  margin-bottom: 1rem;
}

.breadcrumb p {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: underline;
}
.breadcrumb a:hover { color: var(--acid); }

/* ─── eyebrow 标签 ─── */
.eyebrow-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--acid);
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}

/* ─── HERO（首页） ─── */
.hero-section {
  padding: 3rem 0 2rem;
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(128,255,0,0.1) 0%, transparent 60%),
    repeating-conic-gradient(rgba(128,255,0,0.04) 0deg, transparent 1deg, transparent 89deg, rgba(128,255,0,0.04) 90deg) center / 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.hero-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-media {
  position: relative;
}

.hero-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border: 3px solid var(--acid);
  border-radius: var(--radius);
  transform: rotate(-1.5deg);
  filter: saturate(140%) contrast(1.1);
  transition: transform var(--transition);
}

.hero-img:hover { transform: rotate(0deg) scale(1.02); }

.hero-placeholder {
  width: 100%;
  height: 380px;
  border: 3px dashed var(--acid);
  border-radius: var(--radius);
  background: repeating-linear-gradient(-45deg, rgba(128,255,0,0.05) 0, rgba(128,255,0,0.05) 1px, transparent 1px, transparent 8px);
  transform: rotate(-1.5deg);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--acid);
  letter-spacing: 0.03em;
}

.hero-lead {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(245,245,240,0.85);
  max-width: 38ch;
}

/* ─── section 通用 ─── */
section { padding: 2.5rem 0; }

.section-heading {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--acid);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  display: block;
  height: 3px;
  background: var(--acid);
  margin-top: 4px;
  transform-origin: left;
}

/* ─── h1 通用 ─── */
.page-h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--acid);
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

/* ─── 卡片系统（描边无阴影 / 圆角4px） ─── */
.card-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 1.25rem;
  border: 2px solid var(--acid);
  border-radius: var(--radius);
  background: rgba(46,58,32,0.4);
  color: var(--white);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.card-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.card-block:hover::before { transform: scaleX(1); }

.card-block:hover {
  background: rgba(128,255,0,0.1);
  border-color: var(--neon);
  transform: translateY(-2px) rotate(0.4deg);
  color: var(--white);
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--acid);
  line-height: 1.2;
  display: block;
}

.card-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(245,245,240,0.75);
  display: block;
}

.card-count {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: auto;
  display: block;
}

.card-date {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-top: auto;
}

/* ─── 分类网格 ─── */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* ─── 条目网格 ─── */
.entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ─── 子页网格（栏目页） ─── */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.sub-card-media {
  margin-bottom: 0.5rem;
  border-radius: 2px;
  overflow: hidden;
}

.sub-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: saturate(130%);
}

/* ─── 相关文章网格 ─── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

/* ─── 迷你卡片 ─── */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.mini-card .card-title,
.mini-card strong {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--acid);
  display: block;
}

.mini-card span {
  font-size: 0.8rem;
  color: rgba(245,245,240,0.65);
  display: block;
}

/* ─── 按钮 ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--acid);
  border: 2px solid var(--acid);
  border-radius: var(--radius);
  padding: 10px 24px;
  min-height: 44px;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--ink);
  transform: translateY(-1px) rotate(-0.5deg);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 3px;
}

/* ─── 正文容器 ─── */
.prose-section { padding: 2rem 0; }

.prose-article {
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(245,245,240,0.92);
}

.prose-article h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--acid);
  margin: 2rem 0 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.prose-article h3 {
  font-family: var(--font-head);
  font-size: 1.45rem;
  color: var(--neon);
  margin: 1.5rem 0 0.5rem;
  font-weight: 700;
}

.prose-article p { margin-bottom: 1.1rem; }

.prose-article ul,
.prose-article ol {
  margin: 0.75rem 0 1.1rem 1.5rem;
}

.prose-article li { margin-bottom: 0.4rem; }

.prose-article a {
  color: var(--acid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose-article a:hover { color: var(--neon); }

.prose-article blockquote {
  border-left: 4px solid var(--acid);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: rgba(128,255,0,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: rgba(245,245,240,0.8);
}

.prose-article code {
  background: rgba(128,255,0,0.12);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
  color: var(--acid);
}

.prose-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.prose-article th,
.prose-article td {
  border: 1px solid var(--muted);
  padding: 0.55rem 0.85rem;
  text-align: left;
}

.prose-article th {
  background: rgba(128,255,0,0.12);
  color: var(--acid);
  font-weight: 700;
}

/* ─── 首页 Hero section ─── */
.hero-lead { max-width: 38ch; }

/* ─── 栏目页 ─── */
.cat-hero-section { padding: 2.5rem 0 1.5rem; }

.cat-hero-article { max-width: 68ch; }

.cat-h1 { margin-bottom: 0.5rem; }

.cat-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(245,245,240,0.8);
  margin-bottom: 0;
}

/* ─── 条目页 ─── */
.entry-header-section { padding: 2.5rem 0 1rem; }

.entry-header-article { max-width: 80ch; }

.entry-hero-wrap {
  margin-bottom: 1.25rem;
  border: 2px solid var(--acid);
  border-radius: var(--radius);
  overflow: hidden;
}

.entry-hero-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  filter: saturate(130%);
}

.entry-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.entry-date,
.entry-mod-date {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-body);
}

.entry-cat-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--acid);
  padding: 2px 10px;
  border-radius: 2px;
  letter-spacing: 0.06em;
}

.entry-cat-tag:hover { background: var(--neon); color: var(--ink); }

.entry-h1 { margin-bottom: 0.5rem; }

.entry-lead {
  font-size: 1rem;
  color: rgba(245,245,240,0.75);
  line-height: 1.7;
  margin-bottom: 0;
  max-width: 62ch;
}

.entry-body-section { padding: 1rem 0 2rem; }

.entry-prose { max-width: 72ch; }

.related-section { padding: 2rem 0; border-top: 1px solid var(--muted); }

.empty-tip {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* ─── 关于页 ─── */
.about-header-section { padding: 2.5rem 0 1.5rem; }
.about-header-article { max-width: 66ch; }
.about-h1 { margin-bottom: 0.5rem; }
.about-lead { font-size: 1rem; color: rgba(245,245,240,0.75); line-height: 1.7; }
.about-cats-section { padding: 2rem 0; border-top: 1px solid var(--muted); }

/* ─── 隐私页 ─── */
.privacy-header-section { padding: 2.5rem 0 1.5rem; }
.privacy-header-article { max-width: 66ch; }
.privacy-h1 { margin-bottom: 0.5rem; }
.privacy-lead { font-size: 1rem; color: rgba(245,245,240,0.75); line-height: 1.7; }
.privacy-body { padding: 1rem 0 2rem; }
.privacy-nav-section { padding: 2rem 0; border-top: 1px solid var(--muted); }

/* ─── 页脚 ─── */
.site-footer {
  border-top: 2px solid var(--acid);
  margin-top: 3rem;
}

.footer-cta {
  background: var(--mid);
  padding: 2.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  border-bottom: 1px solid var(--muted);
}

.footer-cta-text {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--acid);
  letter-spacing: 0.03em;
  margin: 0;
}

.footer-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.82rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: underline;
  padding: 4px 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover { color: var(--acid); }

/* ─── 滚动动效 ─── */
.card-block,
.prose-article,
.hero-article,
.section-heading {
  animation: none;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ─── 响应式 ─── */
@media (max-width: 900px) {
  .hero-article {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-section { min-height: auto; padding: 2rem 0; }
  .hero-img, .hero-placeholder { height: 260px; }
  .hero-h1 { font-size: 2.2rem; }
  .cats-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 640px) {
  html { font-size: 16px; }

  .nav-row {
    justify-content: flex-start;
    gap: 0.2rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
  }

  .nav-brand {
    font-size: 1.3rem;
    margin: 0;
    flex-shrink: 0;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 8px 8px;
    flex-shrink: 0;
  }

  .hero-h1 { font-size: 1.9rem; }
  .page-h1 { font-size: 1.8rem; }
  .section-heading { font-size: 1.6rem; }

  .cats-grid,
  .entries-grid,
  .sub-grid,
  .related-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .footer-cta-text { font-size: 1.4rem; }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .sticky-anchor-bar { top: 52px; }

  .prose-article { font-size: 1rem; }
}

@media (max-width: 375px) {
  .wrap { padding: 0 0.85rem; }
  .hero-article { gap: 1.25rem; }
  .card-block { padding: 0.9rem 1rem; }
}
