/* ==========================================================================
   NavStation 前台样式
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fb;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --text: #141821;
  --text-soft: #3c4453;
  --muted: #6b7385;
  --border: #e7eaf2;
  --border-strong: #d8dde9;
  --brand: #3b6cf6;
  --brand-2: #7c5cff;
  --brand-soft: rgba(59, 108, 246, 0.08);
  --brand-softer: rgba(59, 108, 246, 0.04);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --header-h: 68px;
}

[data-theme="dark"] {
  --bg: #0c1017;
  --bg-soft: #11161f;
  --card: #151b26;
  --text: #e8ebf2;
  --text-soft: #c3cad8;
  --muted: #8b95a8;
  --border: #232b39;
  --border-strong: #2e3849;
  --brand-soft: rgba(99, 140, 255, 0.12);
  --brand-softer: rgba(99, 140, 255, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.45);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- 头部 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-soft) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(59, 108, 246, 0.28);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  object-fit: contain;
  background: var(--card);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 16px;
  letter-spacing: 0.2px;
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.top-search {
  flex: 1 1 auto;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: 0.18s;
}

.top-search:focus-within {
  background: var(--card);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.top-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.top-search input::placeholder {
  color: var(--muted);
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-soft);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav-link:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--brand-2)));
  box-shadow: 0 6px 14px rgba(59, 108, 246, 0.22);
}

.nav-cta:hover {
  filter: brightness(1.06);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

[data-theme="dark"] .i-sun,
[data-theme="light"] .i-moon {
  display: none;
}

.menu-toggle {
  display: none;
}

/* 分类下拉 */
.nav-drop {
  position: relative;
}

.drop-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 520px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.18s;
}

.nav-drop:hover .drop-panel,
.nav-drop:focus-within .drop-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.drop-group {
  padding: 8px;
  border-radius: 10px;
}

.drop-group:hover {
  background: var(--brand-softer);
}

.drop-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 2px 4px 6px;
}

.drop-title:hover {
  color: var(--brand);
}

.drop-emoji {
  font-size: 16px;
}

.drop-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  padding-left: 4px;
}

.drop-sub a {
  font-size: 12.5px;
  color: var(--muted);
  padding: 2px 0;
}

.drop-sub a:hover {
  color: var(--brand);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 14px 0 16px;
}

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

.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.mobile-search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0;
  color: var(--text);
  font-size: 14px;
}

.mobile-search button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-cats a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
}

.mobile-cats a.child {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.mobile-actions {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 46px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 420px at 12% -20%, rgba(59, 108, 246, 0.16), transparent 62%),
    radial-gradient(760px 380px at 88% -10%, rgba(124, 92, 255, 0.14), transparent 60%);
}

[data-theme="dark"] .hero {
  background:
    radial-gradient(900px 420px at 12% -20%, rgba(59, 108, 246, 0.22), transparent 62%),
    radial-gradient(760px 380px at 88% -10%, rgba(124, 92, 255, 0.18), transparent 60%);
}

.hero-inner {
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.hero-sub {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin: 28px auto 0;
  padding: 8px 8px 8px 20px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  color: var(--muted);
}

.hero-search:focus-within {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border-strong));
  box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-md);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.hero-search input::placeholder {
  color: var(--muted);
}

.hero-search button {
  height: 46px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 50%, var(--brand-2)));
  box-shadow: 0 8px 18px rgba(59, 108, 246, 0.26);
}

.hero-search button:hover {
  filter: brightness(1.05);
}

.hero-search.compact {
  max-width: 620px;
  margin-top: 22px;
  padding: 4px 4px 4px 16px;
}

.hero-search.compact input {
  height: 40px;
}

.hero-search.compact button {
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
}

.hero-search.narrow {
  max-width: 460px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
}

.hero-tags a {
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 76%, transparent);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.hero-tags a:hover {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}

/* ---------- 主体布局 ---------- */

.layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 30px;
  padding: 30px 0 64px;
  align-items: start;
}

.sidebar-inner {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 10px;
}

.side-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.side-head span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.cat-list,
.cat-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cat-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text-soft);
  transition: 0.15s;
}

.cat-link:hover {
  background: var(--brand-softer);
  color: var(--brand);
}

.cat-link.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.cat-emoji {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 15px;
  flex: 0 0 22px;
}

.cat-emoji img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
}

.cat-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-count {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 1px 7px;
}

.cat-sub {
  margin: 2px 0 4px 32px;
}

.cat-sub a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--muted);
}

.cat-sub a:hover {
  background: var(--brand-softer);
  color: var(--brand);
}

.cat-sub span {
  font-size: 11px;
  opacity: 0.75;
}

.hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hot-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 4px;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}

.hot-list li:last-child {
  border-bottom: 0;
}

.hot-list a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
}

.hot-list a:hover {
  color: var(--brand);
}

.hot-rank {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.hot-rank.top {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}

.hot-hits {
  font-size: 11px;
  color: var(--muted);
}

.side-tip p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.side-btn:hover {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
}

/* ---------- 区块 ---------- */

.content {
  min-width: 0;
}

.block {
  margin-bottom: 38px;
}

.block:last-child {
  margin-bottom: 0;
}

.block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.block-title h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.block-title em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.block-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-softer));
  font-size: 16px;
  flex: 0 0 30px;
}

.block-icon.cat {
  background: var(--bg);
  border: 1px solid var(--border);
}

.block-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.block-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--muted);
  flex: 0 0 auto;
}

.block-more:hover {
  color: var(--brand);
}

/* ---------- 站点卡片 ---------- */

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.site-grid.wide {
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
}

.site-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--shadow-sm);
}

.site-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 32%, var(--border));
  box-shadow: var(--shadow-md);
}

.site-hit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
}

.site-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c1, #6366f1), var(--c2, #8b5cf6));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.12);
}

.site-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--card);
  padding: 5px;
}

.site-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.site-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 14px;
}

.site-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.site-grid .site-desc {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-detail {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
  font-family: Georgia, serif;
  opacity: 0;
  transition: 0.15s;
  background: var(--bg);
}

.site-card:hover .site-detail {
  opacity: 1;
}

.site-detail:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.tag {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 5px;
  flex: 0 0 auto;
}

.tag-rec {
  color: #b45309;
  background: #fef3c7;
}

.tag-hot {
  color: #be123c;
  background: #ffe4e6;
}

[data-theme="dark"] .tag-rec {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
}

[data-theme="dark"] .tag-hot {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.14);
}

/* ---------- 面包屑 / 分类头 ---------- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.cat-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 0 0;
  padding: 26px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.cat-hero-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-softer));
}

.cat-hero-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.cat-hero-text {
  min-width: 0;
  flex: 1;
}

.cat-hero-text h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.3px;
}

.cat-hero-text p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.cat-hero-meta {
  text-align: right;
  flex: 0 0 auto;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.cat-hero-meta strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
  color: var(--brand);
}

.cat-hero-meta span {
  font-size: 11.5px;
  color: var(--muted);
}

.subcat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.subcat-tab {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-soft);
}

.subcat-tab:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--brand);
}

.subcat-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.section-gap {
  padding-top: 26px;
  padding-bottom: 64px;
}

.search-hero {
  margin-top: 14px;
  padding: 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.search-hero h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.search-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.search-hero .hero-search {
  margin-top: 20px;
  box-shadow: none;
  background: var(--bg);
  border-color: var(--border);
}

/* ---------- 站点详情 ---------- */

.detail-card {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  background-image: linear-gradient(135deg, var(--brand-softer), transparent 55%);
}

.detail-icon {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--c1, #6366f1), var(--c2, #8b5cf6));
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.16);
  overflow: hidden;
}

.detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--card);
  padding: 10px;
}

.detail-main {
  min-width: 0;
  flex: 1;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-title h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.4px;
}

.detail-desc {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  max-width: 720px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.detail-meta a {
  color: var(--brand);
}

.detail-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s;
  white-space: nowrap;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--brand-2)));
  box-shadow: 0 8px 18px rgba(59, 108, 246, 0.22);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--border);
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--brand);
}

.btn-lg {
  height: 48px;
  padding: 0 26px;
  border-radius: 12px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

/* ---------- 提交页 ---------- */

.submit-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 34px;
  padding: 30px 0 64px;
  align-items: start;
}

.submit-intro {
  padding: 10px 4px;
}

.submit-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  margin-bottom: 16px;
}

.submit-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.4px;
}

.submit-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 420px;
}

.submit-rules {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 440px;
}

.submit-rules li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.submit-rules span {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.form-row label em {
  color: #ef4444;
  font-style: normal;
}

.form-row input[type="text"],
.form-row input[type="url"],
.form-row input[type="password"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: 0;
  transition: 0.18s;
}

.form-row textarea {
  resize: vertical;
  min-height: 84px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  background: var(--card);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border-strong));
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.form-row small {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-question {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
}

.captcha-row input {
  flex: 1;
}

.form-tip {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 11.5px;
}

/* ---------- 文章页 ---------- */

.article-card {
  margin-top: 20px;
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.article-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-head h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.5px;
}

.article-meta {
  font-size: 12px;
  color: var(--muted);
}

.article-body {
  padding-top: 22px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-soft);
  word-break: break-word;
}

.article-body h2,
.article-body h3 {
  color: var(--text);
  margin: 28px 0 12px;
}

.article-body p {
  margin: 0 0 14px;
}

.article-body a {
  color: var(--brand);
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
}

.article-body img {
  border-radius: 12px;
}

.article-foot {
  display: flex;
  gap: 10px;
  padding-top: 26px;
  margin-top: 26px;
  border-top: 1px solid var(--border);
}

/* ---------- 分页 ---------- */

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.pg {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-soft);
}

.pg:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--brand);
}

.pg.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

.pg.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.pg.dots {
  border-color: transparent;
  background: transparent;
}

/* ---------- 提示 ---------- */

.notice-bar {
  margin-top: 20px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
}

[data-theme="dark"] .notice-bar {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.24);
  color: #fbbf24;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  animation: flash-in 0.3s ease;
}

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.flash-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

[data-theme="dark"] .flash-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

[data-theme="dark"] .flash-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.flash-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
}

/* ---------- 空状态 ---------- */

.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.empty-state.tall {
  margin: 60px 0;
  padding: 72px 20px;
}

.empty-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 14px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.empty-state p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13.5px;
}

.empty-state p a {
  color: var(--brand);
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-top: 36px;
  padding-bottom: 36px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-left p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  max-width: 340px;
}

.footer-right {
  text-align: right;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 18px;
  font-size: 12.5px;
  color: var(--text-soft);
}

.footer-nav a:hover {
  color: var(--brand);
}

.footer-links {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.footer-links a {
  margin-right: 10px;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-copy {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
}

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

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .top-search {
    display: none;
  }

  .nav-link,
  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .sidebar-inner {
    position: static;
  }

  .sidebar {
    order: 2;
  }

  .submit-layout {
    grid-template-columns: 1fr;
  }

  .submit-intro p {
    max-width: none;
  }

  .drop-panel {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .header-inner {
    gap: 12px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    padding: 40px 0 34px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .hero-search {
    padding-left: 14px;
    gap: 6px;
  }

  .hero-search input {
    font-size: 14px;
  }

  .hero-search button {
    padding: 0 18px;
    font-size: 14px;
  }

  .site-grid,
  .site-grid.wide {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .site-hit {
    padding: 11px;
    gap: 10px;
  }

  .site-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    font-size: 14px;
  }

  .site-title {
    font-size: 13px;
  }

  .site-desc {
    font-size: 11px;
  }

  .detail-card {
    flex-direction: column;
    padding: 24px;
    gap: 18px;
  }

  .cat-hero {
    padding: 20px;
    flex-wrap: wrap;
  }

  .cat-hero-meta {
    border-left: 0;
    padding-left: 0;
    text-align: left;
    width: 100%;
    display: flex;
    gap: 8px;
    align-items: baseline;
  }

  .article-card {
    padding: 24px;
  }

  .article-head h1 {
    font-size: 22px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 18px;
  }

  .footer-right {
    text-align: left;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .site-grid,
  .site-grid.wide {
    grid-template-columns: 1fr;
  }
}
