@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 {
  --green: #87ff71;
  --cyan: #01cdfe;
  --dark: #192617;
  --dark2: #1e2e1b;
  --dark3: #0f1a0d;
  --neon-pink: #ff71ce;
  --neon-purple: #b967ff;
  --text: #d4ffd0;
  --text-muted: #8db88a;
  --border: #87ff7133;
  --card-bg: #1a2e17cc;
  --font-main: 'Baloo 2', 'Comic Neue', system-ui, sans-serif;
  --radius: 10px;
  --bottom-nav-h: 64px;
  --transition: 0.25s ease;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--dark3);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-h) + 56px);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }
ul, ol { list-style: none; }

/* ===== VaporWave 背景 ===== */
.vp-bg {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, #0d1f0b 0%, #192617 40%, #0f1a0d 100%);
}

/* 网格地板 */
.retro-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(1, 205, 254, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 205, 254, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(600px) rotateX(30deg);
  transform-origin: center bottom;
  opacity: 0.5;
}

/* VHS 扫描线 */
.scanlines::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
  from { background-position: 0 0; }
  to { background-position: 0 100px; }
}

/* 确保内容在上层 */
.vp-bg > *:not(.retro-grid) { position: relative; z-index: 2; }

/* ===== Hero (首页) ===== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  padding: 3rem 2rem 4rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: hue-rotate(20deg) saturate(1.4);
}

/* 渐变叠层 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(25,38,23,0.92) 0%, rgba(185,103,255,0.15) 60%, rgba(1,205,254,0.1) 100%);
}

.hero-text {
  position: relative;
  z-index: 2;
  text-align: right;
  max-width: 600px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 12px var(--cyan);
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 20px rgba(135,255,113,0.7), 0 0 40px rgba(135,255,113,0.3);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 420px;
  margin-left: auto;
}

.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: transparent;
  border: 2px solid var(--green);
  color: var(--green);
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-shadow: 0 0 8px rgba(135,255,113,0.6);
  box-shadow: 0 0 16px rgba(135,255,113,0.2), inset 0 0 16px rgba(135,255,113,0.05);
  transition: all var(--transition);
}
.btn-primary:hover {
  background: rgba(135,255,113,0.12);
  box-shadow: 0 0 28px rgba(135,255,113,0.5), inset 0 0 20px rgba(135,255,113,0.1);
  color: var(--green);
  transform: translateY(-2px);
}

/* ===== 页面 Hero (内页) ===== */
.page-hero {
  min-height: 28vh;
  display: flex;
  align-items: flex-end;
  padding: 5rem 2rem 2.5rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(185,103,255,0.08) 0%, transparent 100%);
  pointer-events: none;
}

.page-hero-text {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.page-hero-text h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 16px rgba(135,255,113,0.5);
  margin-top: 0.5rem;
}

.hero-date {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.page-hero--feature::before { background: linear-gradient(180deg, rgba(1,205,254,0.1) 0%, transparent 100%); }
.page-hero--faq::before { background: linear-gradient(180deg, rgba(255,113,206,0.08) 0%, transparent 100%); }
.page-hero--about::before { background: linear-gradient(180deg, rgba(185,103,255,0.1) 0%, transparent 100%); }

/* ===== 布局容器 ===== */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  width: 100%;
}

.content-section { margin-bottom: 3rem; }

.content-wrap {
  display: grid;
  gap: 2rem;
}

.content-wrap.with-aside {
  grid-template-columns: 1fr 260px;
}

/* ===== 正文 ===== */
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.prose h2, .prose h3, .prose h4 {
  color: var(--green);
  text-shadow: 0 0 8px rgba(135,255,113,0.4);
  margin: 1.8em 0 0.6em;
  font-weight: 700;
}
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.2rem; }
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
  list-style: disc;
}
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(1,205,254,0.3); }
.prose a:hover { color: var(--green); border-bottom-color: var(--green); }
.prose strong { color: var(--green); font-weight: 700; }
.prose code {
  background: rgba(135,255,113,0.1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
  color: var(--green);
}
.prose blockquote {
  border-left: 3px solid var(--cyan);
  padding: 0.5em 1em;
  margin: 1em 0;
  background: rgba(1,205,254,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
}
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
.prose th, .prose td {
  padding: 0.6em 0.8em;
  border: 1px solid var(--border);
  text-align: left;
}
.prose th { background: rgba(135,255,113,0.08); color: var(--green); }

/* FAQ 样式增强 */
.faq-prose details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-prose summary {
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--cyan);
  background: var(--card-bg);
}
.faq-prose summary:hover { background: rgba(1,205,254,0.08); }
.faq-prose details[open] summary { border-bottom: 1px solid var(--border); }
.faq-prose details > *:not(summary) { padding: 0.9rem 1.1rem; }

/* ===== 侧边栏 ===== */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

.aside-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: var(--card-bg);
  backdrop-filter: blur(4px);
}

.aside-box small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  text-shadow: 0 0 8px rgba(1,205,254,0.5);
}
.aside-box h3 {
  font-size: 1rem;
  color: var(--green);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 6px rgba(135,255,113,0.4);
}
.aside-box ul { display: flex; flex-direction: column; gap: 0.4rem; }
.aside-box ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  padding: 0.2rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.6rem;
  transition: all var(--transition);
}
.aside-box ul li a:hover {
  color: var(--green);
  border-left-color: var(--green);
}

.aside-brand p { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ===== 卡片区 ===== */
.card-section {
  margin-bottom: 3rem;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--neon-pink);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  text-shadow: 0 0 8px rgba(255,113,206,0.6);
}
.section-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 10px rgba(135,255,113,0.4);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  backdrop-filter: blur(4px);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
}
.card:hover .card-inner h3 a { color: var(--green); }

.card-inner { padding: 1.25rem; }
.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  border: 1px solid rgba(1,205,254,0.4);
  border-radius: 4px;
  padding: 0.1em 0.5em;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}
.card-inner h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.card-inner h3 a { color: var(--text); }
.card-inner p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.card-date { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.6rem; }

/* ===== DL 列表 (FAQ / About 页) ===== */
.guide-dl {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.guide-dl dt {
  padding: 0.9rem 1.1rem 0.2rem;
  background: rgba(135,255,113,0.04);
}
.guide-dl dt a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyan);
}
.guide-dl dt a:hover { color: var(--green); }
.guide-dl dd {
  padding: 0 1.1rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.guide-dl dd:last-child { border-bottom: none; }

/* ===== 日期 / 更新时间 ===== */
.update-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.update-date time { color: var(--cyan); }

/* ===== 页脚 ===== */
.site-footer {
  background: linear-gradient(180deg, var(--dark3) 0%, #080f07 100%);
  border-top: 1px solid var(--border);
  padding: 3rem 1.25rem 2rem;
  margin-top: 3rem;
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-brand-big {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 24px rgba(135,255,113,0.5), 0 0 60px rgba(135,255,113,0.2);
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.footer-brand address { font-style: normal; }
.footer-brand address p { font-size: 0.9rem; color: var(--text-muted); }

.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
  padding: 0.15rem 0;
  display: inline-block;
}
.footer-col ul li a:hover { color: var(--cyan); }

.footer-copy {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  text-align: center;
}
.footer-copy p { font-size: 0.82rem; color: var(--text-muted); }

/* ===== 底部固定导航 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 26, 13, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

/* details 展开菜单 */
.bottom-nav-details {
  position: relative;
}
.bottom-nav-details summary {
  display: none;
}
.bottom-nav-details[open] .bottom-nav-details summary { display: block; }
.bottom-nav-details menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: rgba(12, 22, 10, 0.98);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.bottom-nav-details menu li a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: all var(--transition);
}
.bottom-nav-details menu li a:hover {
  color: var(--green);
  border-color: var(--green);
}

/* 底部链接行 */
.bottom-nav-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bottom-nav-h);
  padding: 0 0.75rem;
  gap: 0.25rem;
}
.nav-left, .nav-right {
  display: flex;
  gap: 0.1rem;
  flex: 1;
}
.nav-right { justify-content: flex-end; }

.bottom-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  border-radius: 6px;
  transition: all var(--transition);
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bottom-link:hover { color: var(--green); }

.bottom-home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 52px;
  padding: 0.5rem;
  border: 1px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(135,255,113,0.6);
  box-shadow: 0 0 10px rgba(135,255,113,0.2);
  flex-shrink: 0;
  transition: all var(--transition);
}
.bottom-home:hover {
  background: rgba(135,255,113,0.12);
  box-shadow: 0 0 20px rgba(135,255,113,0.4);
  color: var(--green);
}

/* 品牌名（details summary） */
.bottom-nav-brand {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  bottom: calc(var(--bottom-nav-h) + 0.2rem);
  font-size: 0.72rem;
  color: var(--text-muted);
  list-style: none;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all var(--transition);
}
.bottom-nav-brand:hover { color: var(--cyan); border-color: var(--cyan); }

/* 搜索框 */
.bottom-search {
  padding: 0.4rem 0.75rem 0.6rem;
  border-top: 1px solid var(--border);
}
.search-form {
  display: flex;
  gap: 0.4rem;
}
.search-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
  min-height: 40px;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--cyan); box-shadow: 0 0 8px rgba(1,205,254,0.2); }
.search-btn {
  background: transparent;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  color: var(--cyan);
  font-family: var(--font-main);
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 40px;
  white-space: nowrap;
}
.search-btn:hover { background: rgba(1,205,254,0.1); }

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scanlines::after { animation: none; }
  .btn-primary, .card, .bottom-link, .bottom-home { transition: none; }
}

/* ===== 断点：移动端 ===== */
@media (max-width: 768px) {
  .content-wrap.with-aside {
    grid-template-columns: 1fr;
  }
  .sidebar { order: 2; }
  .main-content { order: 1; }
  .footer-cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero { min-height: 70vh; padding: 2rem 1.25rem 5rem; }
  .hero-text { max-width: 100%; }
  .hero-desc { max-width: 100%; margin-left: 0; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-brand-big { font-size: 2.2rem; }
  .bottom-link { font-size: 0.7rem; padding: 0.4rem 0.3rem; max-width: 64px; }
}

@media (max-width: 480px) {
  main { padding: 1.5rem 1rem; }
  .page-hero { padding: 4.5rem 1rem 2rem; }
  .nav-left, .nav-right { gap: 0; }
  .bottom-link { font-size: 0.65rem; padding: 0.35rem 0.2rem; max-width: 56px; }
}

/* ===== Glitch 动画（装饰用） ===== */
@keyframes glitch {
  0%, 100% { text-shadow: 0 0 20px rgba(135,255,113,0.7), 0 0 40px rgba(135,255,113,0.3); }
  25% { text-shadow: -2px 0 rgba(1,205,254,0.8), 2px 0 rgba(255,113,206,0.8), 0 0 20px rgba(135,255,113,0.5); }
  50% { text-shadow: 2px 0 rgba(1,205,254,0.8), -2px 0 rgba(255,113,206,0.8), 0 0 20px rgba(135,255,113,0.5); }
  75% { text-shadow: 0 0 20px rgba(135,255,113,0.7), 0 0 40px rgba(135,255,113,0.3); }
}

.hero-text h1 {
  animation: glitch 6s ease-in-out infinite;
}
