/* 太虚问道 — 官网样式 */
:root {
  --bg: #0a0e14;
  --bg2: #10161f;
  --panel: #141c27;
  --line: #1e2a38;
  --ink: #e6e8ec;
  --muted: #8b96a8;
  --cyan: #00d4aa;
  --cyan-dim: #0a8f72;
  --gold: #e6b84d;
  --red: #f07178;
  --radius: 10px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Cascadia Code", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre {
  font-family: var(--mono);
}

.wrap {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.logo span {
  color: var(--cyan);
}

.logo .ver {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 0.4rem;
  font-weight: 500;
  letter-spacing: 0;
}

.nav nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.92rem;
}

.nav nav a {
  color: var(--muted);
}

.nav nav a:hover {
  color: var(--cyan);
  text-decoration: none;
}

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.5rem;
  padding: 4rem 0 3rem;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cyan-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.lead {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}

.hero-copy {
  min-width: 0;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--cyan);
  color: #04140f;
}

.btn.primary:hover {
  filter: brightness(1.08);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn.ghost:hover {
  border-color: var(--cyan-dim);
  color: var(--cyan);
}

.cmd-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.65rem 0.9rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.cmd-line code {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--cyan);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.cmd-line .copy {
  flex: 0 0 auto;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

.cmd-line:hover .copy {
  color: var(--cyan);
  border-color: var(--cyan-dim);
}

/* terminal preview */
.term {
  display: grid;
  grid-template-columns: 1fr 140px;
  grid-template-rows: auto 1fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.35);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.term-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: #0d131b;
  border-bottom: 1px solid var(--line);
}

.term-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a4554;
}

.term-bar span:nth-child(1) {
  background: #f07178;
}

.term-bar span:nth-child(2) {
  background: #e6b84d;
}

.term-bar span:nth-child(3) {
  background: #5dd88a;
}

.term-bar em {
  margin-left: 0.5rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.72rem;
}

.term-body {
  padding: 0.65rem 0.75rem;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.t-line {
  margin-bottom: 0.28rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-line.dim,
.ts {
  color: var(--muted);
}

.mod.battle {
  color: var(--red);
}

.mod.adv {
  color: #5dd88a;
}

.mod.brk {
  color: #b07cff;
}

.term-panel {
  padding: 0.75rem 0.6rem;
  background: #0f1620;
  font-size: 0.68rem;
  color: var(--muted);
}

.p-name {
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.p-k {
  margin-bottom: 0.35rem;
}

.p-k b {
  color: var(--gold);
}

.bar {
  height: 6px;
  background: #1a2432;
  border-radius: 3px;
  margin: 0.35rem 0 0.75rem;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
}

/* sections */
.section {
  padding: 3rem 0 1rem;
}

.section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  letter-spacing: 0.02em;
}

.sub {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.grid.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cards article {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}

.cards h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  color: var(--cyan);
}

.cards p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* quality */
.q-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.q-list li {
  padding: 0.55rem 1rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.q-list li span {
  font-weight: 700;
  margin-right: 0.4rem;
}

.q-fan {
  color: #ccc;
}

.q-ling {
  color: #5dd88a;
}

.q-xuan {
  color: #5da9e9;
}

.q-di {
  color: #b07cff;
}

.q-tian {
  color: #e6b84d;
}

.q-xian {
  color: #f07178;
}

/* install steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.9rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.step > b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--cyan) 18%, transparent);
  color: var(--cyan);
  font-family: var(--mono);
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.step pre,
.panel-code {
  margin: 0.5rem 0;
  padding: 0.85rem 1rem;
  background: #0b1118;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #c8d0dc;
}

.step p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* table */
.cmd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.cmd-table th,
.cmd-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.cmd-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.cmd-table code {
  color: var(--cyan);
  background: var(--bg2);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* footer */
.footer {
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer .dim {
  opacity: 0.75;
  margin: 0.25rem 0 0;
}

.footer p {
  margin: 0;
}

/* responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
  }

  .grid.cards {
    grid-template-columns: 1fr 1fr;
  }

  .term {
    min-height: 260px;
  }
}

@media (max-width: 600px) {
  .nav nav {
    gap: 0.65rem;
    font-size: 0.8rem;
  }

  .grid.cards {
    grid-template-columns: 1fr;
  }

  .term {
    grid-template-columns: 1fr;
  }

  .term-body {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .term-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem 0.5rem;
  }
}
