:root {
  --bg: #060a12;
  --bg-soft: #0a101c;
  --panel: #0d1524;
  --panel-2: #111b2e;
  --line: #1b2a42;
  --line-2: #24374f;
  --text: #b9c8dd;
  --text-dim: #71869f;
  --cyan: #00e5ff;
  --green: #00ff9d;
  --amber: #ffb454;
  --red: #ff5c7a;
  --purple: #a97cff;
  --blue: #4da3ff;
  --nav-h: 64px;
  --radius: 10px;
  --mono: Consolas, Menlo, Monaco, "Courier New", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", monospace;
  --display: var(--body);
  --body: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.05) 3px,
    rgba(0, 0, 0, 0.05) 4px
  );
  opacity: 0.3;
}

::selection { background: rgba(0, 229, 255, 0.35); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: #1c2f4a;
  border-radius: 6px;
  border: 2px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover { background: #2a4668; }

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: #7df2ff; }

img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.mono { font-family: var(--mono); }

.page-head {
  position: relative;
  padding: 130px 0 46px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.05), transparent 70%);
}

.page-head h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
}

.page-head .page-sub {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-dim);
}

.page-head .page-sub .mono { color: var(--cyan); }

/* ========== 顶部导航 ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(6, 10, 18, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: -1px;
  height: 1px;
  background: rgba(0, 229, 255, 0.7);
  border-radius: 1px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.nav-logo:hover { color: #fff; }

.nav-logo .logo-icon {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #04121a;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.5);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 229, 255, 0.45); }
  50% { box-shadow: 0 0 22px rgba(0, 255, 157, 0.7); }
}

.nav-logo .logo-en {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: var(--green);
  line-height: 1;
  margin-top: 2px;
}

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }

.nav-link {
  position: relative;
  display: inline-block;
  color: var(--text-dim);
  padding: 8px 13px;
  font-size: 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--body);
}

.nav-link:hover { color: #fff; background: rgba(0, 229, 255, 0.07); }

.nav-link.active { color: var(--cyan); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 2px;
  height: 2px;
  background: rgba(0, 229, 255, 0.9);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan);
}

.nav-drop { position: relative; }

.nav-search-box { position: relative; }

.nav-search-box input {
  width: 200px;
  height: 36px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 34px 0 14px;
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s, width 0.25s;
}

.nav-search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12), 0 0 14px rgba(0, 229, 255, 0.15);
  width: 250px;
}

.nav-search-box button {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 8px;
  font-size: 13px;
}

.nav-search-box button:hover { color: var(--cyan); }

.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  width: 40px; height: 36px;
  cursor: pointer;
  font-size: 15px;
  margin-left: auto;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(6, 10, 18, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px 20px;
  z-index: 999;
  flex-direction: column;
  gap: 2px;
}

.nav-mobile.open { display: flex; }

.nav-mobile .nav-link {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 10px;
  font-size: 15px;
  line-height: 1;
}
.nav-mobile .nav-link.active::after { display: none; }

.nav-mobile-search { display: flex; gap: 8px; margin-top: 10px; }
.nav-mobile-search input {
  flex: 1;
  height: 38px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  font-family: var(--mono);
  outline: none;
}
.nav-mobile-search input:focus { border-color: var(--cyan); }
/* ========== 通用区块 ========== */
.section { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.section-title .bar {
  width: 4px; height: 26px;
  background: linear-gradient(to bottom, var(--cyan), var(--green));
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

.section-title .en {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
  font-weight: 400;
  margin-top: 6px;
  display: block;
}

.section-more {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
}

.section-more:hover { color: var(--cyan); }

/* ========== 按钮与徽章 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--line-2);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--body);
}

.btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.18);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.14), rgba(0, 255, 157, 0.14));
  border-color: rgba(0, 229, 255, 0.5);
  color: #eaffff;
}

.btn-primary:hover {
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.35);
  color: #fff;
}

.btn-sm { padding: 6px 14px; font-size: 12.5px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.5px;
  border: 1px solid var(--line-2);
  color: var(--text-dim);
  background: rgba(27, 42, 66, 0.4);
  white-space: nowrap;
}

.badge-cyan { color: var(--cyan); border-color: rgba(0, 229, 255, 0.4); background: rgba(0, 229, 255, 0.07); }
.badge-green { color: var(--green); border-color: rgba(0, 255, 157, 0.4); background: rgba(0, 255, 157, 0.07); }
.badge-amber { color: var(--amber); border-color: rgba(255, 180, 84, 0.4); background: rgba(255, 180, 84, 0.07); }
.badge-red { color: var(--red); border-color: rgba(255, 92, 122, 0.4); background: rgba(255, 92, 122, 0.07); }
.badge-purple { color: var(--purple); border-color: rgba(169, 124, 255, 0.4); background: rgba(169, 124, 255, 0.07); }
.badge-blue { color: var(--blue); border-color: rgba(77, 163, 255, 0.4); background: rgba(77, 163, 255, 0.07); }

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(27, 42, 66, 0.5);
  border: 1px solid var(--line);
  transition: all 0.2s;
}

a.chip:hover { color: var(--cyan); border-color: var(--cyan); }

/* ========== 卡片 ========== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(160deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--green), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 229, 255, 0.08);
  color: var(--text);
}

.article-card:hover::before { opacity: 1; }

.article-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.article-card .card-cat {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1px;
  color: var(--cyan);
}

.article-card .card-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

.article-card h3 {
  font-size: 16.5px;
  line-height: 1.55;
  color: #fff;
  font-weight: 600;
}

.article-card .card-summary {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.article-card .card-meta i { color: var(--text-dim); }

.card-corner {
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--cyan);
  opacity: 0;
  transition: opacity 0.25s;
}

.card-corner.tl { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.card-corner.br { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }
.article-card:hover .card-corner { opacity: 0.9; }

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(165deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}

.cat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.45);
  color: var(--text);
}

.cat-card .cat-icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 19px;
  background: rgba(0, 229, 255, 0.09);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--cyan);
  transition: all 0.25s;
}

.cat-card:hover .cat-icon {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(0, 255, 157, 0.25));
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
  color: #fff;
}

.cat-card h3 { font-size: 16px; color: #fff; font-weight: 600; }
.cat-card .cat-desc { font-size: 13px; color: var(--text-dim); line-height: 1.7; }
.cat-card .cat-count { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); margin-top: auto; padding-top: 6px; }
/* ========== Hero ========== */
.hero {
  position: relative;
  padding: 165px 0 90px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -220px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 520px;
  background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.14) 0%, rgba(0, 255, 157, 0.05) 40%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--green);
  border: 1px solid rgba(0, 255, 157, 0.35);
  background: rgba(0, 255, 157, 0.06);
  padding: 7px 18px;
  border-radius: 40px;
  margin-bottom: 26px;
}

.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.4s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

.hero-title {
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  line-height: 1.25;
  text-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
}

.hero-title .grad {
  background: linear-gradient(90deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.9;
}

.hero-tags {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.hero-tags span::before { content: "> "; color: var(--green); }

.hero-search {
  margin: 32px auto 0;
  max-width: 560px;
  position: relative;
}

.hero-search input {
  width: 100%;
  height: 52px;
  background: rgba(13, 21, 36, 0.85);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0 56px 0 20px;
  color: #fff;
  font-family: var(--mono);
  font-size: 14.5px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.hero-search input::placeholder { color: #44576e; }

.hero-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.1), 0 0 26px rgba(0, 229, 255, 0.2);
}

.hero-search button {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #04121a;
  font-size: 15px;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.hero-search button:hover { box-shadow: 0 0 18px rgba(0, 229, 255, 0.5); }

.hero-stats {
  margin: 44px auto 0;
  display: flex;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 21, 36, 0.6);
  backdrop-filter: blur(8px);
  overflow: hidden;
  max-width: 640px;
}

.hero-stats .stat {
  flex: 1;
  padding: 18px 10px;
  position: relative;
}

.hero-stats .stat + .stat::before {
  content: "";
  position: absolute;
  left: 0; top: 20%;
  height: 60%;
  width: 1px;
  background: var(--line);
}

.hero-stats .stat .num {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.5);
}

.hero-stats .stat .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ========== 分类 ========== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ========== 页脚 ========== */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 21, 36, 0.35), rgba(6, 10, 18, 0.9));
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.35;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 46px 20px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 36px;
}

.footer-col h4 {
  font-size: 13.5px;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-col h4::before {
  content: "";
  width: 3px; height: 14px;
  background: var(--cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.footer-col .f-intro { font-size: 13px; color: var(--text-dim); line-height: 1.9; }
.footer-col .f-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col .f-links a {
  font-size: 13px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-col .f-links a::before { content: "\f105"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 10px; color: var(--text-dim); transition: all 0.2s; }
.footer-col .f-links a:hover { color: var(--cyan); }
.footer-col .f-links a:hover::before { color: var(--cyan); transform: translateX(3px); }

.footer-col .f-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0 26px;
}

.footer-bottom .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.footer-copy { font-size: 12.5px; color: var(--text-dim); }
.footer-copy .mono { color: #55677f; }

.footer-beian { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }

.footer-beian a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.footer-beian a:hover { color: var(--cyan); }
.footer-beian a i { color: var(--text-dim); }
.footer-beian .icon-gwab { width: 16px; height: auto; display: inline-block; }

.footer-beian .beian-sep { color: var(--line-2); }

.footer-note { font-size: 12px; color: #4a5c73; }
/* ========== 文章列表页 ========== */
.search-bar {
  max-width: 720px;
  margin: -26px auto 0;
  position: relative;
  z-index: 5;
}

.search-bar input {
  width: 100%;
  height: 50px;
  background: rgba(13, 21, 36, 0.95);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0 52px 0 20px;
  color: #fff;
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  transition: border 0.2s, box-shadow 0.2s;
}

.search-bar input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.1), 0 10px 34px rgba(0, 0, 0, 0.5);
}

.search-bar i {
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 26px auto 0;
  max-width: 960px;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 30px;
  border: 1px solid var(--line-2);
  background: rgba(13, 21, 36, 0.5);
  color: var(--text-dim);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--body);
}

.cat-tab:hover { border-color: var(--cyan); color: var(--cyan); }

.cat-tab.on {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(0, 255, 157, 0.16));
  border-color: rgba(0, 229, 255, 0.6);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.18);
}

.cat-tab .cnt {
  font-family: var(--mono);
  font-size: 11px;
  color: inherit;
  opacity: 0.7;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.list-result { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); }
.list-result b { color: var(--cyan); font-weight: 600; }

.sort-btns { display: flex; gap: 8px; }

.sort-btn {
  padding: 5px 13px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: none;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.sort-btn.on { color: var(--green); border-color: rgba(0, 255, 157, 0.5); background: rgba(0, 255, 157, 0.07); }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  background: rgba(13, 21, 36, 0.35);
}

.empty-state .empty-icon {
  font-size: 42px;
  color: var(--line-2);
  margin-bottom: 14px;
}

.empty-state h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty-state p { color: var(--text-dim); font-size: 13px; }

mark { background: rgba(255, 180, 84, 0.28); color: #ffd9a0; border-radius: 3px; padding: 0 3px; }

/* ========== 文章详情页 ========== */
.article-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 36px;
  align-items: start;
}

.article-main {
  background: linear-gradient(170deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 40px 44px 44px;
  min-width: 0;
}

.article-head { margin-bottom: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }

.article-head .a-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-head .a-cat {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--cyan);
}

.article-head h1 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.article-head .a-summary {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.9;
  margin-bottom: 18px;
}

.a-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.a-meta span { display: inline-flex; align-items: center; gap: 6px; }
.a-meta i { color: #4d627d; }
.a-meta .difficulty { font-family: var(--body); }

.a-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* 正文 */
.prose { font-size: 15px; line-height: 1.95; color: var(--text); }

.prose h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 38px 0 16px;
  padding: 10px 0 10px 16px;
  border-left: 3px solid var(--cyan);
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.07), transparent);
  scroll-margin-top: 90px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prose h2 .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 1px;
}

.prose h3 {
  font-size: 16.5px;
  font-weight: 600;
  color: #e8f2ff;
  margin: 26px 0 12px;
  scroll-margin-top: 90px;
}

.prose p { margin: 12px 0; }

.prose ul, .prose ol { margin: 12px 0 12px 4px; padding-left: 22px; }
.prose li { margin: 7px 0; }
.prose li::marker { color: var(--green); }
.prose ol li::marker { color: var(--cyan); }

.prose strong { color: #fff; font-weight: 600; }

.prose code.inline {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.18);
  border-radius: 5px;
  padding: 1px 7px;
  white-space: nowrap;
}

.prose a { border-bottom: 1px dashed rgba(0, 229, 255, 0.5); }
.prose a:hover { border-bottom-style: solid; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.prose thead th {
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan);
  font-weight: 600;
  text-align: left;
  padding: 11px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  line-height: 1.7;
}

.prose tbody tr:hover td { background: rgba(0, 229, 255, 0.03); }
.prose tbody tr:last-child td { border-bottom: none; }

.table-wrap { overflow-x: auto; }

/* 警示框 */
.callout {
  position: relative;
  margin: 20px 0;
  padding: 15px 18px 15px 52px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 13.8px;
  line-height: 1.85;
  background: var(--bg-soft);
}

.callout::before {
  position: absolute;
  left: 17px; top: 15px;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 17px;
}

.callout .co-title { font-weight: 600; display: block; margin-bottom: 4px; }

.callout.danger { border-color: rgba(255, 92, 122, 0.45); background: rgba(255, 92, 122, 0.07); }
.callout.danger::before { content: "\f071"; color: var(--red); }
.callout.danger .co-title { color: var(--red); }

.callout.warning { border-color: rgba(255, 180, 84, 0.45); background: rgba(255, 180, 84, 0.06); }
.callout.warning::before { content: "\f071"; color: var(--amber); }
.callout.warning .co-title { color: var(--amber); }

.callout.tip { border-color: rgba(0, 229, 255, 0.45); background: rgba(0, 229, 255, 0.06); }
.callout.tip::before { content: "\f0eb"; color: var(--cyan); }
.callout.tip .co-title { color: var(--cyan); }

.callout.info { border-color: rgba(0, 255, 157, 0.45); background: rgba(0, 255, 157, 0.06); }
.callout.info::before { content: "\f05a"; color: var(--green); }
.callout.info .co-title { color: var(--green); }

/* 代码块 */
.codeblock {
  margin: 18px 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
  background: #0a0f1a;
}

.codeblock .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0, 229, 255, 0.05);
  border-bottom: 1px solid var(--line);
}

.codeblock .code-lang {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.codeblock .code-lang i { margin-right: 6px; color: var(--green); }

.codeblock .copy-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12.5px;
  font-family: var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 5px;
  transition: all 0.2s;
}

.codeblock .copy-btn:hover { color: var(--cyan); background: rgba(0, 229, 255, 0.08); }
.codeblock .copy-btn.copied { color: var(--green); }

.codeblock pre {
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.7;
  font-size: 13.5px;
}

.codeblock pre code {
  font-family: var(--mono);
  background: none;
  padding: 0;
  white-space: pre;
}

.hljs { background: transparent !important; }

/* 目录 */
.article-side {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-height: calc(100vh - 100px);
}

.toc {
  background: linear-gradient(170deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px;
}

.toc h4 {
  font-size: 13px;
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc h4 i { color: var(--cyan); }

.toc ol { list-style: none; display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow-y: auto; }

.toc a {
  display: flex;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.toc a:hover { color: var(--cyan); background: rgba(0, 229, 255, 0.05); }

.toc a.on {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
}

.toc a .tn { font-family: var(--mono); font-size: 11px; color: var(--text-dim); padding-top: 1px; }

.side-card {
  background: linear-gradient(170deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px;
}

.side-card h4 {
  font-size: 13px;
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-card h4 i { color: var(--green); }

.side-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.side-links a {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(13, 21, 36, 0.4);
  transition: all 0.2s;
}

.side-links a:hover { border-color: rgba(0, 229, 255, 0.5); color: var(--cyan); transform: translateX(3px); }

.side-links a .st { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--text-dim); margin-top: 3px; }

.article-foot {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.article-foot .prev-next { display: flex; gap: 10px; }

.related-title {
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 0 20px;
}

/* ========== 关于/隐私等页面 ========== */
.doc-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 0;
}

.doc-panel {
  background: linear-gradient(170deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 40px;
}

.doc-panel h2 {
  font-size: 19px;
  color: #fff;
  font-weight: 700;
  margin: 30px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-panel h2:first-child { margin-top: 0; }

.doc-panel h2 i { color: var(--cyan); font-size: 15px; width: 20px; }

.doc-panel p { margin: 10px 0; font-size: 14.5px; line-height: 2; color: var(--text); }

.doc-panel ul { margin: 10px 0; padding-left: 22px; }
.doc-panel li { margin: 7px 0; font-size: 14.5px; line-height: 1.9; }
.doc-panel li::marker { color: var(--green); }

.doc-panel .updated {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 20px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 22px;
}

.about-item {
  background: rgba(13, 21, 36, 0.55);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.about-item h3 {
  font-size: 14.5px;
  color: #fff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-item h3 i { color: var(--green); }
.about-item p { font-size: 13.5px; line-height: 1.9; margin: 0; color: var(--text-dim); }

/* ========== 返回顶部 / 进度条 ========== */
.backtop {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(13, 21, 36, 0.92);
  color: var(--cyan);
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s;
  z-index: 900;
}

.backtop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.backtop:hover { box-shadow: 0 0 16px rgba(0, 229, 255, 0.3); border-color: var(--cyan); }

.progress-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 1100;
  background: transparent;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .grid-cards, .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .article-wrap { grid-template-columns: 1fr; }
  .article-side { position: static; max-height: none; order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-search-box { display: none; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grid-cards, .cat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .article-main { padding: 26px 22px; }
  .doc-panel { padding: 26px 22px; }
  .hero { padding: 140px 0 70px; }
  .hero-stats .stat .num { font-size: 20px; }
  .nav-logo { font-size: 16px; }
  .section-title { font-size: 20px; }
}
