@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --ink: #001e3c;
  --mint: #99ffcc;
  --acid: #00ff41;
  --paper: #d9fcef;
  --slab: #012a50;
  --slab2: #03365f;
  --pixel: 'Press Start 2P', 'Courier New', monospace;
  --text: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--paper);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  padding-bottom: 180px;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 28%, rgba(0, 255, 65, 0.20), transparent 42%),
    radial-gradient(circle at 78% 58%, rgba(153, 255, 204, 0.16), transparent 46%),
    radial-gradient(circle at 48% 90%, rgba(0, 255, 65, 0.13), transparent 40%);
  filter: blur(34px);
  animation: breathe 14s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.13) translate(-2%, -3%); }
}

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

img {
  max-width: 100%;
}

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(0, 24, 48, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 255, 65, 0.3);
  padding: 0.3rem 0.55rem 0.5rem;
}

.dock-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.15rem;
}

.brand {
  flex: 1 1 100%;
  font-family: var(--pixel);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--mint);
  text-decoration: none;
  padding: 0.15rem 0;
  text-shadow: 0 0 14px rgba(0, 255, 65, 0.4);
}

.find {
  flex: 1 1 120px;
  margin: 0;
}

.find input {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--slab);
  color: var(--paper);
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(153, 255, 204, 0.18);
}

.find input::placeholder {
  color: rgba(217, 252, 239, 0.62);
}

.find input:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 1px;
}

.burger,
.shut {
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  border: 0;
  border-radius: 10px;
  background: var(--acid);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.burger:active,
.shut:active {
  transform: translateY(1px);
}

.rail p {
  display: flex;
  gap: 0.25rem;
  margin: 0.4rem 0 0;
  padding: 0 0 0.1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail p::-webkit-scrollbar {
  display: none;
}

.rail a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
  font-size: 1rem;
}

.rail a:hover,
.rail a:focus-visible {
  background: rgba(0, 255, 65, 0.16);
  color: var(--acid);
}

/* ---------- 全屏遮罩菜单 ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.2rem;
  background: rgba(0, 20, 42, 0.97);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.sheet[hidden] {
  display: none;
}

.sheet-nav p {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.sheet-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: rgba(0, 255, 65, 0.08);
  color: var(--mint);
  font-family: var(--pixel);
  font-size: 1rem;
  line-height: 1.7;
  text-decoration: none;
}

.sheet-nav a:hover {
  background: rgba(0, 255, 65, 0.2);
}

.shut {
  align-self: flex-start;
}

/* ---------- 版心 ---------- */
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.9rem 0.85rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

@media (min-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr) 268px;
    align-items: start;
    padding-top: 1.6rem;
    gap: 1.5rem;
  }
}

/* ---------- Hero ---------- */
.wrap section > div.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 44vh;
  padding: 0;
  border-radius: 10px 10px 46px 46px;
  background: linear-gradient(160deg, #0a4a35 0%, #00305a 58%, #001e3c 100%);
  scroll-margin-bottom: 170px;
}

.hero::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -30%;
  width: 58%;
  aspect-ratio: 1;
  z-index: 0;
  border-radius: 47% 53% 42% 58% / 56% 44% 56% 44%;
  background: radial-gradient(circle at 40% 35%, rgba(0, 255, 65, 0.5), rgba(153, 255, 204, 0.04) 70%);
  filter: blur(18px);
  animation: breathe 9s ease-in-out infinite;
}

.hero-pic-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero-txt {
  position: relative;
  z-index: 2;
  text-align: right;
  padding: 1rem 1.1rem 1.35rem;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.75rem;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.7;
}

.hero h1 {
  margin: 0.6rem 0 0;
  font-family: var(--pixel);
  font-size: clamp(1.25rem, 4.6vw, 2rem);
  line-height: 1.65;
  color: #f2fffa;
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
  word-break: break-word;
}

/* ---------- 正文块 ---------- */
.wrap section > div {
  background: var(--slab);
  border-radius: 10px;
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
  scroll-margin-top: 1rem;
  scroll-margin-bottom: 170px;
}

.wrap section > div:last-child {
  margin-bottom: 0;
}

div h2,
aside h2 {
  font-family: var(--pixel);
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--mint);
  margin: 0 0 0.5rem;
  word-break: break-word;
}

div h3 {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--acid);
  margin: 1.1rem 0 0.5rem;
}

hr {
  border: 0;
  height: 6px;
  margin: 0.2rem 0 1rem;
  opacity: 0.5;
  background-image: repeating-linear-gradient(90deg, var(--acid) 0 6px, transparent 6px 12px);
}

div p {
  margin: 0 0 0.85rem;
}

div ul,
div ol {
  margin: 0 0 0.9rem;
  padding-left: 1.15rem;
  list-style: square;
}

div ol {
  list-style: decimal;
}

li {
  margin: 0.25rem 0;
}

li::marker {
  color: var(--acid);
}

div a {
  color: var(--acid);
  text-underline-offset: 3px;
}

div blockquote {
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.9rem;
  border-left: 4px solid var(--acid);
  border-radius: 8px;
  background: rgba(0, 255, 65, 0.08);
}

div img {
  height: auto;
  border-radius: 10px;
}

div code {
  font-family: 'VT323', 'Courier New', monospace;
  background: rgba(0, 255, 65, 0.14);
  border-radius: 5px;
  padding: 0 0.3rem;
}

div table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

div th,
div td {
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px dotted rgba(153, 255, 204, 0.3);
}

/* ---------- 侧栏 ---------- */
.side {
  background: var(--slab2);
  border-radius: 10px;
  padding: 1rem;
  align-self: start;
}

@media (min-width: 900px) {
  .side {
    position: sticky;
    top: 1rem;
  }
}

.side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 0.35rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: rgba(0, 30, 60, 0.35);
  color: var(--paper);
  font-size: 1rem;
  line-height: 1.6;
  text-decoration: none;
}

.side li a:hover,
.side li a:focus-visible {
  background: rgba(0, 255, 65, 0.18);
  color: var(--acid);
}

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1140px;
  margin: 0 auto 1.2rem;
  padding: 0 0.85rem;
}

.foot-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 10px;
  background: var(--slab);
}

@media (min-width: 700px) {
  .foot-in {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.foot address {
  font-style: normal;
  font-family: var(--pixel);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--mint);
  word-break: break-word;
}

.foot ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.9rem;
  margin: 0;
  padding: 0;
}

.foot li a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 0;
  color: var(--paper);
  font-size: 1rem;
  text-decoration: none;
}

.foot li a:hover,
.foot li a:focus-visible {
  color: var(--acid);
}

.copy {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 1rem;
  color: rgba(217, 252, 239, 0.72);
}

/* ---------- 入场动效 ---------- */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.rv.in {
  opacity: 1;
  transform: none;
}

.rv2 {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.in .rv2 {
  opacity: 1;
  transform: none;
}

.in .rv2:nth-child(2) { transition-delay: 0.07s; }
.in .rv2:nth-child(3) { transition-delay: 0.14s; }
.in .rv2:nth-child(4) { transition-delay: 0.21s; }
.in .rv2:nth-child(5) { transition-delay: 0.28s; }
.in .rv2:nth-child(6) { transition-delay: 0.35s; }

/* ---------- 小屏 ---------- */
@media (max-width: 420px) {
  body {
    padding-bottom: 190px;
  }

  .wrap {
    padding: 0.7rem 0.65rem 1.6rem;
  }

  .hero {
    min-height: 38vh;
    border-radius: 10px 10px 34px 34px;
  }

  .hero-txt {
    padding: 0.8rem 0.85rem 1.1rem;
  }

  div h2,
  aside h2 {
    font-size: 1.02rem;
  }

  .foot {
    padding: 0 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .rv,
  .rv2 {
    opacity: 1;
    transform: none;
  }
}

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