@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --sea-950: #061317; --sea-900: #0b2025; --sea-800: #123139;
  --foam-100: #e8f1eb; --sand-200: #d8c9a7; --tide-400: #69c9c7;
  --coral-400: #d97762; --muted: rgba(232, 241, 235, 0.68);
  --line: rgba(232, 241, 235, 0.14); --content: 72rem;
}

/* 基础样式 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-width: 20rem;
  background: var(--sea-950); color: var(--foam-100);
  font: 1rem/1.7 "Inter", "Segoe UI", sans-serif;
}
a { color: inherit; }
button { font: inherit; }
::selection { background: var(--tide-400); color: var(--sea-950); }
:focus-visible { outline: 2px solid var(--tide-400); outline-offset: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* 导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 19, 23, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.nav-shell {
  width: min(calc(100% - 2rem), var(--content)); min-height: 4.5rem;
  margin: auto; display: flex; align-items: center;
  justify-content: space-between; gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--foam-100);
  text-decoration: none;
  font: 700 1.45rem/1 "Barlow Condensed", sans-serif;
  letter-spacing: 0.04em;
}
.brand-mark {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 1px solid var(--tide-400); border-radius: 50%; color: var(--tide-400);
}
.brand-mark::before { content: "⌁"; font-size: 1.45rem; transform: rotate(-8deg); }
.desktop-nav { display: flex; align-items: center; gap: 1.6rem; }
.desktop-nav a,
.mobile-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}
.desktop-nav a:hover,
.desktop-nav a[aria-current="page"],
.mobile-links a:hover,
.mobile-links a[aria-current="page"] { color: var(--tide-400); }
.nav-cta {
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(105, 201, 199, 0.45);
  border-radius: 999px;
}
.mobile-menu { display: none; }

/* 通用排版 */
.page-width { width: min(calc(100% - 2rem), var(--content)); margin-inline: auto; }
h1, h2, h3 {
  margin: 0;
  color: var(--foam-100);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  line-height: 1.03;
}
h1 { font-size: clamp(3rem, 7vw, 6.8rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.45rem; }
p { margin: 0; }
.kicker { color: var(--sand-200); font-size: 0.82rem; font-weight: 600; }
.lede { max-width: 42rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.section-head p { max-width: 32rem; color: var(--muted); font-size: 0.92rem; }
.text-link { color: var(--tide-400); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 0.28em; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--tide-400);
  border-radius: 0.25rem;
  background: var(--tide-400);
  color: var(--sea-950);
  font-weight: 700;
  text-decoration: none;
}
.button.secondary { background: transparent; color: var(--foam-100); border-color: var(--line); }
.button:hover { filter: brightness(1.08); }

/* 首页 */
.hero {
  position: relative;
  min-height: min(48rem, calc(100vh - 4.5rem));
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 18%, rgba(105, 201, 199, 0.16), transparent 19rem),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(255, 255, 255, 0.018) 32px),
    linear-gradient(180deg, #07171c 0%, #0a242a 70%, #061317 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  opacity: 0.55;
  background: repeating-radial-gradient(ellipse at 76% 0, transparent 0 29px, rgba(105, 201, 199, 0.1) 30px, transparent 31px 55px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  padding-block: 5rem;
}
.hero-copy { display: grid; gap: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-chart {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--tide-400);
  border: 1px solid rgba(105, 201, 199, 0.28);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(105, 201, 199, 0.08), transparent 63%);
}
.hero-chart::before,
.hero-chart::after { content: ""; position: absolute; border: 1px solid rgba(105, 201, 199, 0.15); border-radius: 50%; }
.hero-chart::before { inset: 14%; }
.hero-chart::after { inset: 31%; }
.hero-chart svg { width: 58%; height: 58%; }
.chart-note { position: absolute; bottom: 13%; font-size: 0.7rem; color: var(--muted); }
.signal-list { border-top: 1px solid var(--line); }
.code-row {
  display: grid;
  grid-template-columns: minmax(9rem, 0.7fr) 1.5fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.code-row code { color: var(--sand-200); font-size: 1rem; font-weight: 700; }
.code-reward { color: var(--muted); font-size: 0.9rem; }
.copy-button {
  min-width: 5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(105, 201, 199, 0.5);
  border-radius: 0.2rem;
  background: transparent;
  color: var(--tide-400);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}
.copy-button:hover,
.copy-button.is-copied { background: var(--tide-400); color: var(--sea-950); }
.guide-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4rem; }
.guide-link {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.guide-link h3 { transition: color 150ms ease; }
.guide-link p { color: var(--muted); font-size: 0.9rem; }
.guide-link span { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--tide-400); }
.guide-link:hover h3 { color: var(--tide-400); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 1.25rem 2rem 1.25rem 0; cursor: pointer; font-weight: 600; }
.faq-list details p { max-width: 52rem; padding: 0 0 1.25rem; color: var(--muted); font-size: 0.92rem; }

/* 内容页 */
.guide-hero {
  padding: clamp(4rem, 9vw, 8rem) 0 3rem;
  background:
    linear-gradient(rgba(105, 201, 199, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 201, 199, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb { margin-bottom: 1.5rem; color: var(--tide-400); font-size: 0.78rem; }
.breadcrumb a { text-decoration: none; }
.guide-hero h1 { max-width: 58rem; font-size: clamp(3rem, 6vw, 5.7rem); }
.guide-hero .lede { margin-top: 1.3rem; }
.guide-layout {
  display: grid;
  grid-template-columns: 13rem minmax(0, 48rem);
  gap: clamp(2.5rem, 7vw, 6rem);
  justify-content: center;
  padding-block: clamp(3rem, 7vw, 6rem);
}
.toc { position: sticky; top: 6.5rem; align-self: start; padding-left: 1rem; border-left: 1px solid rgba(105, 201, 199, 0.35); }
.toc p { margin-bottom: 0.7rem; color: var(--sand-200); font-size: 0.78rem; font-weight: 700; }
.toc a { display: block; padding: 0.25rem 0; color: var(--muted); font-size: 0.83rem; text-decoration: none; }
.toc a:hover { color: var(--tide-400); }
.article { min-width: 0; }
.article section + section { margin-top: 4rem; }
.article h2 { margin-bottom: 1.4rem; font-size: clamp(2rem, 4vw, 2.7rem); }
.article h3 { margin-bottom: 0.45rem; }
.article p { color: var(--muted); }
.article strong { color: var(--foam-100); }
.table-scroll { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; min-width: 38rem; border-collapse: collapse; text-align: left; }
th, td { padding: 0.9rem 0.75rem; border-bottom: 1px solid var(--line); }
th { color: var(--sand-200); font-size: 0.74rem; font-weight: 700; }
td { color: var(--muted); font-size: 0.88rem; }
td strong, td code { color: var(--foam-100); }
.tier { display: inline-block; min-width: 2.2rem; color: var(--sand-200); font-weight: 700; }
.progress-list { border-top: 1px solid var(--line); }
.progress-step { display: grid; grid-template-columns: 7rem 1fr; gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.progress-step span { color: var(--tide-400); font-size: 0.78rem; font-weight: 700; }
.region-entry { position: relative; padding: 2rem 0; border-top: 1px solid var(--line); overflow: hidden; }
.region-entry:last-child { border-bottom: 1px solid var(--line); }
.region-entry h3, .region-entry p, .region-entry .meta { position: relative; z-index: 1; }
.region-number { position: absolute; right: 0; top: -1.2rem; color: var(--foam-100); font: 700 7rem/1 "Barlow Condensed"; opacity: 0.055; }
.meta { margin-top: 0.8rem; color: var(--sand-200); font-size: 0.76rem; font-weight: 700; }
.enchant-list { border-top: 1px solid var(--line); }
.enchant-entry { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.enchant-entry .rank { color: var(--sand-200); font-size: 0.78rem; font-weight: 700; }
.expired-list { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.expired-list code { padding: 0.25rem 0.55rem; border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }

/* 页脚 */
.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.76rem; }
.footer-shell { display: flex; justify-content: space-between; gap: 2rem; }

@media (max-width: 760px) {
  .desktop-nav { display: none; }
  .mobile-menu { position: relative; display: block; }
  .mobile-menu summary { cursor: pointer; color: var(--foam-100); font-size: 0.82rem; font-weight: 700; list-style: none; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-links {
    position: absolute;
    top: 2.25rem;
    right: 0;
    width: min(17rem, calc(100vw - 2rem));
    display: grid;
    padding: 0.7rem 1rem;
    background: var(--sea-900);
    border: 1px solid var(--line);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
  }
  .mobile-links a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .mobile-links a:last-child { border-bottom: 0; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; padding-block: 4rem; }
  .hero-chart { width: min(70vw, 18rem); margin: auto; }
  .section-head, .footer-shell { align-items: start; flex-direction: column; }
  .guide-index { grid-template-columns: 1fr; }
  .guide-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .code-row { grid-template-columns: 1fr auto; }
  .code-reward { grid-column: 1 / -1; grid-row: 2; }
  .copy-button { grid-column: 2; grid-row: 1; }
  .progress-step, .enchant-entry { grid-template-columns: 1fr; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
