@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: #FF4D6D;
  --c-yellow: #FFD166;
  --c-green: #06D6A0;
  --c-dark: #1a1a2e;
  --c-mid: #2d2d44;
  --c-light: #f5f5fa;
  --c-white: #ffffff;
  --c-text: #1a1a2e;
  --c-muted: #6b6b8a;
  --radius: 4px;
  --nav-h: 64px;
  --header-h: 60px;
  --font-main: 'Baloo 2', 'Comic Neue', system-ui, sans-serif;
  --transition: 160ms ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font-main);
  background: var(--c-light);
  color: var(--c-text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { opacity: .8; }
ul, ol { list-style: none; }
hr {
  border: none;
  border-top: 3px solid var(--c-yellow);
  margin: .5rem 0 1rem;
  width: 48px;
}

/* ===== 滚动偏移（底部固定导航高度）===== */
div[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ===== 页面容器 ===== */
.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: var(--nav-h);
}

/* ===== 顶部 header ===== */
.site-header {
  background: var(--c-primary);
  color: var(--c-white);
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-h);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand-link { display: flex; align-items: center; gap: .5rem; }
.site-logo { height: 36px; width: auto; border-radius: var(--radius); }
.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: .02em;
}
.header-slogan {
  font-size: .85rem;
  opacity: .85;
  display: none;
}
@media (min-width: 600px) { .header-slogan { display: block; } }

/* ===== Hero ===== */
.hero-section {
  background: var(--c-dark);
  color: var(--c-white);
  min-height: 45vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero-deco {
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 1;
  color: var(--c-primary);
  flex-shrink: 0;
  opacity: .25;
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}
.hero-text {
  position: relative;
  z-index: 2;
  max-width: 520px;
}
.hero-text h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: .75rem;
  color: var(--c-white);
}
.hero-sub {
  font-size: 1rem;
  opacity: .8;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.btn-primary {
  display: inline-block;
  background: var(--c-primary);
  color: var(--c-white);
  font-weight: 700;
  font-size: 1rem;
  padding: .65rem 1.8rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
  min-height: 44px;
  line-height: 1.5;
}
.btn-primary:hover { background: #e6304d; opacity: 1; }

/* ===== 内容+侧边栏布局 ===== */
.content-with-aside {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.main-content { flex: 1 1 0; min-width: 0; }
.sidebar {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (max-width: 767px) {
  .content-with-aside { flex-direction: column; }
  .sidebar { flex: none; width: 100%; }
}

/* ===== 侧边栏卡片 ===== */
.sidebar-card {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border-top: 4px solid var(--c-primary);
}
.sidebar-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .25rem;
  color: var(--c-primary);
}
.sidebar-tip { border-top-color: var(--c-green); }
.sidebar-tip h3 { color: var(--c-dark); }
.sidebar-nav li + li { margin-top: .4rem; }
.sidebar-nav a {
  color: var(--c-text);
  font-size: .9rem;
  display: block;
  padding: .3rem .5rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.sidebar-nav a:hover { background: var(--c-light); color: var(--c-primary); }
.sidebar-tip p { font-size: .85rem; line-height: 1.6; color: var(--c-muted); margin-bottom: .3rem; }

/* ===== 正文内容样式 ===== */
.main-content h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--c-dark);
  margin-top: 2.5rem;
  margin-bottom: .3rem;
}
.main-content h2:first-child { margin-top: 0; }
.main-content h2 + hr { margin-bottom: 1rem; }
.main-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}
.main-content h3 + hr { border-color: var(--c-green); width: 32px; }
.main-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: .9rem;
}
.main-content ul, .main-content ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.main-content ul { list-style: disc; }
.main-content ol { list-style: decimal; }
.main-content li {
  margin-bottom: .4rem;
  line-height: 1.65;
}
.main-content a { color: var(--c-primary); font-weight: 600; }
.main-content a:hover { opacity: .75; }
.main-content strong { color: var(--c-dark); font-weight: 700; }
.main-content em { color: var(--c-primary); font-style: normal; font-weight: 600; }
.main-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: .95rem;
}
.main-content th {
  background: var(--c-primary);
  color: var(--c-white);
  padding: .6rem .8rem;
  text-align: left;
}
.main-content td {
  padding: .55rem .8rem;
  border-bottom: 1px solid #e0e0ee;
}
.main-content tr:nth-child(even) td { background: #f0f0f8; }

/* div 区块样式 */
.main-content div {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--c-white);
  border-radius: var(--radius);
  border-left: 5px solid var(--c-primary);
}
.main-content div:nth-child(2n) { border-left-color: var(--c-yellow); }
.main-content div:nth-child(3n) { border-left-color: var(--c-green); }

/* ===== 底部 Footer ===== */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,.85);
  margin-top: auto;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 1rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .footer-top { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-name {
  font-size: 1.2rem;
  color: var(--c-primary);
  display: block;
  margin-bottom: .4rem;
}
.footer-brand p { font-size: .88rem; opacity: .7; line-height: 1.6; }
.footer-links-col h4 {
  font-size: .9rem;
  color: var(--c-yellow);
  font-weight: 700;
  margin-bottom: .6rem;
}
.footer-links-col ul { list-style: none; }
.footer-links-col li + li { margin-top: .35rem; }
.footer-links-col a {
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  display: block;
  padding: .2rem 0;
  min-height: 40px;
  line-height: 40px;
  transition: color var(--transition);
}
.footer-links-col a:hover { color: var(--c-primary); opacity: 1; }
.footer-contact {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
}
.footer-contact address {
  font-style: normal;
  font-size: .88rem;
  opacity: .7;
}
.footer-contact address a { color: var(--c-green); }
.footer-bottom-links {
  display: flex;
  gap: 1rem;
  list-style: none;
}
.footer-bottom-links a {
  color: rgba(255,255,255,.6);
  font-size: .82rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.footer-bottom-links a:hover { color: var(--c-yellow); opacity: 1; }
.footer-copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  font-size: .78rem;
  opacity: .5;
  padding-top: .75rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* ===== 底部固定导航条 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--c-dark);
  border-top: 3px solid var(--c-primary);
  height: var(--nav-h);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.bottom-nav ol {
  display: flex;
  align-items: stretch;
  height: 100%;
  min-width: max-content;
  padding: 0 .25rem;
}
.bottom-nav li {
  display: flex;
  align-items: stretch;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.75);
  font-size: .72rem;
  font-weight: 600;
  padding: .3rem .75rem;
  min-width: 60px;
  min-height: 44px;
  gap: .1rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.bottom-nav a span { display: block; font-size: .7rem; }
.bottom-nav a:hover,
.bottom-nav a:focus {
  background: var(--c-primary);
  color: var(--c-white);
  opacity: 1;
}
@media (min-width: 768px) {
  .bottom-nav {
    overflow-x: visible;
  }
  .bottom-nav ol {
    justify-content: center;
    min-width: auto;
  }
  .bottom-nav a { padding: .4rem 1.1rem; min-width: 72px; font-size: .8rem; }
  .bottom-nav a span { font-size: .75rem; }
}

/* ===== Scroll Reveal 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 300ms ease, transform 300ms ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  .stagger-item {
    opacity: 0;
    transform: translateY(20px);
  }
  .stagger-item.is-visible {
    animation: staggerIn 280ms ease forwards;
  }
  @keyframes staggerIn {
    to { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger-item { opacity: 1; transform: none; }
}

/* ===== 响应式补丁 ===== */
@media (max-width: 374px) {
  .hero-text h1 { font-size: 1.4rem; }
  .bottom-nav a { min-width: 52px; padding: .3rem .5rem; }
}
