/* ===== 新手站长不迷路 - 公共样式 ===== */
:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --accent: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --bg-gray: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --nav-height: 64px;
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; color: var(--text); }

/* ===== 容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 导航栏 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.nav-search {
  position: relative;
  width: 220px;
}

.nav-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-gray);
  outline: none;
  transition: all 0.2s;
}

.nav-search input:focus {
  border-color: var(--primary);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nav-search::before {
  content: "🔍";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: 0.5;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0ea5e9 100%);
  color: white;
  padding: 60px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  position: relative;
}

.hero p {
  font-size: 17px;
  opacity: 0.9;
  margin-bottom: 28px;
  position: relative;
}

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

.hero-search input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-search::before {
  content: "🔍";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

.hero-tags {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.hero-tags span {
  padding: 4px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-tags span:hover {
  background: rgba(255,255,255,0.25);
}

/* ===== 广告位 ===== */
.ad-slot {
  background: var(--bg-white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 13px;
  text-align: center;
  padding: 20px;
  margin: 24px 0;
}

.ad-slot::before {
  content: "📢 广告位 ";
  font-weight: 600;
}

.ad-banner { min-height: 90px; }
.ad-rectangle { min-height: 250px; }
.ad-inline { min-height: 100px; margin: 16px 0; }

/* ===== 区块标题 ===== */
.section {
  padding: 40px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.section-more {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

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

/* ===== 模块入口卡片 ===== */
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.module-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.3s;
}

.module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.module-card:hover::before { transform: scaleX(1); }

.module-card .mod-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}

.module-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.module-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.module-card .mod-count {
  margin-top: 12px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

/* 不同模块的颜色 */
.mod-tutorial .mod-icon { background: rgba(37, 99, 235, 0.1); }
.mod-tools .mod-icon { background: rgba(14, 165, 233, 0.1); }
.mod-nav .mod-icon { background: rgba(16, 185, 129, 0.1); }
.mod-resource .mod-icon { background: rgba(245, 158, 11, 0.1); }

/* ===== 工具/教程卡片网格 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.tool-card, .tutorial-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all 0.2s;
  cursor: pointer;
}

.tool-card:hover, .tutorial-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tool-card .tc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tool-card .tc-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tool-card h4, .tutorial-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.tool-card p, .tutorial-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tool-card .tc-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 8px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.tool-card .tc-tag.dev {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.tool-card .tc-tag.external {
  background: rgba(249, 115, 22, 0.1);
  color: #ea580c;
}

.tutorial-card .tc-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-light);
}

.tutorial-card .tc-stage {
  padding: 2px 8px;
  background: var(--bg-gray);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* ===== 分类页 ===== */
.page-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.page-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 16px 0;
  position: sticky;
  top: var(--nav-height);
  background: var(--bg);
  z-index: 50;
  border-bottom: 1px solid var(--border-light);
}

.category-tabs a {
  padding: 7px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}

.category-tabs a:hover,
.category-tabs a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.category-section {
  margin-bottom: 36px;
}

.category-section h2 {
  font-size: 19px;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-section h2 .cat-count {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 400;
}

/* ===== 网址导航/资源列表 ===== */
.link-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.link-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  cursor: pointer;
}

.link-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}

.link-item .li-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.link-item .li-content {
  flex: 1;
  min-width: 0;
}

.link-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-item .li-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.li-badge.free { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.li-badge.freemium { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.li-badge.cn { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.li-badge.foreign { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }

.link-item p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.link-item .li-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== 教程阶段 ===== */
.stage-timeline {
  position: relative;
  padding-left: 30px;
}

.stage-timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.stage-block {
  position: relative;
  margin-bottom: 32px;
}

.stage-block::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
}

.stage-block h3 {
  font-size: 18px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage-block .stage-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* ===== 页脚 ===== */
.footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 40px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}

.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: white; }

/* ===== 回到顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 99;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.back-to-top.show { display: flex; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-search { width: 160px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-search { display: none; }
  .mobile-menu-btn { display: block; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .module-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .link-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 28px 0; }
  .section-title { font-size: 19px; }
  .page-header h1 { font-size: 22px; }
  .category-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 12px; }
  .category-tabs a { flex-shrink: 0; }
  /* 移动端额外优化 */
  .container { padding: 0 16px; }
  .navbar-inner { padding: 0 16px; gap: 10px; }
  .logo span { font-size: 15px; }
  .theme-toggle { width: 34px; height: 34px; font-size: 16px; }
  .hero { padding: 40px 0; }
  .hero-search { flex-direction: column; gap: 10px; }
  .hero-search input, .hero-search button { width: 100%; }
  .hero-tags { gap: 8px; }
  .hero-tags a { font-size: 12px; padding: 4px 10px; }
  .tool-card, .tutorial-card, .link-item, .module-card { padding: 16px; }
  .ad-slot { height: 60px !important; font-size: 12px !important; }
  .breadcrumb { font-size: 12px; flex-wrap: wrap; }
  .tool-page { padding: 20px 0; }
  .tool-header h1 { font-size: 22px; }
  .tool-main { padding: 16px; }
  .btn { padding: 12px 20px; font-size: 14px; min-height: 44px; }
  input, textarea, select { font-size: 16px; } /* 防止iOS缩放 */
  .article-content { font-size: 15px; line-height: 1.8; }
  .article-content h2 { font-size: 20px; }
  .article-content h3 { font-size: 17px; }
  .article-content pre { font-size: 13px; padding: 12px; }
  .article-content blockquote { padding: 12px 16px; margin: 16px 0; }
  .toc-sidebar { position: static; width: 100%; max-height: none; margin-bottom: 20px; }
  .search-modal { width: 95%; margin-top: 20px; }
  .search-results { max-height: 50vh; }
  .back-to-top { width: 40px; height: 40px; bottom: 16px; right: 16px; }
  .info-grid { grid-template-columns: 1fr !important; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .stat-card { padding: 14px !important; }
  .stat-card .num { font-size: 18px !important; }
}

/* ===== 移动端菜单 ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  z-index: 99;
  box-shadow: var(--shadow-md);
}

.mobile-menu.show { display: block; }

.mobile-menu a {
  display: block;
  padding: 12px 8px;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu a:last-child { border-bottom: none; }

/* ===== 深色主题 ===== */
[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --accent: #38bdf8;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --text: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-light: #6b7280;
  --bg: #0f172a;
  --bg-white: #1e293b;
  --bg-gray: #334155;
  --border: #334155;
  --border-light: #1e293b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
}

[data-theme="dark"] body { background: var(--bg); }

[data-theme="dark"] .navbar,
[data-theme="dark"] .mobile-menu { background: var(--bg-white); }

[data-theme="dark"] .ad-slot {
  background: var(--bg-gray);
  color: var(--text-secondary);
  border: 1px dashed var(--border);
}

[data-theme="dark"] pre,
[data-theme="dark"] code {
  background: var(--bg-gray);
  color: #e2e8f0;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--bg-gray);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] table {
  background: var(--bg-white);
}

[data-theme="dark"] th {
  background: var(--bg-gray);
}

[data-theme="dark"] .tool-card,
[data-theme="dark"] .tutorial-card,
[data-theme="dark"] .link-item,
[data-theme="dark"] .module-card,
[data-theme="dark"] .resource-card {
  background: var(--bg-white);
  border-color: var(--border);
}

[data-theme="dark"] .tool-card:hover,
[data-theme="dark"] .tutorial-card:hover,
[data-theme="dark"] .link-item:hover,
[data-theme="dark"] .module-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59,130,246,0.15);
}

/* ===== 主题切换按钮 ===== */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  background: var(--bg-gray);
}

/* ===== 全站搜索弹窗 ===== */
.search-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.search-overlay.show { display: flex; }

.search-modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 640px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}

.search-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-modal-header input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  color: var(--text);
}

.search-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.search-result-item {
  padding: 12px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-item:hover { background: var(--bg-gray); }

.search-result-item .sri-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.search-result-item .sri-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.search-result-item .sri-type {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-gray);
  color: var(--text-secondary);
  margin-right: 8px;
}

.search-no-result {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.search-hint {
  padding: 12px 20px;
  font-size: 12px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

/* ===== 图片懒加载占位 ===== */
img.lazy {
  background: var(--bg-gray);
  min-height: 100px;
}

/* ===== 过渡动画 ===== */
* {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ===== 超小屏幕优化 ===== */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .navbar-inner { padding: 0 12px; }
  .logo span { font-size: 14px; }
  .logo-icon { width: 30px; height: 30px; font-size: 14px; }
  .hero { padding: 30px 0; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 14px; }
  .section-title { font-size: 17px; }
  .page-header h1 { font-size: 19px; }
  .page-header p { font-size: 14px; }
  .tool-header h1 { font-size: 19px; }
  .tool-main { padding: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .stat-card .num { font-size: 16px !important; }
  .stat-card .label { font-size: 11px !important; }
  .article-content { font-size: 14px; }
  .article-content h2 { font-size: 18px; }
  .article-content h3 { font-size: 16px; }
  .footer { padding: 24px 0; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .search-modal-header { padding: 12px 16px; }
  .search-result-item { padding: 10px 12px; }
  .ad-slot { height: 50px !important; }
  .btn { min-height: 42px; padding: 10px 16px; }
  .back-to-top { width: 36px; height: 36px; bottom: 12px; right: 12px; font-size: 16px; }
}
