@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #06080c;
  --bg-2: #0c1018;
  --bg-3: #121826;
  --ink: #e8eefc;
  --muted: #7d8ba6;
  --line: rgba(125, 211, 252, 0.14);
  --cyan: #5eead4;
  --cyan-2: #99f6e4;
  --violet: #8b7cff;
  --danger: #fb7185;
  --ok: #4ade80;
  --glow: 0 0 40px rgba(94, 234, 212, 0.12);
  font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100%; }
body {
  background-image:
    radial-gradient(1200px 500px at 80% -10%, rgba(139, 124, 255, 0.18), transparent 55%),
    radial-gradient(900px 400px at -10% 0%, rgba(94, 234, 212, 0.12), transparent 50%),
    linear-gradient(180deg, #06080c 0%, #080b12 100%);
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-2); }
button, input, select { font: inherit; color: inherit; }

.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 8, 12, 0.78);
  backdrop-filter: blur(16px);
}
.nav-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.home-link { color: var(--cyan); font-size: 13px; font-weight: 600; white-space: nowrap; padding-right: 18px; border-right: 1px solid var(--line); }
.home-link:hover { color: var(--cyan-2); text-decoration: none; }
.wordmark {
  display: flex; align-items: baseline; gap: 10px;
  font-weight: 600; letter-spacing: 0.08em;
}
.wordmark { align-items: center; }
.brand-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid var(--cyan); }
.avatar-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cyan); background: var(--bg-3); }
.wordmark b { color: var(--cyan); font-family: "IBM Plex Mono", monospace; font-weight: 500; }
.wordmark small { color: var(--muted); letter-spacing: 0.18em; font-size: 11px; text-transform: uppercase; }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.period-global { display: flex; align-items: center; gap: 8px; }
.period-global-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-family: "IBM Plex Mono", monospace;
}
.period-global-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 16, 28, 0.7);
}
.period-global-switch button {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.period-global-switch button.active {
  color: #04201a;
  background: var(--cyan);
  font-weight: 600;
}
.analysis {
  margin: 0 0 22px;
  padding: 18px 18px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.9), rgba(8, 11, 18, 0.9));
}
.analysis-head p { color: var(--muted); margin: 6px 0; line-height: 1.6; max-width: none; }
.analysis-head .suitable { color: #c4b5fd; }
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 8px;
}
@media (max-width: 1080px) { .analysis-grid { grid-template-columns: 1fr 1fr; } }
.analysis-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(6, 8, 12, 0.45);
}
.analysis-grid h3 { margin: 0 0 6px; font-size: 13px; color: var(--cyan-2); }
.analysis-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn.primary {
  background: var(--cyan);
  color: #04201a;
  border-color: var(--cyan);
  font-weight: 600;
  box-shadow: var(--glow);
}
.btn.ghost { color: var(--muted); }

.hero {
  padding: 36px 28px 8px;
  max-width: 1180px;
  margin: 0 auto;
}
.kicker {
  font-family: "IBM Plex Mono", monospace;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero h1 span { color: var(--violet); }
.hero h1.industry-hero {
  text-align: center;
  letter-spacing: 0.16em;
  color: var(--cyan-2);
  text-shadow: 0 0 28px rgba(94, 234, 212, 0.4);
}
.hero:has(.industry-hero) { text-align: center; }
.hero:has(.industry-hero) p { margin: 0 auto; }
.hero p { margin: 0; color: var(--muted); max-width: 560px; line-height: 1.6; }

.section-head {
  margin: 28px 0 12px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  font-family: "IBM Plex Mono", monospace;
  text-align: center;
}
.section-head.accent { color: #c4b5fd; }
.horizon-grid { margin-top: 4px; }
.col.horizon {
  border-color: rgba(139, 124, 255, 0.28);
  background: linear-gradient(180deg, rgba(28, 22, 48, 0.92), rgba(8, 11, 18, 0.92));
}
.col.horizon .col-head {
  background: radial-gradient(80% 120% at 50% 0%, rgba(139, 124, 255, 0.18), transparent 70%);
  border-bottom-color: rgba(139, 124, 255, 0.28);
}
.col.horizon .col-head h2 {
  background: linear-gradient(180deg, #f5f3ff 0%, #c4b5fd 50%, #5eead4 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 18px 28px 80px; }
.meta {
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  overflow: visible;
}
@media (max-width: 1080px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }

.col {
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.9), rgba(8, 11, 18, 0.92));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 14px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}
.col-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 14px 8px 12px;
  margin: -4px -4px 4px;
  border-bottom: 1px solid rgba(94, 234, 212, 0.22);
  background: radial-gradient(80% 120% at 50% 0%, rgba(94, 234, 212, 0.12), transparent 70%);
}
.col-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  background: linear-gradient(180deg, #ecfeff 0%, #5eead4 55%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(94, 234, 212, 0.4));
}
.col-head em {
  font-style: normal;
  color: #c4b5fd;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  border: 1px solid rgba(139, 124, 255, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
}
.blurb { color: var(--muted); font-size: 12px; margin: 8px 0 12px; text-align: center; }
.headlines { list-style: none; margin: 0; padding: 0; flex: 1; }
.headlines li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.rank {
  font-family: "IBM Plex Mono", monospace;
  color: var(--violet);
  font-size: 12px;
  padding-top: 2px;
}
.headlines a { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.45; font-weight: 500; }
.headlines a:hover { color: var(--cyan); }
.headline-link { cursor: pointer; }
#news-tip {
  position: fixed;
  z-index: 80;
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 12px;
  background: #0b1220;
  border: 1px solid rgba(94, 234, 212, 0.35);
  color: #d7e3f7;
  font-size: 12px;
  line-height: 1.55;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
#news-tip.show {
  opacity: 1;
  transform: none;
}
#news-tip p { margin: 0; }
#news-tip .tip-brief {
  color: #eaf4ff;
  font-size: 13px;
  font-weight: 600;
}
#news-tip .tip-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(94, 234, 212, 0.14);
  border: 1px solid rgba(94, 234, 212, 0.35);
  color: var(--cyan-2, #5eead4);
  font-size: 11px;
  font-weight: 700;
}
#news-tip .tip-key {
  margin-top: 8px;
  color: #ffd479;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}
#news-tip .tip-title {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #b6c6dd;
  font-weight: 400;
}
#news-tip .tip-meta {
  margin-top: 6px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}
#news-tip .tip-sum {
  margin-top: 8px;
  color: var(--muted);
}
.when { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; font-family: "IBM Plex Mono", monospace; }
.headline-why {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  font-weight: 400;
}
.story .headline-why { margin-top: 4px; }
.more { margin-top: 12px; font-size: 12px; color: var(--cyan); }

.feed { display: flex; flex-direction: column; gap: 10px; }
.story {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 16, 24, 0.8);
}
.idx { font-family: "IBM Plex Mono", monospace; color: var(--violet); font-size: 13px; padding-top: 2px; }
.story h3 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.story h3 a { color: var(--ink); }
.teaser { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }
.stamp { color: var(--muted); font-size: 11px; font-family: "IBM Plex Mono", monospace; white-space: nowrap; }

.drawer-back {
  position: fixed; inset: 0; background: rgba(2, 4, 8, 0.62);
  opacity: 0; pointer-events: none; transition: 0.2s ease;
  z-index: 30;
}
.drawer-back.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; right: 16px; top: 72px; width: min(420px, calc(100vw - 24px));
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  transform: translateY(-8px);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.2s ease;
  z-index: 31;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), var(--glow);
}
.drawer.open { visibility: visible; pointer-events: auto; transform: none; }
.drawer h2 { margin: 0 0 4px; font-size: 18px; }
.drawer .lead { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.sub-form { display: grid; gap: 8px; }
.sub-form input, .sub-form select {
  background: #080b12;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  outline: none;
}
.sub-form input:focus, .sub-form select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.15);
}
/* 去掉浏览器对 password/自动填充的橙黄色原生轮廓，避免被误认为报错 */
.sub-form input:-webkit-autofill,
.sub-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e6edf7;
  -webkit-box-shadow: 0 0 0 1000px #080b12 inset;
  caret-color: #e6edf7;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  cursor: pointer;
}
.chips input { display: none; }
.chips label:has(input:checked) { color: #04201a; background: var(--cyan); border-color: var(--cyan); }
.chip-select-all {
  font-size: 12px; border: 1px dashed var(--cyan); border-radius: 999px;
  padding: 4px 10px; color: var(--cyan); background: transparent; cursor: pointer;
}
.chip-select-all:hover { background: color-mix(in srgb, var(--cyan) 14%, transparent); }
.chip-select-all.active { border-style: solid; }
.flash { font-size: 12px; min-height: 1.2em; color: var(--ok); }
.flash.err { color: var(--danger); }
.hint { color: var(--muted); font-size: 11px; line-height: 1.45; margin: 8px 0 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cb-url { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; }
.cb-url .hint { grid-column: 1 / -1; margin: 0; }
.cb-url code {
  background: #080b12; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; color: var(--cyan); word-break: break-all;
}
.diag-box {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  margin: 0 0 16px; font-size: 12px; line-height: 1.7; max-width: 560px;
}
.diag-box.ok { border-color: rgba(94,234,212,.4); background: rgba(94,234,212,.06); }
.diag-box.err { border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.06); color: var(--danger); }
.guide { border-top: 1px solid var(--line); padding-top: 8px; }
.guide h3 { font-size: 14px; margin: 4px 0; }
.qr-box { text-align: center; background: #fff; color: #0b1220; border-radius: 16px; padding: 12px; margin: 0 0 12px; min-height: 160px; }
.qr-box img { width: 180px; height: 180px; display: block; margin: 0 auto; }
.hint-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.qr-box .hint { color: #334155; }
.qr-box .hint a { color: #0f766e; }
.qr-box .hint, .qr-box .flash { color: #334155; }
.qr-error { text-align: center; }
.qr-error > b { display: block; font-size: 14px; margin: 8px 0 10px; color: #9a3412; }
.qr-error .hint { margin: 0 auto 14px; max-width: 320px; line-height: 1.7; }
.qr-error-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr-error-actions .btn { display: inline-block; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 12px; cursor: pointer; text-decoration: none; }
.qr-error-actions .btn.primary { background: #0f766e; border-color: #0f766e; color: #fff; text-decoration: none; }
.advanced { margin-top: 12px; color: var(--muted); font-size: 12px; }
.advanced summary { cursor: pointer; margin-bottom: 8px; }

.admin { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin aside {
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  background: rgba(8, 11, 18, 0.8);
}
.admin aside a, .admin aside button.link {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: var(--muted);
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.admin aside a.active, .admin aside a:hover { color: var(--ink); background: var(--bg-3); }
.admin main { padding: 28px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 24px; }
.stat {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background: var(--bg-2);
}
.stat b { display: block; font-size: 22px; color: var(--cyan); }
.stat span { color: var(--muted); font-size: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; }
.sub-count { color: var(--cyan); font-size: 18px; font-family: "IBM Plex Mono", monospace; margin-left: 8px; }
.sub-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.sub-toolbar input[type="search"] {
  flex: 1; min-width: 220px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font-size: 13px;
  font-family: inherit; outline: none;
}
.sub-toolbar input[type="search"]:focus { border-color: var(--cyan); }
.sub-toolbar input[type="search"]::placeholder { color: var(--muted); }
.sub-empty { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.tag-bound { color: var(--ok); border: 1px solid var(--ok); border-radius: 999px; padding: 2px 8px; font-size: 11px; }
.btn-danger {
  border: 1px solid var(--danger); background: transparent; color: var(--danger);
  padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 12px; font-family: inherit;
}
.btn-danger:hover { background: var(--danger); color: #1a0508; }
.login-box {
  max-width: 360px; margin: 18vh auto; padding: 24px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2);
}
.login-box h1 { margin: 0 0 8px; font-size: 22px; }
.log { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--muted); white-space: pre-wrap; }
.crawl-progress {
  max-width: 720px;
  margin: 12px 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
}
.crawl-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
}
.crawl-progress-top b {
  font-family: "IBM Plex Mono", monospace;
  color: var(--cyan);
}
.crawl-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.12);
  overflow: hidden;
}
.crawl-progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 0.35s ease;
}
.crawl-log {
  max-width: 720px;
  max-height: 360px;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #070b12;
  color: #9fb0cc;
  line-height: 1.55;
}
.mod-card, .kw-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--bg-2);
  display: grid;
  gap: 8px;
}
.mod-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.mod-card input, .mod-card select, .kw-card input, textarea {
  background: #080b12;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  color: inherit;
  width: 100%;
}
.mod-actions { display: flex; gap: 8px; }
.kw-card label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
code { color: var(--violet); font-size: 11px; }
.hidden { display: none !important; }
@media (max-width: 800px) {
  .admin { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .story { grid-template-columns: 40px 1fr; }
  .stamp { grid-column: 2; }
}
