:root {
  --bg: #f4f6f9;
  --card: #fff;
  --text: #2c3e50;
  --muted: #7f8c8d;
  --accent: #3498db;
  --border: #e8ecf1;
  --tag-bg: #eef4fb;
  --tag-text: #2980b9;
  --shadow: 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.topbar .logo { font-size: 18px; font-weight: 700; color: var(--text); }
.topbar .logo span { color: var(--accent); }
.topbar nav a { margin-left: 24px; font-size: 14px; color: var(--muted); text-decoration: none; transition: .2s; }
.topbar nav a:hover { color: var(--accent); }

.main-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 28px;
}

.content { width: 100%; }

.blog-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 12px;
  padding: 40px 36px;
  margin-bottom: 24px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: sticky;
  top: 64px;
  z-index: 50;
}
.blog-hero h1 { font-size: 28px; margin-bottom: 6px; }
.blog-hero p { color: rgba(255,255,255,.7); font-size: 14px; margin-bottom: 20px; }

.line-section { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; }
.xianlu_item {
  text-decoration: none;
  padding: 16px 35px; border-radius: 12px; font-size: 18px; font-weight: 700;
  color: #fff; border: none; cursor: pointer; font-family: inherit; transition: .2s; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.xianlu_item:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.xianlu_item:active { transform: translateY(0); box-shadow: inset 0 2px 4px rgba(0,0,0,.2); }
.xianlu_item.btn_style0 { background: linear-gradient(180deg, #a569bd 0%, #6c3483 100%); }
.xianlu_item.btn_style1 { background: linear-gradient(180deg, #5dde8e 0%, #1e8449 100%); }
.xianlu_item.btn_style2 { background: linear-gradient(180deg, #f7b84c 0%, #d35400 100%); }
.xianlu_item.btn_style3 { background: linear-gradient(180deg, #5dade2 0%, #1a5276 100%); }
.xianlu_item.btn_style4 { background: linear-gradient(180deg, #f1948a 0%, #c0392b 100%); }
.xianlu_item.btn_style5 { background: linear-gradient(180deg, #f8c471 0%, #b7950b 100%); }
.xianlu_item.btn_style6 { background: linear-gradient(180deg, #7dcea0 0%, #117a65 100%); }
.xianlu_item.btn_style7 { background: linear-gradient(180deg, #85c1e9 0%, #21618c 100%); }
.xianlu_item.btn_style8 { background: linear-gradient(180deg, #bb8fce 0%, #78281f 100%); }
.xianlu_item.btn_style9 { background: linear-gradient(180deg, #f5b7b1 0%, #922b21 100%); }
.xianlu_item.btn_style10 { background: linear-gradient(180deg, #d2b4de 0%, #4a235a 100%); }

.line-tip { color: rgba(255,255,255,.5); font-size: 12px; margin-top: 10px; width: 100%; display:flex; align-items:center; justify-content:center; gap:8px; }
.line-tip-spinner { width:14px; height:14px; border:2px solid rgba(255,255,255,.35); border-top-color:#fff; border-radius:50%; flex-shrink:0; animation:wb-tip-rot .8s linear infinite; }
.line-tip-spinner.hidden { display:none; }
@keyframes wb-tip-rot { to { transform:rotate(360deg); } }

/* ── 跳转前双重检测 UI（用户视角） ── */
.xianlu_item.disabled { opacity:.55; cursor:wait; transform:none !important; box-shadow:none !important; }
.xianlu_item.active-probing { animation: wb-pulse 1.1s ease-in-out infinite; }
@keyframes wb-pulse { 0%,100% { filter:brightness(1); } 50% { filter:brightness(1.3); } }
#wb-tip { position:fixed; left:50%; bottom:28px; transform:translateX(-50%); background:#1f2937; color:#fff; padding:10px 18px; border-radius:8px; font-size:13px; z-index:9999; box-shadow:0 6px 20px rgba(0,0,0,.25); max-width:88vw; line-height:1.6; }
#wb-tip.ok { background:#1e8449; }
.line-tip.warn { color:#ffd166; }

.article-card {
  background: var(--card); border-radius: 10px; padding: 24px 28px;
  margin-bottom: 16px; box-shadow: var(--shadow); transition: .2s;
}
.article-card:hover { box-shadow: var(--shadow-lg); }
.article-card h2 { font-size: 18px; margin-bottom: 8px; }
.article-card h2 a { color: inherit; text-decoration: none; }
.article-card h2 a:hover { color: var(--accent); }
.article-body { font-size: 15px; line-height: 2; color: var(--text); }
.article-body p { margin-bottom: 16px; }
.article-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 16px; flex-wrap: wrap; }
.article-meta span { display: flex; align-items: center; gap: 4px; }
.article-card .excerpt { font-size: 14px; color: #5a6a7a; line-height: 1.8; }
.article-card .tags { margin-top: 12px; }
.tag {
  display: inline-block; background: var(--tag-bg); color: var(--tag-text);
  font-size: 12px; padding: 3px 10px; border-radius: 12px; margin-right: 6px;
}

.sidebar { width: 300px; flex-shrink: 0; }
.sidebar-card {
  background: var(--card); border-radius: 10px; padding: 20px;
  margin-bottom: 16px; box-shadow: var(--shadow);
}
.sidebar-card h3 { font-size: 15px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); display: inline-block; }
.sidebar-card ul { list-style: none; }
.sidebar-card ul li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.sidebar-card ul li:last-child { border-bottom: none; }
.sidebar-card ul li a { color: var(--text); text-decoration: none; transition: .2s; }
.sidebar-card ul li a:hover { color: var(--accent); }
.sidebar-card .count { float: right; background: #f0f0f0; padding: 1px 8px; border-radius: 10px; font-size: 11px; color: #999; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud .t {
  font-size: 12px; background: var(--tag-bg); color: var(--tag-text);
  padding: 4px 10px; border-radius: 12px; cursor: pointer; transition: .2s;
}
.tag-cloud .t:hover { background: var(--accent); color: #fff; }

.footer {
  text-align: center; padding: 32px 20px; color: var(--muted);
  font-size: 13px; border-top: 1px solid var(--border); margin-top: 40px;
}
.footer a { color: var(--accent); text-decoration: none; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.page-link { padding: 8px 14px; border-radius: 6px; font-size: 13px; color: var(--muted); background: var(--card); box-shadow: var(--shadow); text-decoration: none; min-width: 36px; text-align: center; }
.page-link:hover { background: var(--hover); }
.page-link.active { background: var(--accent); color: #fff; }

@media (max-width: 900px) {
  .blog-hero { padding: 24px 20px; }
  .blog-hero h1 { font-size: 22px; }
  .line-section { flex-direction: column; }
  .xianlu_item { width: 100%; }
  .topbar-inner { flex-wrap: nowrap; }
  .topbar .logo { font-size: 16px; flex-shrink: 0; }
  .topbar nav { display: flex; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .topbar nav a { margin-left: 16px; font-size: 13px; flex-shrink: 0; }
  .topbar nav::-webkit-scrollbar { display: none; }
}