/* ============================================================
   互联网产品主题 (SaaS Theme) - main.css
   深色科技风格，专为互联网产品和SaaS服务设计
   ============================================================ */

/* ── CSS 变量 ──────────────────────────────────────────────── */
:root {
  /* 品牌色 */
  --accent:          #22d3ee;
  --accent-hover:    #06b6d4;
  --accent-dim:      rgba(34, 211, 238, 0.12);
  --accent-glow:     rgba(34, 211, 238, 0.25);

  /* 背景层级 */
  --bg:              #0a0f1c;
  --surface:         #111827;
  --surface-2:       #1e293b;
  --surface-3:       #0f172a;
  --border:          rgba(255, 255, 255, 0.08);
  --border-strong:   rgba(255, 255, 255, 0.14);

  /* 文字 */
  --text:            #f1f5f9;
  --text-muted:      #94a3b8;
  --text-dim:        #64748b;
  --text-accent:     var(--accent);

  /* 阴影 */
  --shadow-sm:       0 1px 8px rgba(0,0,0,.3);
  --shadow-md:       0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:       0 12px 40px rgba(0,0,0,.5);
  --shadow-accent:   0 0 20px var(--accent-glow);

  /* 圆角 */
  --radius-sm:       6px;
  --radius:          10px;
  --radius-lg:       14px;
  --radius-xl:       20px;
  --radius-full:     100px;

  /* 间距 / 布局 */
  --container:       1280px;
  --sidebar-w:       280px;
  --header-h:        64px;

  /* 动画 */
  --transition:      0.2s ease;
  --transition-slow: 0.35s ease;

  /* 字体 */
  --font:            'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC',
                     'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* ── 重置 ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
button { font-family: inherit; }

/* ── 无障碍 ────────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--accent); color: var(--bg);
  padding: 8px 16px; border-radius: 0 0 var(--radius-sm) 0; z-index: 9999;
  font-weight: 600; font-size: 14px;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── 容器 ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px)  { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 40px; } }

/* ── 滚动条 ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-3); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ============================================================
   导航栏
   ============================================================ */
.site-header {
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(10, 15, 28, 0.96);
  box-shadow: 0 1px 20px rgba(0,0,0,.4);
}

.navbar { height: var(--header-h); }
.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* 品牌 */
.brand-link {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none;
}
.brand-icon { display: flex; align-items: center; flex-shrink: 0; }
.brand-text {
  font-size: 18px; font-weight: 700; white-space: nowrap; color: var(--text);
  letter-spacing: -.02em;
}
.brand-logo { height: 32px; width: auto; }

/* 汉堡按钮 */
.navbar-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: 1px solid var(--border); cursor: pointer;
  padding: 8px; border-radius: var(--radius-sm);
  flex-shrink: 0; width: 38px; height: 38px; align-items: center;
}
.navbar-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text-muted); border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}
.navbar-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.navbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* 导航菜单 */
.navbar-menu {
  display: flex; align-items: center; gap: 4px;
  flex: 1; justify-content: flex-end;
}
.nav-links {
  display: flex; list-style: none; gap: 2px; align-items: center; margin-right: 8px;
}
.nav-links a {
  display: block; padding: 6px 14px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: all var(--transition); white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active {
  color: var(--accent); background: var(--accent-dim);
}

/* 搜索 */
.nav-actions { display: flex; align-items: center; }
.nav-search-form { display: flex; align-items: center; gap: 4px; }
.search-input {
  border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 6px 14px; font-size: 13px;
  width: 160px; transition: all var(--transition);
  background: var(--surface-2); color: var(--text);
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
  outline: none; border-color: var(--accent);
  width: 210px; background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-btn {
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--text-dim);
  display: flex; align-items: center; border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.search-btn:hover { color: var(--accent); }

/* 移动端导航 */
@media (max-width: 768px) {
  .navbar-toggle { display: flex; }
  .navbar-menu {
    display: none;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--surface);
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    z-index: 199;
  }
  .navbar-menu.is-open { display: flex; }
  .nav-links { flex-direction: column; gap: 2px; width: 100%; margin-right: 0; }
  .nav-links a { padding: 10px 14px; width: 100%; font-size: 15px; border-radius: var(--radius); }
  .nav-actions { width: 100%; }
  .nav-search-form { width: 100%; }
  .search-input { width: 100% !important; border-radius: var(--radius); }
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all var(--transition);
  text-decoration: none; white-space: nowrap; font-family: var(--font);
}
.btn-primary {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover); border-color: var(--accent-hover);
  color: var(--bg); box-shadow: 0 0 20px var(--accent-glow);
}
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-2); color: var(--text);
  border-color: var(--border-strong);
}
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ============================================================
   Hero 区块
   ============================================================ */
.hero {
  position: relative;
  background: var(--bg);
  padding: 80px 0 70px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

/* 网格背景 */
.hero-bg-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 40%, transparent 100%);
}

/* 底部渐变遮罩 */
.hero-gradient-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 80px; z-index: 1;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 700px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--radius-full);
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.08);
  color: var(--accent); font-size: 13px; font-weight: 500;
}
.hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(28px, 5.5vw, 56px);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -.03em; color: var(--text);
  background: linear-gradient(135deg, #ffffff 30%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-muted); line-height: 1.7; max-width: 560px;
}

.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 4px;
}

.hero-tags {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 8px;
}
.hero-tag {
  padding: 5px 14px; border-radius: var(--radius-full);
  font-size: 13px; color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface-3);
  transition: all var(--transition);
}
.hero-tag:hover {
  color: var(--accent); border-color: rgba(34,211,238,.3);
  background: var(--accent-dim);
}

@media (max-width: 480px) {
  .hero { padding: 56px 0 48px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   区块标题
   ============================================================ */
.section-header { margin-bottom: 28px; }
.section-title {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.section-title-accent {
  display: inline-block;
  width: 4px; height: 20px;
  background: var(--accent);
  border-radius: 2px; flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent-glow);
}
.section-subtitle {
  font-size: 14px; color: var(--text-dim);
}

/* ============================================================
   布局 - 内容 + 侧边栏
   ============================================================ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 24px 0 40px;
}
@media (min-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 32px;
    padding: 32px 0 56px;
  }
}

.articles-section { padding: 40px 0 60px; }
.featured-section { padding: 40px 0; border-bottom: 1px solid var(--border); }

/* ============================================================
   文章网格 & 卡片
   ============================================================ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 500px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition-slow);
  display: flex; flex-direction: column;
}
.article-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: var(--shadow-accent), var(--shadow-md);
  transform: translateY(-3px);
}

.card-image {
  display: block; overflow: hidden;
  aspect-ratio: 16 / 9; flex-shrink: 0;
  position: relative;
}
.card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition-slow);
}
.article-card:hover .card-image img { transform: scale(1.04); }
.card-image-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,15,28,.4) 0%, transparent 60%);
}

.card-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }

.card-category {
  display: inline-block; padding: 3px 10px;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(34,211,238,.2);
  border-radius: var(--radius-full); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  width: fit-content;
}

.card-title {
  font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title a { color: inherit; transition: color var(--transition); }
.card-title a:hover { color: var(--accent); }

.card-excerpt {
  font-size: 13px; color: var(--text-muted); line-height: 1.65; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.card-footer {
  display: flex; justify-content: space-between; align-items: center; margin-top: auto;
}
.card-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim);
}
.meta-dot { color: var(--border-strong); }
.meta-date, .meta-reading { white-space: nowrap; }

.card-read-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  transition: color var(--transition);
  white-space: nowrap; flex-shrink: 0;
}
.card-read-more:hover { color: var(--accent); }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 3px 9px;
  background: var(--surface-2); color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-full); font-size: 11px;
  transition: all var(--transition);
}
.tag:hover { background: var(--accent-dim); color: var(--accent); border-color: rgba(34,211,238,.25); }

.ai-badge {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff; padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  white-space: nowrap;
}

/* ── 精选文章 ─────────────────────────────────────────────── */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .featured-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .featured-grid { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   文章详情页
   ============================================================ */
.article-main-col { min-width: 0; padding: 32px 0 56px; }

.article-full {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
}
@media (min-width: 640px)  { .article-full { padding: 36px; } }
@media (min-width: 1024px) { .article-full { padding: 48px 52px; } }

.article-cover {
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border);
}
.article-cover img { width: 100%; max-height: 460px; object-fit: cover; }

.article-category {
  display: inline-block; padding: 4px 12px;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(34,211,238,.2);
  border-radius: var(--radius-full); font-size: 11px; font-weight: 600;
  margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em;
}

.article-title {
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 800; line-height: 1.3; margin-bottom: 20px;
  color: var(--text); letter-spacing: -.02em;
}

.article-meta {
  display: flex; flex-wrap: wrap; gap: 14px 20px;
  color: var(--text-dim); font-size: 13px;
  margin-bottom: 24px; padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.meta-item {
  display: flex; align-items: center; gap: 6px;
}

.article-excerpt {
  font-size: 16px; color: var(--text-muted);
  background: var(--surface-2);
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 28px; line-height: 1.7;
  box-shadow: inset 0 0 0 1px var(--border);
}

.article-footer {
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags-label { color: var(--text-dim); font-size: 13px; white-space: nowrap; }

/* 目录 */
.toc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 32px;
}
.toc-title { font-weight: 700; font-size: 13px; margin-bottom: 12px; color: var(--text); letter-spacing: .04em; text-transform: uppercase; }
.toc ol, .toc ul { padding-left: 18px; }
.toc li { margin: 6px 0; font-size: 13px; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--accent); }

/* 文章正文排版 */
.article-content { font-size: 16px; line-height: 1.9; color: var(--text-muted); }
.article-content h2 {
  font-size: clamp(18px, 2.5vw, 22px); font-weight: 700;
  margin: 40px 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.article-content h3 {
  font-size: clamp(16px, 2vw, 19px); font-weight: 600;
  margin: 32px 0 12px; color: var(--text);
}
.article-content h4 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; color: var(--text); }
.article-content p { margin-bottom: 20px; }
.article-content ul, .article-content ol { margin: 14px 0 20px 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border-left: 3px solid var(--accent); margin: 28px 0;
  padding: 16px 20px;
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted); font-style: italic;
  box-shadow: inset 0 0 0 1px var(--border);
}
.article-content img { border-radius: var(--radius-lg); margin: 28px auto; border: 1px solid var(--border); }
.article-content pre {
  background: var(--surface-3); color: #e2e8f0;
  padding: 20px 24px; border-radius: var(--radius-lg);
  overflow-x: auto; font-size: 14px; line-height: 1.7;
  margin: 28px 0; font-family: var(--font-mono);
  border: 1px solid var(--border);
}
.article-content code {
  background: var(--surface-2); padding: 2px 7px;
  border-radius: var(--radius-sm); font-size: .875em;
  color: var(--accent); font-family: var(--font-mono);
  border: 1px solid var(--border);
}
.article-content pre code { background: none; color: inherit; padding: 0; font-size: 14px; border: none; }
.article-content a { color: var(--accent); border-bottom: 1px solid rgba(34,211,238,.3); }
.article-content a:hover { border-bottom-color: var(--accent); }
.article-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 14px; overflow-x: auto; display: block;
}
.article-content th, .article-content td {
  padding: 10px 14px; border: 1px solid var(--border); text-align: left;
}
.article-content th { background: var(--surface-2); font-weight: 600; color: var(--text); }

/* 相关文章 */
.related-articles {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 28px 32px; margin-top: 24px;
}
@media (min-width: 640px) { .related-articles { padding: 32px 36px; } }

/* ============================================================
   侧边栏
   ============================================================ */
.sidebar {
  display: flex; flex-direction: column; gap: 16px;
  padding: 32px 0 56px;
}
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 22px;
}
.widget-title {
  font-size: 12px; font-weight: 700; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
  color: var(--text); text-transform: uppercase; letter-spacing: .08em;
}
.category-list { list-style: none; }
.category-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.category-list li:last-child { border-bottom: none; }
.category-list a {
  color: var(--text-muted); font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
  transition: color var(--transition);
}
.category-list a:hover, .category-list a.active { color: var(--accent); }
.count {
  background: var(--accent-dim); color: var(--accent);
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
}
.popular-list { list-style: decimal; padding-left: 18px; }
.popular-list li {
  padding: 6px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; display: flex; flex-direction: column; gap: 2px;
}
.popular-list li:last-child { border-bottom: none; }
.popular-list a { color: var(--text-muted); font-weight: 500; font-size: 13px; }
.popular-list a:hover { color: var(--accent); }
.view-count { font-size: 11px; color: var(--text-dim); }
.rss-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 600; font-size: 13px;
  padding: 8px 14px;
  background: var(--accent-dim); border-radius: var(--radius);
  border: 1px solid rgba(34,211,238,.2);
  transition: all var(--transition);
}
.rss-link:hover { background: rgba(34,211,238,.2); box-shadow: 0 0 12px var(--accent-glow); }

/* ============================================================
   面包屑
   ============================================================ */
.breadcrumb { padding: 20px 0 8px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; font-size: 13px; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; color: var(--text-dim); }
.breadcrumb a { color: var(--text-dim); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.separator { color: var(--border-strong); }

/* ============================================================
   分页
   ============================================================ */
.pagination { margin: 40px 0 16px; display: flex; justify-content: center; }
.pagination ul { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; justify-content: center; }
.page-link {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  background: var(--surface); transition: all var(--transition);
}
.page-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.page-link.active { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }
.page-ellipsis { display: flex; align-items: center; color: var(--text-dim); font-size: 14px; height: 38px; }

/* ============================================================
   归档/分类页
   ============================================================ */
.archive-header { padding: 28px 0 24px; }
.archive-meta { display: flex; flex-direction: column; gap: 8px; }
.archive-badge {
  display: inline-block; padding: 4px 12px;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(34,211,238,.2);
  border-radius: var(--radius-full); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; width: fit-content;
}
.archive-cover {
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 20px; max-height: 260px;
  border: 1px solid var(--border);
}
.archive-cover img { width: 100%; height: 100%; object-fit: cover; }
.archive-title {
  font-size: clamp(22px, 4vw, 32px); font-weight: 800;
  color: var(--text); letter-spacing: -.02em;
}
.archive-desc { color: var(--text-muted); font-size: 15px; }
.archive-count { color: var(--text-dim); font-size: 13px; }
.archive-count strong { color: var(--accent); }

/* ============================================================
   搜索页
   ============================================================ */
.search-header { padding: 28px 0 24px; }
.search-query-text { color: var(--accent); }
.search-box-large { margin: 20px 0 16px; max-width: 600px; }
.search-box-large form { display: flex; gap: 10px; }
.search-input-wrapper {
  flex: 1; position: relative; display: flex; align-items: center;
}
.search-icon-lg {
  position: absolute; left: 14px; color: var(--text-dim); pointer-events: none;
}
.search-input-lg {
  width: 100%; padding: 11px 16px 11px 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full); font-size: 15px;
  background: var(--surface-2); color: var(--text);
  transition: all var(--transition);
}
.search-input-lg::placeholder { color: var(--text-dim); }
.search-input-lg:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--surface);
}
@media (max-width: 480px) {
  .search-box-large form { flex-direction: column; }
}

/* ============================================================
   独立页面
   ============================================================ */
.page-full {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px; margin: 24px 0 56px;
}
@media (min-width: 640px) { .page-full { padding: 40px 48px; } }
.page-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.page-title {
  font-size: clamp(20px, 3vw, 28px); font-weight: 800;
  color: var(--text); letter-spacing: -.02em;
}
.page-content { font-size: 16px; line-height: 1.85; }
.page-content h2 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; color: var(--text); }
.page-content p { margin-bottom: 16px; color: var(--text-muted); }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--surface-3);
  border-top: 1px solid var(--border);
  margin-top: 0; padding: 48px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 32px; margin-bottom: 36px;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
}

.footer-brand-text {
  font-size: 17px; font-weight: 700; color: var(--text);
  letter-spacing: -.01em;
}
.footer-desc {
  font-size: 14px; line-height: 1.7; color: var(--text-dim);
  margin-top: 10px; margin-bottom: 14px;
  max-width: 280px;
}
.footer-email {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 16px; transition: color var(--transition);
}
.footer-email:hover { color: var(--accent); }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.social-link {
  font-size: 13px; color: var(--text-dim);
  transition: color var(--transition);
}
.social-link:hover { color: var(--accent); }

.footer-nav-title {
  font-size: 11px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px;
}
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: 14px; color: var(--text-dim); transition: color var(--transition); }
.footer-nav a:hover { color: var(--text); }

.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  text-align: center; font-size: 13px; color: var(--text-dim);
}
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--text-muted); }

/* ============================================================
   空状态
   ============================================================ */
.empty-state {
  text-align: center; padding: 64px 24px;
  color: var(--text-dim); display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { color: var(--border-strong); }
.empty-state p { font-size: 15px; }

/* ============================================================
   404 页面
   ============================================================ */
.error-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: flex; align-items: center; justify-content: center;
  padding: 80px 0;
}
.error-content { text-align: center; }
.error-code {
  font-size: clamp(80px, 15vw, 140px); font-weight: 900;
  line-height: 1; letter-spacing: -.05em;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 16px;
  text-shadow: none;
}
.error-title {
  font-size: clamp(20px, 3vw, 28px); font-weight: 700;
  color: var(--text); margin-bottom: 16px;
}
.error-desc {
  color: var(--text-muted); font-size: 15px; line-height: 1.7;
  max-width: 440px; margin: 0 auto 32px;
}
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   滚动动画
   ============================================================ */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   打印
   ============================================================ */
@media print {
  .site-header, .sidebar, .related-articles,
  .site-footer, .pagination, .nav-actions { display: none !important; }
  .content-layout { grid-template-columns: 1fr !important; }
  body { background: white; color: #000; }
  .article-full { box-shadow: none; padding: 0; border: none; background: none; }
  .article-content { color: #333; }
  a { color: #000; }
}
