/* ============================================================
   个人IT计算机技术资讯分享网站 - 全局样式
   ============================================================ */

/* ---------- CSS 变量 / 主题 ---------- */
:root {
  --primary: #0d6efd;
  --primary-dark: #0a58ca;
  --accent: #06d6a0;
  --danger: #ef476f;
  --bg: #0f111a;
  --bg-surface: #161b2e;
  --bg-card: #1c2340;
  --border: rgba(255,255,255,0.07);
  --text: #e2e8f0;
  --text-muted: #8892aa;
  --text-heading: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.3s cubic-bezier(0.16,1,0.3,1);
  --font-mono: 'Fira Code', 'Cascadia Code', Consolas, monospace;
}

[data-theme="light"] {
  --bg: #f0f4f8;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(0,0,0,0.08);
  --text: #2d3748;
  --text-muted: #718096;
  --text-heading: #1a202c;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ---------- 容器 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   顶部合规提示横幅
   ============================================================ */
.compliance-banner {
  background: linear-gradient(90deg, #1a2a4a 0%, #0d1b35 100%);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.compliance-banner span { color: #ffd166; margin: 0 4px; }

/* ============================================================
   顶部导航
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15,17,26,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}
[data-theme="light"] .site-header {
  background: rgba(255,255,255,0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.site-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}
.site-logo span { font-size: 13px; font-weight: 400; color: var(--text-muted); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: all var(--transition);
  position: relative;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(13,110,253,0.12);
  color: var(--primary);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.btn-search {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
}
.btn-search:hover { background: rgba(13,110,253,0.12); color: var(--primary); border-color: var(--primary); }

.btn-theme {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
}
.btn-theme:hover { background: rgba(255,209,102,0.1); color: #ffd166; border-color: #ffd166; }

.btn-mobile-menu {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  align-items: center; justify-content: center;
  font-size: 18px;
  transition: all var(--transition);
}

/* 移动菜单 */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}
.mobile-nav a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: all var(--transition);
}
.mobile-nav a:hover { background: rgba(13,110,253,0.1); color: var(--primary); }
.mobile-nav.open { display: flex; }

/* 搜索浮层 */
.search-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}
.search-overlay.open { display: flex; }
.search-box {
  width: 100%; max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 20px;
  color: var(--text);
  caret-color: var(--primary);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-hint { margin-top: 12px; font-size: 12px; color: var(--text-muted); }

/* ============================================================
   Hero 轮播区
   ============================================================ */
.hero-section {
  padding: 40px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* 主轮播 */
.carousel-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  aspect-ratio: 16/7;
  box-shadow: var(--shadow);
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25,1,0.5,1);
}
.carousel-slide {
  min-width: 100%;
  position: relative;
  overflow: hidden;
}
.carousel-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 6s ease;
}
.carousel-slide:hover img { transform: scale(1.04); }
.slide-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 24px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.slide-cat {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.slide-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slide-meta { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 6px; }

.carousel-dots {
  position: absolute;
  bottom: 16px; right: 16px;
  display: flex; gap: 6px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all var(--transition);
}
.dot.active { width: 20px; background: #fff; }

.carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all var(--transition);
  z-index: 10;
}
.carousel-btn:hover { background: var(--primary); border-color: var(--primary); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

/* 侧边公告+热门 */
.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notice-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
}
.card-header .icon { font-size: 16px; }
.notice-list { padding: 8px 0; }
.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
  transition: background var(--transition);
  cursor: pointer;
}
.notice-item:hover { background: rgba(13,110,253,0.06); }
.notice-item .dot-red {
  width: 6px; height: 6px; flex-shrink: 0;
  border-radius: 50%; background: var(--danger);
  margin-top: 6px;
}
.notice-text { color: var(--text); line-height: 1.5; }
.notice-time { color: var(--text-muted); font-size: 11px; margin-top: 2px; }

/* ============================================================
   分类快捷栏
   ============================================================ */
.cat-section { padding: 0 0 32px; }
.cat-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 40px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-chip:hover, .cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(13,110,253,0.3);
}
.cat-chip .emoji { font-size: 16px; }

/* ============================================================
   文章卡片网格
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
}
.section-title::before {
  content: '';
  display: block;
  width: 4px; height: 20px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 2px;
}
.see-all {
  font-size: 13px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.see-all:hover { background: rgba(13,110,253,0.1); color: var(--primary); }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.articles-grid.col-4 { grid-template-columns: repeat(4, 1fr); }

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(13,110,253,0.3);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(13,110,253,0.1);
}
.article-card .cover {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-surface);
}
.article-card .cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.article-card:hover .cover img { transform: scale(1.06); }
.cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card));
}
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card-cat {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.cat-ops    { background: rgba(13,110,253,0.12); color: var(--primary); }
.cat-code   { background: rgba(6,214,160,0.12); color: var(--accent); }
.cat-open   { background: rgba(255,193,7,0.12); color: #ffc107; }
.cat-sec    { background: rgba(239,71,111,0.12); color: var(--danger); }
.cat-hw     { background: rgba(157,78,221,0.12); color: #9d4edd; }
.cat-ai     { background: rgba(0,180,216,0.12); color: #00b4d8; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.card-title:hover { color: var(--primary); }
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.card-meta-left { display: flex; align-items: center; gap: 12px; }
.card-meta span { display: flex; align-items: center; gap: 4px; }
.card-source {
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.05);
  font-size: 11px;
}

/* 大图卡片 */
.article-card.featured {
  grid-column: span 2;
  flex-direction: row;
}
.article-card.featured .cover {
  aspect-ratio: auto;
  width: 260px;
  flex-shrink: 0;
}

/* ============================================================
   热门归档侧边栏
   ============================================================ */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sidebar-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 14px;
}
.sidebar-body { padding: 12px; }

.hot-list { display: flex; flex-direction: column; gap: 2px; }
.hot-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
}
.hot-item:hover { background: rgba(13,110,253,0.06); }
.hot-num {
  width: 20px; height: 20px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.hot-num.n1 { background: #ef476f; color: #fff; }
.hot-num.n2 { background: #ffd166; color: #000; }
.hot-num.n3 { background: #06d6a0; color: #000; }
.hot-num.other { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.hot-title { color: var(--text); line-height: 1.5; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.tag:hover { border-color: var(--primary); color: var(--primary); background: rgba(13,110,253,0.08); }

/* ============================================================
   分页
   ============================================================ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 32px 0;
}
.page-btn {
  min-width: 36px; height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover, .page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   文章详情页
   ============================================================ */
.article-header { padding: 40px 0 32px; }
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb span { color: var(--text-muted); }

.article-h1 {
  font-size: 28px; font-weight: 800;
  color: var(--text-heading); line-height: 1.4;
  margin-bottom: 16px;
}
.article-info {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; font-size: 13px; color: var(--text-muted);
}
.article-info .badge {
  padding: 4px 12px; border-radius: 4px;
  background: rgba(13,110,253,0.12); color: var(--primary);
  font-size: 12px; font-weight: 600;
}
.source-block {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(13,110,253,0.06);
  border: 1px solid rgba(13,110,253,0.15);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-muted);
  margin: 20px 0;
}
.source-block a { color: var(--primary); }

.article-body {
  font-size: 16px; line-height: 1.9;
  color: var(--text);
}
.article-body h2 { font-size: 22px; font-weight: 700; margin: 32px 0 16px; color: var(--text-heading); }
.article-body h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: var(--text-heading); }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 16px 0 16px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--primary);
  background: rgba(13,110,253,0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
}
.article-body code {
  font-family: var(--font-mono);
  padding: 2px 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  font-size: 14px;
}
.article-body pre {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
}
.article-body pre code { background: none; padding: 0; font-size: 14px; }
.article-body img { border-radius: var(--radius-sm); margin: 20px 0; }

/* 版权免责尾注 */
.copyright-footer {
  margin-top: 40px;
  padding: 20px;
  background: rgba(255,209,102,0.05);
  border: 1px solid rgba(255,209,102,0.2);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}
.copyright-footer strong { color: #ffd166; }
.copyright-footer a { color: var(--primary); }

/* ============================================================
   分类列表页
   ============================================================ */
.cat-page-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.cat-page-title {
  font-size: 28px; font-weight: 800; color: var(--text-heading);
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.cat-page-desc { font-size: 15px; color: var(--text-muted); }
.cat-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 20px;
}
.filter-btn {
  padding: 6px 16px;
  border-radius: 40px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px; cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary); border-color: var(--primary);
  color: #fff;
}

/* ============================================================
   合规/静态页面
   ============================================================ */
.static-page { padding: 60px 0; }
.static-page h1 {
  font-size: 32px; font-weight: 800;
  color: var(--text-heading); margin-bottom: 8px;
}
.static-page .subtitle { color: var(--text-muted); margin-bottom: 40px; font-size: 15px; }
.static-page h2 {
  font-size: 20px; font-weight: 700;
  color: var(--text-heading); margin: 36px 0 16px;
  display: flex; align-items: center; gap: 8px;
}
.static-page h2::before {
  content: '';
  display: block; width: 4px; height: 18px;
  background: var(--primary); border-radius: 2px;
}
.static-page p, .static-page li { color: var(--text); font-size: 15px; line-height: 1.9; margin-bottom: 12px; }
.static-page ul { margin-left: 20px; }
.static-page li { list-style: disc; }
.highlight-box {
  padding: 20px;
  background: rgba(6,214,160,0.06);
  border: 1px solid rgba(6,214,160,0.2);
  border-radius: var(--radius);
  margin: 24px 0;
}
.warn-box {
  padding: 20px;
  background: rgba(239,71,111,0.06);
  border: 1px solid rgba(239,71,111,0.2);
  border-radius: var(--radius);
  margin: 24px 0;
}
.info-box {
  padding: 20px;
  background: rgba(13,110,253,0.06);
  border: 1px solid rgba(13,110,253,0.2);
  border-radius: var(--radius);
  margin: 24px 0;
}
.contact-card {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 16px;
  margin-top: 24px;
}
.contact-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 14px;
}
.contact-item .ci-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(13,110,253,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.contact-item .ci-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.contact-item .ci-value { font-size: 14px; color: var(--text); font-weight: 500; }

/* ============================================================
   底部 Footer
   ============================================================ */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 32px;
}
.footer-brand .logo { font-size: 18px; font-weight: 700; color: var(--text-heading); margin-bottom: 10px; }
.footer-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.8; max-width: 260px; }
.footer-col h4 { font-size: 14px; font-weight: 600; color: var(--text-heading); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { font-size: 13px; color: var(--text-muted); transition: color var(--transition); }
.footer-col ul a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--text-muted);
}
.footer-bottom-inner a { color: var(--text-muted); transition: color var(--transition); }
.footer-bottom-inner a:hover { color: var(--primary); }
.icp-info { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.compliance-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(6,214,160,0.1);
  border: 1px solid rgba(6,214,160,0.2);
  border-radius: 4px;
  font-size: 11px; color: var(--accent);
}

/* 合规备案声明 */
.footer-compliance-notice {
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(6,214,160,0.05);
  border: 1px solid rgba(6,214,160,0.12);
  border-radius: 6px;
  line-height: 1.8;
}

/* ============================================================
   回到顶部
   ============================================================ */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(13,110,253,0.4);
  transition: all var(--transition);
  opacity: 0; pointer-events: none;
  z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(13,110,253,0.5); }

/* ============================================================
   加载动画
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.04) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   工具类
   ============================================================ */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.d-none { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-aside { flex-direction: row; }
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar-card { flex: 1; min-width: 240px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .articles-grid.col-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .btn-mobile-menu { display: flex; }
  .hero-aside { flex-direction: column; }
  .articles-grid { grid-template-columns: 1fr; }
  .articles-grid.col-4 { grid-template-columns: 1fr; }
  .article-card.featured { flex-direction: column; }
  .article-card.featured .cover { width: 100%; }
  .cat-nav { gap: 8px; }
  .cat-chip { padding: 6px 14px; font-size: 13px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .contact-card { grid-template-columns: 1fr; }
  .article-h1 { font-size: 22px; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .section-title { font-size: 17px; }
  .hero-section { padding: 20px 0 20px; }
}

/* ============================================================
   主题平滑过渡
   ============================================================ */
body, .site-header, .site-footer, .article-card,
.notice-card, .sidebar-card, .nav-links a, .cat-chip,
.footer-inner, .footer-bottom {
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition);
}
