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

/* ===== 变量 ===== */
:root {
  --c-primary: #99ffcc;
  --c-accent: #00ff41;
  --c-dark: #001e3c;
  --c-dark2: #002850;
  --c-dark3: #003366;
  --c-text: #d0ffe8;
  --c-muted: #7ab89a;
  --c-border: #00ff4130;
  --c-card-bg: #002240;
  --radius: 10px;
  --radius-lg: 20px;
  --header-h: 64px;
  --font-main: 'Baloo 2', 'Comic Neue', system-ui, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  font-size: 16px;
}
body, .dark-body {
  background: var(--c-dark);
  color: var(--c-text);
  font-family: var(--font-main);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--c-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-primary); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--c-dark); }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 3px; }

/* ===== 遮罩菜单 ===== */
.overlay-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 20, 40, 0.97);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}
.overlay-menu.open {
  opacity: 1;
  pointer-events: all;
}
.overlay-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: 2px solid var(--c-accent);
  color: var(--c-accent);
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.overlay-close:hover { background: var(--c-accent); color: var(--c-dark); }
.overlay-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}
.overlay-link {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: 0.02em;
  padding: 0.5rem 2rem;
  display: block;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.overlay-link:hover {
  background: var(--c-accent);
  color: var(--c-dark);
}
.overlay-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.blob-a {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #00ff4115 0%, transparent 70%);
  top: -80px; left: -80px;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-b {
  width: 250px; height: 250px;
  background: radial-gradient(circle, #99ffcc10 0%, transparent 70%);
  bottom: -60px; right: -60px;
  animation: blobFloat 10s ease-in-out infinite reverse;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(30px, 20px) scale(1.1); }
}

/* ===== 侧边 aside（隐藏视觉，满足结构契约） ===== */
.site-aside {
  display: none;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(0, 30, 60, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  z-index: 1000;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
}
.brand-mark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 40px;
  min-width: 40px;
}
.logo-img { width: 40px; height: 40px; object-fit: contain; }
.logo-text-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.sticky-anchors {
  display: flex;
  gap: 0.4rem;
  flex: 1;
  flex-wrap: nowrap;
  overflow: hidden;
}
.anchor-pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  color: var(--c-primary);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  min-height: 32px;
  display: flex;
  align-items: center;
}
.anchor-pill:hover {
  background: var(--c-accent);
  color: var(--c-dark);
  border-color: var(--c-accent);
}
.hamburger-btn {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.hamburger-btn:hover { background: var(--c-border); }
.ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-accent);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  padding: calc(var(--header-h) + 3rem) 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-dark) 0%, var(--c-dark2) 60%, #001a30 100%);
  scroll-margin-top: var(--header-h);
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-text {
  flex: 1;
  min-width: 0;
}
h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-primary);
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--c-muted);
  max-width: 500px;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.cta-btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--c-accent);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  min-height: 48px;
  line-height: 1.4;
}
.cta-btn:hover {
  background: var(--c-primary);
  color: var(--c-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px #00ff4140;
}
.hero-art {
  flex-shrink: 0;
  width: clamp(140px, 25vw, 220px);
}
.cell-art {
  width: 100%;
  height: auto;
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.hero-slant {
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 80px;
  background: var(--c-dark);
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 1;
}

/* ===== 正文 ===== */
.content-section {
  padding: 2rem 1.25rem 4rem;
}
.content-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.content-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c-text);
}

/* ===== 正文内部 div 样式（page.content 里的 div） ===== */
.content-body div {
  margin-bottom: 4rem;
  scroll-margin-top: calc(var(--header-h) + 12px);
  padding-top: 0.5rem;
}
.content-body div + div {
  border-top: 1px solid var(--c-border);
  padding-top: 3rem;
}
.content-body h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 1.2rem;
  line-height: 1.3;
}
.content-body h2 span {
  display: inline;
}
.content-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--c-accent);
  margin: 1.5rem 0 0.8rem;
}
.content-body h3 span {
  display: inline;
}
.content-body p {
  margin-bottom: 0.9rem;
  max-width: 72ch;
}
.content-body ul, .content-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.content-body ul { list-style: disc; }
.content-body ol { list-style: decimal; }
.content-body li { margin-bottom: 0.4rem; }
.content-body a {
  color: var(--c-accent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.content-body a:hover {
  border-color: var(--c-accent);
}
.content-body strong { color: var(--c-primary); font-weight: 600; }
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.97rem;
}
.content-body th, .content-body td {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--c-border);
  text-align: left;
}
.content-body th {
  background: var(--c-dark2);
  color: var(--c-accent);
  font-weight: 600;
}
.content-body tr:nth-child(even) td { background: rgba(0,255,65,0.03); }

/* ===== 卡片（正文内部如有） ===== */
.content-body .card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  background: var(--c-card-bg);
  transition: border-color var(--transition), transform var(--transition);
}
.content-body .card:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cell-art { animation: none; }
  .blob-a, .blob-b { animation: none; }
  html { scroll-behavior: auto; }
  .cta-btn:hover { transform: none; box-shadow: none; }
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-dark2);
  border-top: 1px solid var(--c-border);
  padding-top: 3rem;
}
.footer-top { padding: 0 1.25rem 2.5rem; }
.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.75rem;
}
.footer-desc {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.6;
}
.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-accent);
  margin-bottom: 1rem;
}
.footer-heading span { display: inline; }
.footer-nav-col ul, .footer-contact-col address ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}
.footer-nav-col ul li a,
.footer-contact-col address ul li a,
.footer-contact-col address ul li span {
  font-size: 0.9rem;
  color: var(--c-muted);
  transition: color var(--transition);
  min-height: 32px;
  display: flex;
  align-items: center;
}
.footer-nav-col ul li a:hover,
.footer-contact-col address ul li a:hover { color: var(--c-primary); }
.footer-contact-col address { font-style: normal; }
.footer-cells {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.2rem;
}
.fcell {
  border-radius: 50%;
  border: 1.5px solid var(--c-border);
  animation: breathe 4s ease-in-out infinite;
}
.fcell-1 { width: 28px; height: 28px; animation-delay: 0s; }
.fcell-2 { width: 20px; height: 20px; animation-delay: 0.8s; }
.fcell-3 { width: 14px; height: 14px; animation-delay: 1.6s; }
.footer-bottom {
  border-top: 1px solid var(--c-border);
  padding: 1rem 1.25rem;
  text-align: center;
}
.footer-bottom p {
  font-size: 0.85rem;
  color: var(--c-muted);
}

/* ===== 导航链接 (aside > nav) ===== */
.site-aside nav ul li a.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  color: var(--c-primary);
  font-weight: 600;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .sticky-anchors { display: none; }
  .hero-inner { flex-direction: column; gap: 2rem; }
  .hero-art { width: 140px; margin: 0 auto; }
  .hero-text { text-align: left; }
  .hero-sub { max-width: 100%; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }
  .content-body h2 { font-size: 1.25rem; }
  .cta-btn { width: 100%; text-align: center; }
  .hero-section { padding-bottom: 4rem; }
}
