@import url('https://fonts.googleapis.com/css2?family=Newsreader:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --neon: #87ff71;
  --cyan: #01cdfe;
  --ink: #192617;
  --void: #0c1410;
  --text: #dfeedd;
  --dim: #9fb8a2;
  --line: rgba(135, 255, 113, .22);
  --line-soft: rgba(1, 205, 254, .18);
  --rail: 236px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--void);
  background-image:
    radial-gradient(90% 50% at 100% 0%, rgba(1, 205, 254, .16), transparent 62%),
    radial-gradient(70% 40% at 0% 8%, rgba(135, 255, 113, .12), transparent 60%),
    linear-gradient(180deg, #101a12 0%, #0c1410 46%, #0a110d 100%);
  color: var(--text);
  font-family: Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46vh;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(135, 255, 113, .20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 205, 254, .18) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: perspective(340px) rotateX(63deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(transparent, #000 70%);
  mask-image: linear-gradient(transparent, #000 70%);
  opacity: .55;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 4px);
  opacity: .55;
}

a { color: var(--cyan); }

/* 左侧固定栏 */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(25, 38, 23, .97), rgba(10, 17, 13, .97));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.brand {
  flex: none;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--neon);
  text-decoration: none;
  border: 1px solid var(--neon);
  border-radius: 12px;
  text-shadow: 0 0 14px rgba(135, 255, 113, .75);
  box-shadow: 0 0 0 1px rgba(135, 255, 113, .12), inset 0 0 18px rgba(135, 255, 113, .12);
  transition: transform .2s ease, box-shadow .2s ease;
}

.brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(135, 255, 113, .45), inset 0 0 20px rgba(135, 255, 113, .3);
}

.railnav { flex: 1 1 auto; }

.railnav p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.railnav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 11px 9px;
  font-size: 1rem;
  line-height: 1.35;
  color: #cfe2d2;
  text-decoration: none;
  border-radius: 10px;
  letter-spacing: .2px;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.railnav a::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border: 1px solid var(--cyan);
  border-radius: 2px;
  transition: background .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.railnav a:hover,
.railnav a:focus-visible {
  color: var(--neon);
  background: rgba(135, 255, 113, .08);
  transform: translateX(3px);
  text-shadow: 0 0 14px rgba(135, 255, 113, .6);
}

.railnav a:hover::before,
.railnav a:focus-visible::before {
  background: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 12px var(--neon);
}

.railcta {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px;
  font-size: .95rem;
  letter-spacing: .5px;
  color: var(--cyan);
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.railcta:hover {
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 18px rgba(135, 255, 113, .3);
}

/* 主区 */
main {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  max-width: 1240px;
  padding: 0 34px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  grid-template-areas:
    "hero hero"
    "art side";
  column-gap: 46px;
  align-items: start;
}

.hero {
  grid-area: hero;
  position: relative;
  margin: 0 -34px 26px;
  min-height: clamp(320px, 45vh, 470px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(1, 205, 254, .28), rgba(135, 255, 113, .16) 55%, rgba(12, 20, 16, .9) 100%);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: hue-rotate(-14deg) saturate(1.25) contrast(1.05);
  opacity: .82;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 20, 16, .28) 0%, rgba(12, 20, 16, .52) 52%, rgba(12, 20, 16, .96) 100%),
    linear-gradient(90deg, rgba(12, 20, 16, .9), rgba(12, 20, 16, .2) 72%);
}

.hero-in {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 30px 34px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.badge {
  display: inline-block;
  padding: 5px 13px;
  font-size: .875rem;
  letter-spacing: .12em;
  color: var(--neon);
  border: 1px solid rgba(135, 255, 113, .55);
  border-radius: 999px;
  background: rgba(135, 255, 113, .09);
  text-shadow: 0 0 12px rgba(135, 255, 113, .7);
  box-shadow: 0 0 22px rgba(135, 255, 113, .16);
  animation: float 5.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

h1 {
  margin: 0;
  font-family: Newsreader, Georgia, "Songti SC", serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 4.6vw, 3.25rem);
  line-height: 1.16;
  letter-spacing: -.01em;
  color: #f2fff0;
  text-shadow: 0 0 26px rgba(135, 255, 113, .45), 0 2px 26px rgba(1, 205, 254, .3);
  overflow-wrap: break-word;
}

/* 正文 */
.body {
  grid-area: art;
  min-width: 0;
  padding-top: 6px;
}

.body > section {
  padding: 4px 0 30px;
  scroll-margin-top: 26px;
}

.body > section + section {
  border-top: 1px dashed rgba(1, 205, 254, .22);
  padding-top: 30px;
}

.body h2 {
  margin: 0 0 4px;
  font-family: Newsreader, Georgia, "Songti SC", serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  line-height: 1.3;
  color: var(--neon);
  text-shadow: 0 0 18px rgba(135, 255, 113, .3);
  overflow-wrap: break-word;
}

.body h3 {
  margin: 22px 0 4px;
  font-family: Newsreader, Georgia, "Songti SC", serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #efffe9;
}

hr {
  border: 0;
  height: 1px;
  margin: 13px 0 18px;
  background: linear-gradient(90deg, var(--neon), rgba(1, 205, 254, .45) 45%, transparent);
}

.body p,
.body li {
  font-size: 1.0625rem;
  line-height: 1.85;
  max-width: 68ch;
}

.body p { margin: 0 0 15px; }

.body ul,
.body ol {
  margin: 0 0 18px;
  padding-left: 1.15em;
}

.body li { margin-bottom: 7px; }

.body li::marker { color: var(--cyan); }

.body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

.body strong { color: #f4fff0; font-weight: 600; }

.body blockquote {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 2px solid var(--neon);
  background: rgba(135, 255, 113, .07);
  border-radius: 0 12px 12px 0;
}

.body blockquote p:last-child { margin-bottom: 0; }

.body img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
}

.body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 1rem;
}

.body th,
.body td {
  border: 1px solid var(--line-soft);
  padding: 9px 11px;
  text-align: left;
}

.body th { background: rgba(1, 205, 254, .1); }

/* 侧栏 */
.side {
  grid-area: side;
  position: sticky;
  top: 26px;
  align-self: start;
  margin-top: 6px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(170deg, rgba(25, 38, 23, .85), rgba(12, 20, 16, .85));
  box-shadow: inset 0 0 0 1px rgba(135, 255, 113, .05);
}

.side h2 {
  margin: 0;
  font-family: Newsreader, Georgia, "Songti SC", serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--neon);
  text-shadow: 0 0 14px rgba(135, 255, 113, .45);
}

.side hr { margin: 9px 0 12px; }

.side-list {
  margin: 0;
  padding-left: 1.1em;
  list-style: decimal;
}

.side-list li { margin-bottom: 2px; }

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 2px;
  font-size: .95rem;
  line-height: 1.45;
  color: #c9dccb;
  text-decoration: none;
  transition: color .16s ease, transform .16s ease;
}

.side-list a:hover {
  color: var(--neon);
  transform: translateX(3px);
}

.side-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 10px;
  padding: 8px 14px;
  font-size: .9rem;
  color: var(--cyan);
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  transition: border-color .16s ease, color .16s ease;
}

.side-top:hover { color: var(--neon); border-color: var(--neon); }

/* 页脚 */
.foot {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  padding: 16px 34px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}

.foot p {
  margin: 0;
  font-size: 1rem;
  color: var(--dim);
  letter-spacing: .3px;
}

.foot p a {
  display: inline-block;
  padding: 10px 2px;
  color: var(--neon);
  text-decoration: none;
}

.foot p a:hover { text-decoration: underline; text-underline-offset: 4px; }

.foot small {
  font-size: .95rem;
  color: rgba(159, 184, 162, .75);
  letter-spacing: .08em;
}

/* 滚动进场 */
.js .body > section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1);
}

.js .body > section.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .body > section { opacity: 1; transform: none; transition: none; }
  .badge { animation: none; }
}

/* 平板与手机 */
@media (max-width: 1000px) {
  .rail {
    position: sticky;
    top: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .brand { width: 40px; height: 40px; font-size: 1.2rem; }

  .railnav { flex: 1 1 auto; min-width: 0; }

  .railnav p {
    flex-direction: row;
    gap: 4px;
  }

  .railnav a {
    min-height: 40px;
    padding: 9px 11px;
    white-space: nowrap;
    font-size: .95rem;
    gap: 7px;
  }

  .railnav a::before { width: 6px; height: 6px; }

  .railnav a:hover { transform: none; }

  .railcta { min-height: 40px; padding: 9px 12px; white-space: nowrap; }

  main {
    margin-left: 0;
    padding: 0 18px 40px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "hero"
      "art"
      "side";
    row-gap: 0;
  }

  .hero { margin: 0 -18px 20px; min-height: clamp(260px, 45vh, 360px); }

  .hero-in { padding: 22px 18px 20px; }

  .body > section { scroll-margin-top: 84px; }

  .side {
    position: static;
    margin-top: 26px;
  }

  .foot { margin-left: 0; padding: 14px 18px 28px; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }

  .railnav a { font-size: .9rem; padding: 9px 9px; }

  .railcta { font-size: .875rem; padding: 9px 10px; }

  .body p,
  .body li { font-size: 1rem; }

  .hero-in { gap: 10px; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
