/* apeiria.online — shared styles */
:root {
  --bg: #06070b;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-hover: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e9edf5;
  --muted: #97a0b3;
  --teal: #5eead4;
  --violet: #a78bfa;
  --pink: #f472b6;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* soft aurora background */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 48vw; height: 48vw;
  left: -14vw; top: -18vw;
  background: radial-gradient(circle, #0f766e 0%, transparent 62%);
}
body::after {
  width: 44vw; height: 44vw;
  right: -12vw; bottom: -20vw;
  background: radial-gradient(circle, #4c1d95 0%, transparent 62%);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 34px 22px 64px;
}

/* ---------- top bar ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 58px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand .mark {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  color: #06070b;
  font-size: 15px;
  font-weight: 800;
}
.brand .muted { color: var(--muted); font-weight: 500; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--panel);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- hero ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 16px;
  font-weight: 600;
}
h1 {
  font-size: clamp(34px, 6.2vw, 58px);
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  font-weight: 720;
}
.grad {
  background: linear-gradient(100deg, var(--teal), var(--violet) 55%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--muted);
  font-size: clamp(15px, 2.1vw, 17px);
  max-width: 620px;
  margin: 0 0 12px;
}

/* ---------- cards ---------- */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 46px 0 18px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: block;
  padding: 24px 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease,
    background 0.22s ease, box-shadow 0.22s ease;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%),
    rgba(94, 234, 212, 0.1), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 234, 212, 0.32);
  background: var(--panel-hover);
  box-shadow: 0 22px 60px -28px rgba(94, 234, 212, 0.35);
}
.card:hover::after { opacity: 1; }

.icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(94, 234, 212, 0.14), rgba(167, 139, 250, 0.14));
  color: var(--teal);
}
.icon svg { width: 24px; height: 24px; }

.card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}
.tag {
  font-size: 12px;
  color: #b9c2d4;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.03);
}
.go {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal);
}
.go svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.card:hover .go svg { transform: translateX(4px); }

/* ---------- panels / rows ---------- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px 24px;
  margin: 18px 0;
}
.panel h2 {
  font-size: 16px;
  margin: 0 0 4px;
  letter-spacing: 0.01em;
}
.panel .sub {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 14px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: color 0.18s ease;
}
.row:first-of-type { border-top: 0; }
.row:hover { color: var(--teal); }
.row .r-title { font-size: 14.5px; font-weight: 600; }
.row .r-desc { font-size: 12.5px; color: var(--muted); }
.row .r-go { color: var(--muted); font-size: 18px; transition: transform 0.18s ease; }
.row:hover .r-go { color: var(--teal); transform: translateX(3px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease,
    background 0.18s ease;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.08);
}
.btn.primary {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.9), rgba(167, 139, 250, 0.9));
  color: #06070b;
  border: 0;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn svg { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- key/value ---------- */
.kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.kv td {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.kv tr:first-child td { border-top: 0; }
.kv td:first-child {
  color: var(--muted);
  width: 130px;
  padding-right: 16px;
  white-space: nowrap;
}
.kv code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: #cfe9e4;
  background: rgba(94, 234, 212, 0.06);
  border: 1px solid rgba(94, 234, 212, 0.14);
  padding: 1px 6px;
  border-radius: 6px;
  word-break: break-all;
}

.note {
  font-size: 12.8px;
  color: var(--muted);
  border-left: 2px solid rgba(167, 139, 250, 0.5);
  padding: 2px 0 2px 14px;
  margin-top: 16px;
  overflow-wrap: break-word;  /* only break tokens wider than the line */
}
.note strong { color: var(--text); }

ol.steps {
  margin: 6px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13.8px;
}
ol.steps li { margin: 7px 0; }
ol.steps strong { color: var(--text); }

/* ---------- breadcrumb ---------- */
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 26px;
  transition: color 0.18s ease;
}
.crumb:hover { color: var(--teal); }
.crumb svg { width: 15px; height: 15px; }

footer {
  margin-top: 54px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #6f788c;
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
footer a { color: #8d97ab; text-decoration: none; }
footer a:hover { color: var(--teal); }

/* ---------- 登录 / 后台 ---------- */
.muted { color: var(--muted); }
.lock {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f9a8d4;
  background: rgba(244, 114, 182, 0.12);
  border: 1px solid rgba(244, 114, 182, 0.3);
  border-radius: 999px;
  padding: 1px 8px;
  vertical-align: 2px;
  margin-left: 6px;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.navlink {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.navlink:hover { color: var(--teal); border-color: rgba(94, 234, 212, 0.4); text-decoration: none; }
.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn.small { padding: 6px 14px; font-size: 12.5px; border-radius: 999px; }
.btn.wide { width: 100%; justify-content: center; margin-top: 4px; }

.login-wrap { max-width: 430px; min-height: 100vh; display: flex; flex-direction: column; }
.login-card { padding: 26px; margin: auto 0; }
.login-card h2 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: 8px; }
.login-wrap footer { margin-top: auto; }
.form { display: grid; gap: 14px; margin-top: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 12.5px; color: var(--muted); }
.input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
}
.input:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}
.alert {
  display: none;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(244, 114, 182, 0.35);
  background: rgba(244, 114, 182, 0.08);
  color: #ffd7e6;
}
.alert.show { display: block; }
.hint { margin-top: 18px; font-size: 12.5px; color: #6f788c; }

@media (max-width: 640px) {
  .wrap { padding: 26px 16px 48px; }
  .nav { margin-bottom: 40px; }
  .status { display: none; }
  .card { padding: 20px; }
  footer { flex-direction: column; }
  .kv td:first-child { width: 96px; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

code.tap { cursor: pointer; border-bottom: 1px dashed rgba(94,234,212,.45); }
code.tap:hover { background: rgba(94,234,212,.14); }
code.tap.tapped { color: var(--teal); }
