/* ============================================================
   CloudPress · 基础骨架样式（所有主题共用）
   本文件只负责：重置、布局结构、表单/分页/认证页的基础可用性。
   ★ 视觉外观由激活的主题负责：/themes/<主题名>/theme.css
   默认主题：Aurora（public/themes/aurora/theme.css）
   ============================================================ */

:root {
  /* 基础设计令牌（主题可通过 theme.css 覆盖） */
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece5;
  --text: #26221c;
  --text-2: #6f675c;
  --text-3: #a49a8d;
  --border: #e5e0d6;
  --accent: #d94f2e;
  --accent-ink: #b03a1e;
  --accent-soft: #fbeae4;
  --accent-glow: rgba(217, 79, 46, 0.12);
  --code-bg: #f4f1ea;
  --shadow-sm: 0 1px 2px rgba(38, 34, 28, 0.05);
  --shadow-md: 0 2px 6px rgba(38, 34, 28, 0.06), 0 12px 32px rgba(38, 34, 28, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171512;
    --surface: #201d19;
    --surface-2: #29251f;
    --text: #eae5dd;
    --text-2: #a89e90;
    --text-3: #7d7468;
    --border: #38322a;
    --accent: #f0714f;
    --accent-ink: #ffb49c;
    --accent-soft: #37241c;
    --accent-glow: rgba(240, 113, 79, 0.14);
    --code-bg: #26221c;
  }
}

/* —— 基础 —— */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }

::selection { background: var(--accent-glow); color: var(--text); }

:focus-visible {
  outline: 3px solid var(--accent-glow);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }

.muted { color: var(--text-2); }
.small { font-size: 0.85em; }

/* —— 页头（结构） —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }

.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 1.15rem; }
.brand:hover { color: var(--text); }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; }
.brand-logo { width: 28px; height: 28px; border-radius: 6px; display: block; object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 6px 12px; border-radius: 6px; color: var(--text-2); font-size: 0.9rem; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--accent-ink); background: var(--accent-soft); font-weight: 600; }

/* 顶栏搜索框 */
.header-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2, #f5f5f7);
  border-radius: 8px; padding: 0 12px;
  margin-left: 16px; height: 34px;
  transition: background 0.2s;
}
.header-search:hover { background: var(--surface-3, #eaeaee); }
.header-search .search-icon {
  width: 15px; height: 15px; color: var(--text-3, #999);
  flex: none;
}
.header-search input {
  border: 0; outline: 0; background: transparent;
  width: 160px; font-size: 0.88rem; padding: 0;
  line-height: 34px; color: var(--text);
}
.header-search input::placeholder { color: var(--text-3, #999); }

.tagline { padding-bottom: 14px; color: var(--text-2); font-size: 0.98rem; }

/* 搜索页表单 */
.search-form {
  display: flex; gap: 0; margin: 0 0 28px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(46,107,230,.1);
}
.search-form input {
  flex: 1; border: 0; outline: 0; padding: 12px 18px;
  font-size: 1rem; background: transparent; box-shadow: none;
  color: var(--text);
}
.search-form input::placeholder { color: var(--text-3, #999); }
.search-form .btn {
  flex: none; margin: 0; border-radius: 8px;
  padding: 0 24px; font-size: 0.95rem;
}

/* —— 布局（结构） —— */
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; padding-top: 36px; padding-bottom: 64px; align-items: start; }
.content { min-width: 0; }
.sidebar { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 20px; }

/* —— 表单（基础） —— */
input, textarea, select, button { font: inherit; color: inherit; }

input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

textarea { resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover { border-color: var(--accent); color: var(--accent-ink); }

.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); color: #fff; }
.btn-block { width: 100%; }

form label { font-size: 0.9rem; color: var(--text-2); }

/* 蜜罐字段：对真人隐藏 */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* —— 分页 / 空状态 / 页头（基础） —— */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }

.pagination a, .pagination .page {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: 0.9rem;
}

.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.page-heading { font-family: var(--serif); font-size: 1.6rem; margin: 6px 0 26px; }
.heading-count { color: var(--text-3); font-size: 0.85rem; font-weight: 400; }

.empty-state { text-align: center; padding: 70px 20px; }
.empty-emoji { font-size: 3rem; }
.empty-state h1 { font-family: var(--serif); }

.list-meta { color: var(--text-3); font-size: 0.85rem; margin-top: 14px; text-align: center; }

/* —— 认证页（安装 / 登录 / 找回密码 / 错误）—— 固定品牌蓝，不随主题变化 */
.plain-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 20px;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(46, 107, 230, 0.14), transparent 62%),
    linear-gradient(160deg, #f4f7fc 0%, #e9f0fb 100%);
}

.auth-card {
  width: min(430px, 100%);
  background: #ffffff;
  border: 1px solid #e3e9f4;
  border-radius: 18px;
  padding: 38px 36px;
  box-shadow: 0 2px 6px rgba(30, 42, 68, 0.05), 0 16px 40px rgba(30, 42, 68, 0.09);
  text-align: center;
}

.auth-card h1 { font-family: var(--serif); font-size: 1.5rem; margin: 14px 0 6px; color: #1e2a44; }

.auth-logo {
  width: 60px; height: 60px; margin: 0 auto;
  border-radius: 16px;
  display: block;
  box-shadow: 0 6px 20px rgba(46, 107, 230, 0.28);
}

.auth-card .muted { margin-bottom: 18px; }
.stack-form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.stack-form label { display: block; }
.stack-form input { margin-top: 5px; }

.auth-foot { margin: 18px 0 0; font-size: 0.88rem; color: #5a6b8c; }
.auth-foot a { color: #2e6be6; font-weight: 600; }
.auth-foot a:hover { color: #1d4fc0; }

/* 认证页控件固定品牌蓝 */
.plain-body input[type="text"], .plain-body input[type="password"], .plain-body input[type="email"] {
  width: 100%;
  background: #fff;
  border: 1px solid #e3e9f4;
  border-radius: 9px;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 0.94rem;
  color: #1e2a44;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.plain-body input:focus {
  outline: none;
  border-color: #2e6be6;
  box-shadow: 0 0 0 4px rgba(46, 107, 230, 0.12);
}
.plain-body .btn.primary {
  background: linear-gradient(135deg, #2e6be6, #1d4fc0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(46, 107, 230, 0.3);
}
.plain-body .btn.primary:hover { background: linear-gradient(135deg, #1d4fc0, #16409e); color: #fff; }

.check-row { display: flex !important; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-2); }
.check-row input { width: auto; margin: 0; }

.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.92rem; margin-bottom: 16px; text-align: left; }
.alert.error { background: #fdeeee; color: #c0392b; border: 1px solid #f5c6c2; }
.alert.ok { background: #e3f1e4; color: #2e7d32; border: 1px solid #cde8cf; }

/* —— 页脚（结构） —— */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0; color: var(--text-3); font-size: 0.88rem; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-rss { color: var(--text-3); }
.footer-rss:hover { color: var(--accent); }

/* —— 移动端组件（桌面隐藏） —— */
.menu-toggle { display: none; }
.mobile-drawer { display: none; }
.drawer-mask { display: none; }
.mobile-tabs { display: none; }

/* —— 响应式 —— */
@media (max-width: 980px) {
  .main-grid { grid-template-columns: 1fr; gap: 28px; }
  .sidebar { position: static; }
}

@media (max-width: 720px) {
  body { font-size: 16px; padding-bottom: 60px; }
  .container { padding: 0 16px; }
  .main-grid { padding-top: 16px; }

  /* 吸顶栏 */
  .site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.95);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border, #ececec);
  }
  .header-inner { height: 50px; }
  .brand { flex: none; gap: 6px; }
  .brand-logo { width: 24px; height: 24px; }
  .brand-name { font-size: 1rem; white-space: nowrap; }

  /* 汉堡按钮 */
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 3px;
    width: 34px; height: 34px; padding: 6px; margin-right: 4px;
    background: transparent; border: 0; cursor: pointer; border-radius: 8px;
  }
  .menu-toggle span { display: block; height: 2px; background: var(--text, #222); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  /* 桌面导航收起，走抽屉 */
  .main-nav { display: none; }
  /* 手机端顶栏搜索框：紧凑小尺寸 */
  .header-search {
    margin-left: auto; height: 30px; padding: 0 10px; gap: 6px;
  }
  .header-search input { width: 60px; font-size: .8rem; line-height: 30px; }
  .header-search .search-icon { width: 13px; height: 13px; }
  /* 手机端顶栏只留干净一行 */
  .tagline { display: none; }

  /* 底部 Tab 栏 */
  .mobile-tabs {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
    height: 58px; padding-bottom: env(safe-area-inset-bottom, 0);
    background: rgba(255,255,255,.94); backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border, #ececec);
  }
  .mobile-tabs a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: .72rem; color: var(--text-3, #888); text-decoration: none;
  }
  .mobile-tabs a.active { color: var(--accent, #2e6be6); font-weight: 600; }
  .mobile-tabs svg { width: 22px; height: 22px; }
  .mobile-tabs span { line-height: 1; }

  /* 抽屉 */
  .mobile-drawer {
    display: block; position: fixed; top: 0; left: 0; z-index: 300;
    width: 80%; max-width: 300px; height: 100dvh; overflow-y: auto;
    background: #fff; box-shadow: 4px 0 24px rgba(0,0,0,.08);
    transform: translateX(-105%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    padding-bottom: 24px;
  }
  .mobile-drawer.open { transform: translateX(0); }
  .drawer-head { display: flex; align-items: center; gap: 10px; padding: 20px 18px 14px; border-bottom: 1px solid var(--border, #f0f0f0); }
  .drawer-name { font-weight: 700; font-size: 1.05rem; }
  .drawer-desc { font-size: .8rem; color: var(--text-3, #888); margin-top: 2px; }
  .drawer-nav { display: flex; flex-direction: column; padding: 8px 0; }
  .drawer-nav a {
    padding: 12px 18px; font-size: .98rem; color: var(--text, #222);
    border-left: 3px solid transparent;
  }
  .drawer-nav a.active { color: var(--accent, #2e6be6); background: var(--accent-soft, rgba(46,107,230,.08)); border-left-color: var(--accent, #2e6be6); font-weight: 600; }
  .drawer-mask {
    display: block; position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .drawer-mask.show { opacity: 1; pointer-events: auto; }
  body.drawer-lock { overflow: hidden; }

  /* 底部 Tab 栏 */
  .mobile-tabs {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
    height: 58px; padding-bottom: env(safe-area-inset-bottom, 0);
    background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border, #ececec);
  }
  .mobile-tabs a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: .72rem; color: var(--text-3, #888); text-decoration: none;
  }
  .mobile-tabs a.active { color: var(--accent, #2e6be6); font-weight: 600; }
  .mobile-tabs svg { width: 22px; height: 22px; }
  .mobile-tabs span { line-height: 1; }

  /* 表格横向滚动 */
  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
  .data-table th, .data-table td { white-space: normal; }
  .site-footer .container { justify-content: center; text-align: center; }
  .auth-card { padding: 28px 22px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto; }
}

/* —— 滚动条 —— */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
/* ============================================================
   CloudPress · Hope（希望风）主题
   蓝色主色 · CMS 布局：顶部轮播 + 左图右文卡片 + 侧栏统计/热门
   ============================================================ */

:root {
  /* 设计令牌：蓝色系 */
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #eef2fa;
  --text: #22304a;
  --text-2: #5a6b8c;
  --text-3: #93a1bd;
  --border: #e3e9f4;
  --accent: #2e6be6;
  --accent-ink: #1d4fc0;
  --accent-soft: #e8f0fe;
  --accent-glow: rgba(46, 107, 230, 0.12);
  --code-bg: #101828;
  --shadow-sm: 0 1px 2px rgba(34, 48, 74, 0.05);
  --shadow-md: 0 2px 6px rgba(34, 48, 74, 0.06), 0 14px 36px rgba(34, 48, 74, 0.09);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1524;
    --surface: #16203a;
    --surface-2: #1c2947;
    --text: #e8edf8;
    --text-2: #a7b5d2;
    --text-3: #7283a5;
    --border: #26365c;
    --accent: #5b8def;
    --accent-ink: #8fb1f7;
    --accent-soft: #1e2c52;
    --accent-glow: rgba(91, 141, 239, 0.16);
    --code-bg: #0b1220;
  }
}

/* —— 页头：白底蓝字 —— */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #2e6be6, #1d4fc0);
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 19px;
  box-shadow: 0 4px 12px rgba(46, 107, 230, 0.35);
}
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: 0.5px; }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: var(--text-2);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.main-nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.main-nav a.nav-rss { color: var(--accent); font-weight: 600; }
.tagline { color: var(--text-2); font-size: 14px; padding: 0 20px 12px; margin-top: -4px; }

/* —— 主布局 —— */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  padding: 26px 20px 40px;
  align-items: start;
}
.content { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }

/* —— 轮播 —— */
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #0f1b33;
  margin-bottom: 26px;
}
.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  height: 300px;
  display: block;
  color: #fff;
  overflow: hidden;
}
.carousel-media { position: absolute; inset: 0; }
.carousel-media img { width: 100%; height: 100%; object-fit: cover; }
.carousel-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #3b7bf2, #1d4fc0 60%, #16294f);
  font-family: var(--serif);
  font-size: 96px;
  color: rgba(255, 255, 255, 0.28);
}
.carousel-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 30px 24px;
  background: linear-gradient(to top, rgba(7, 14, 28, 0.92) 0%, rgba(7, 14, 28, 0.55) 55%, transparent 100%);
}
.carousel-overlay .post-cat {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.carousel-overlay .post-cat:hover { background: var(--accent-ink); color: #fff; }
.carousel-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.35;
  color: #fff;
}
.carousel-title a { color: #fff; }
.carousel-title a:hover { color: #cfe0ff; }
.carousel-excerpt {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.carousel-meta { font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 5;
}
.carousel:hover .carousel-arrow { opacity: 1; }
.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }
.carousel-arrow:hover { background: #fff; }
.carousel-dots {
  position: absolute;
  bottom: 12px;
  right: 18px;
  display: flex;
  gap: 7px;
  z-index: 5;
}
.carousel-dot {
  width: 9px; height: 9px;
  border: none;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: width 0.2s, background 0.2s;
}
.carousel-dot.active { width: 22px; background: #fff; }

/* —— 文章卡片：左图右文 —— */
.post-grid { display: grid; gap: 18px; }
.card {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
  position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-media { position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card-fallback {
  width: 100%; height: 100%;
  min-height: 190px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
  color: var(--accent);
  font-family: var(--serif);
  font-size: 52px;
}
.card-body { padding: 20px 22px 16px; display: flex; flex-direction: column; }
.card-body .post-cat {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  margin-right: 8px;
}
.card-title {
  margin: 8px 0 8px;
  font-size: 20px;
  line-height: 1.45;
  font-family: var(--serif);
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.post-meta { font-size: 12.5px; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.read-more { color: var(--accent); font-size: 13.5px; font-weight: 600; }
.card:hover .read-more { text-decoration: underline; }

/* —— 侧栏组件 —— */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding-left: 11px;
  border-left: 3px solid var(--accent);
  line-height: 1.3;
}
.widget-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  text-align: center;
}
.widget-stats .stat {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px 6px 10px;
}
.widget-stats .stat strong {
  display: block;
  font-size: 21px;
  color: var(--accent);
  font-weight: 800;
  line-height: 1.2;
}
.widget-stats .stat span { font-size: 12px; color: var(--text-3); }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.chip:hover { background: var(--accent); color: #fff; }
.chip-count { opacity: 0.65; margin-left: 4px; font-size: 12px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.recent-list li:last-child { border-bottom: none; }
.recent-list a { color: var(--text); font-size: 14px; line-height: 1.5; }
.recent-list a:hover { color: var(--accent); }
.recent-date { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tag-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 6px;
}
.tag:hover { background: var(--accent); color: #fff; }
.hot-list { list-style: none; margin: 0; padding: 0; counter-reset: hot; }
.hot-list li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.hot-list li:last-child { border-bottom: none; }
.hot-rank {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  display: grid; place-items: center;
  transform: translateY(2px);
}
.hot-list li:nth-child(1) .hot-rank { background: var(--accent); color: #fff; }
.hot-list li:nth-child(2) .hot-rank { background: #4b83ea; color: #fff; }
.hot-list li:nth-child(3) .hot-rank { background: #7aa4f0; color: #fff; }
.hot-list a { color: var(--text); font-size: 13.5px; line-height: 1.45; flex: 1; }
.hot-list a:hover { color: var(--accent); }
.hot-views { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* —— 按钮 / 分页 —— */
.btn { display: inline-block; border-radius: var(--radius-sm); }
.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(46, 107, 230, 0.28);
}
.btn.primary:hover { background: var(--accent-ink); color: #fff; }
.pagination a, .pagination span.page, .pagination .current {
  border-radius: var(--radius-sm);
}
.pagination a:hover { background: var(--accent-soft); color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border-color: transparent; }

/* —— 文章页 —— */
.single-post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 38px 30px;
  box-shadow: var(--shadow-sm);
}
.post-header .post-cat {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.post-title { font-family: var(--serif); margin: 8px 0 10px; }
.post-content a { color: var(--accent); }
.post-content a:hover { text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-content pre { background: var(--code-bg); color: #dbe6ff; border-radius: var(--radius-sm); }
.post-content code { border-radius: 5px; }
.post-cover { border-radius: var(--radius-sm); margin: 18px 0; }

/* —— 评论 —— */
.comments { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin-top: 20px; }
.avatar { background: var(--accent); color: #fff; }
.comment-form input, .comment-form textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }

/* —— 页脚 —— */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  padding: 22px 0;
}
.site-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 20px; }
.footer-rss { color: var(--accent); }

/* —— 响应式 —— */
@media (max-width: 980px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .carousel-slide { height: 300px; }
  .carousel-title { font-size: 21px; }
  .carousel-excerpt { -webkit-line-clamp: 1; }
  .card { grid-template-columns: 1fr; }
  .card-media img { position: static; height: 200px; }
  .single-post { padding: 24px 18px 20px; }
  .carousel-arrow { display: none; }
  .carousel-dots { bottom: 14px; }
  .carousel-slide img { height: 300px; }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .carousel { margin-bottom: 22px; }
  .carousel-slide, .carousel-slide img { height: 240px; }
  .carousel-overlay { padding: 14px 16px; }
  .carousel-title { font-size: 18px; }
  .carousel-meta { font-size: 12px; }
  .card { padding: 16px; gap: 14px; }
  .card-media img { height: 180px; }
  .card-title { font-size: 1.1rem; }
  .card-excerpt { -webkit-line-clamp: 2; }
  .widget, .post-card { padding: 18px; }
  .post-title { font-size: 1.5rem; }
  .post-content { font-size: 1rem; }
  .comment-form .form-row { grid-template-columns: 1fr; }
  .hero { padding: 26px 20px; }
  .widget-stats .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .widget-stats .stat { padding: 8px 4px; }
  .pagination { gap: 4px; }
  .pagination a, .pagination .page { min-width: 30px; height: 30px; padding: 0 8px; }
}

/* —— 移动端精致化（主流 App 风） —— */
@media (max-width: 720px) {
  .card { border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
  .card:hover { transform: none; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
  .carousel { border-radius: 16px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
  .widget { border-radius: 14px; }
  .single-post { border-radius: 16px; }
  .post-title { line-height: 1.35; }
  .post-content p, .post-content li { line-height: 1.85; }
  .post-content img { border-radius: 12px; margin: 14px auto; }
  .post-content blockquote { border-radius: 0 12px 12px 0; padding: 12px 16px; }
  .post-content pre { border-radius: 12px; font-size: .85rem; }
  .comment-item { border-radius: 12px; padding: 12px; }
}
@media (max-width: 480px) {
  .card { border-radius: 14px; }
  .single-post { padding: 20px 16px 18px; }
  .post-meta { flex-wrap: wrap; gap: 8px; }
}

/* 主页搜索框 */
.home-search {
  display: flex; gap: 10px; margin: 0 0 24px;
  background: #fff; border: 1px solid var(--border, #ececec);
  border-radius: 14px; padding: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.home-search input {
  flex: 1; border: 0; outline: 0; padding: 10px 14px;
  font-size: 1rem; background: transparent;
}
.home-search .btn { flex: none; }
