/* =========================================
   1. CSS 变量定义 (黑白模式核心)
   ========================================= */
:root {
    /* --- 浅色模式 (默认) --- */
    --bg-body: #f8fafc;        /* 整体背景：浅灰白 */
    --bg-card: #ffffff;        /* 卡片背景：纯白 */
    --text-main: #1e293b;      /* 主要文字：深蓝灰 */
    --text-muted: #64748b;     /* 次要文字：浅蓝灰 */
    --primary: #3b82f6;        /* 主色调：蓝 */
    --primary-hover: #2563eb;  /* 悬停色 */
    --border: #e2e8f0;         /* 边框色 */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* 阴影 */
    --nav-bg: rgba(255, 255, 255, 0.9); /* 导航栏背景 */
    --dropdown-bg: #ffffff;
    --dropdown-text: #1e293b;
    --dropdown-muted: #475569;
    --dropdown-border: #e2e8f0;
    --dropdown-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --dropdown-child-bg: #f8fafc;
    --dropdown-hover-bg: #eaf3ff;
    --dropdown-hover-text: #2563eb;
}

/* --- 深色模式 (当 html.dark-mode 时生效) --- */
html.dark-mode {
    --bg-body: #0f172a;        /* 整体背景：深蓝黑 */
    --bg-card: #1e293b;        /* 卡片背景：深蓝灰 */
    --text-main: #f1f5f9;      /* 主要文字：亮灰白 */
    --text-muted: #94a3b8;     /* 次要文字：灰蓝 */
    --primary: #60a5fa;        /* 主色调：亮蓝 */
    --primary-hover: #93c5fd;
    --border: #334155;         /* 边框色 */
    --shadow: none;            /* 深色模式去阴影 */
    --nav-bg: rgba(15, 23, 42, 0.9);
    --dropdown-bg: #1a1a2e;
    --dropdown-text: #f8fafc;
    --dropdown-muted: #cbd5e1;
    --dropdown-border: rgba(148, 163, 184, 0.18);
    --dropdown-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
    --dropdown-child-bg: rgba(148, 163, 184, 0.12);
    --dropdown-hover-bg: rgba(96, 165, 250, 0.28);
    --dropdown-hover-text: #ffffff;
}


/* 全局防横向溢出：避免轮播、canvas、媒体元素撑出视口导致首页右移 */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, canvas, video, iframe, .swiper, .swiper-wrapper, .swiper-slide, .banner-container {
    max-width: 100%;
}

/* =========================================
   2. 全局基础样式
   ========================================= */
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0; padding: 0;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s; /* 平滑过渡 */
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   3. 顶部导航栏 (Header)
   ========================================= */
.header {
    background: var(--nav-bg);
    position: sticky; top: 0; z-index: 10000;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}
.header .container { display: flex; justify-content: space-between; align-items: center; }

.blog-logo { font-size: 1.5rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; }

.nav { display: flex; gap: 20px; align-items: center; }
.nav a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); padding: 5px 10px; border-radius: 6px; }
.nav a:hover, .nav a.active { color: var(--primary); background: rgba(59, 130, 246, 0.1); }

#theme-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--border); color: var(--text-main);
}

/* =========================================
   4. 首页布局 (Banner & Sidebar)
   ========================================= */
/* 轮播图容器 */
.banner-container {
    width: 100%; max-width: 100%; height: 360px; /* 恢复高度 */
    border-radius: 22px; overflow: hidden;
    margin-bottom: 30px; position: relative;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
    transform: translateZ(0);
    transition: transform 0.3s ease;
}
.banner-container:hover {
    transform: translateY(-2px);
}
.swiper, .swiper-wrapper, .swiper-slide { width: 100%; max-width: 100%; height: 100%; }
.home-banner-link { position: relative; display: block; width: 100%; max-width: 100%; height: 100%; color: #fff; overflow: hidden; border-radius: 20px; background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 45%, #0f172a 100%); }
.home-banner-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,0.08) 0%, rgba(15,23,42,0.18) 35%, rgba(15,23,42,0.72) 100%); }
.home-banner-link img, .banner-link img { width: 100%; max-width: 100%; height: 100%; object-fit: cover; display: block; }
.home-banner-content { position: absolute; left: 28px; right: 28px; bottom: 24px; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.home-banner-tag { display: inline-flex; align-items: center; width: fit-content; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(8px); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.home-banner-title { margin: 0; font-size: 1.8rem; font-weight: 800; color: #fff; }
.home-banner-desc { margin: 0; max-width: 680px; font-size: 0.98rem; line-height: 1.8; color: rgba(255,255,255,0.88); white-space: pre-wrap; }
.banner-link img { width: 100%; height: 100%; object-fit: cover; }

/* 默认欢迎卡片 */
.default-banner {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
}

/* Swiper 分页器样式优化 */
.swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
}
.swiper-pagination-bullet-active {
    width: 24px !important;
    border-radius: 4px !important;
    background: #ffffff !important;
}

/* 主内容双栏布局 */
.main-wrapper { display: flex; gap: 30px; margin-top: 30px; max-width: 100%; overflow-x: clip; align-items: flex-start; }
.post-list-area { flex: 1; min-width: 0; width: 100%; /* 防止内容溢出 */ }
.sidebar { width: 320px; flex-shrink: 0; } /* 固定侧边栏宽度 */
.sidebar .sidebar-widget { border-radius: 18px; box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08); }

@media (max-width: 768px) {
    .main-wrapper { flex-direction: column; }
    .sidebar { width: 100%; }
    .banner-container { height: 200px; }
}

/* =========================================
   5. 文章卡片 (Post Card)
   ========================================= */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px; margin-bottom: 25px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.post-cover img {
    width: 100%; height: 220px; object-fit: cover;
    border-radius: 8px; margin-bottom: 15px;
}
.post-card h3 { margin: 10px 0; font-size: 1.5rem; line-height: 1.3; }
.post-summary { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.read-more { color: var(--primary); font-weight: 600; }

/* =========================================
   6. 侧边栏小组件 (Sidebar Widgets)
   ========================================= */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px; margin-bottom: 20px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}
.sidebar-widget h4 {
    margin: 0 0 15px 0; font-size: 1.1rem;
    border-bottom: 2px solid var(--border); padding-bottom: 10px;
    color: var(--text-main);
}

/* 搜索框 */
.search-box { display: flex; gap: 5px; }
.search-box input {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--border); border-radius: 6px;
    background: var(--bg-body); color: var(--text-main);
}
.search-box button {
    background: var(--primary); color: white; border: none;
    border-radius: 6px; padding: 0 15px; cursor: pointer;
}

/* 分类标签 */
.category-list { display: flex; flex-direction: column; gap: 5px; }
.category-item {
    display: flex; justify-content: space-between;
    padding: 10px; border-radius: 6px;
    background: var(--bg-body); color: var(--text-muted);
    font-size: 0.9rem;
}
.category-item:hover { background: var(--border); color: var(--primary); }
.category-item.active { background: var(--primary); color: white; }

/* =========================================
   7. 归档页样式 (Archive / Timeline)
   ========================================= */
.timeline-year {
    font-size: 1.8rem; font-weight: bold;
    margin: 30px 0 15px; color: var(--primary);
    position: relative; padding-left: 15px;
}
.timeline-year::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 6px; height: 24px; background: var(--primary); border-radius: 3px;
}
.archive-list { margin-left: 10px; border-left: 2px solid var(--border); padding-left: 20px; }
.archive-item {
    display: flex; align-items: baseline; padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}
.archive-date {
    font-family: monospace; color: var(--text-muted);
    margin-right: 15px; font-size: 0.95rem; min-width: 50px;
}
.archive-title { font-size: 1rem; color: var(--text-main); font-weight: 500; }
.archive-title:hover { color: var(--primary); padding-left: 5px; }

/* =========================================
   8. 关于页样式 (Profile Card)
   ========================================= */
.about-container { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px; text-align: center;
    box-shadow: var(--shadow);
}
.avatar {
    width: 120px; height: 120px; border-radius: 50%;
    border: 4px solid var(--bg-body);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.profile-name { font-size: 1.8rem; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.profile-motto { font-size: 1.1rem; color: var(--text-muted); font-style: italic; margin-bottom: 30px; }
.about-banner-wrap { width: 100%; margin-bottom: 28px; }
.about-banner-card { margin-bottom: 0; height: 280px; border-radius: 18px; box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12); }
.about-banner-card .home-banner-link, .about-banner-card .home-default-banner { border-radius: 18px; }
.about-banner-card .home-banner-content { left: 22px; right: 22px; bottom: 20px; }
.about-banner-card .home-banner-title { font-size: 1.45rem; }
.about-banner-card .home-banner-desc { font-size: 0.95rem; }
.about-banner-pagination .swiper-pagination-bullet { background: rgba(255,255,255,0.55) !important; }
.about-banner-pagination .swiper-pagination-bullet-active { background: #ffffff !important; }
.about-banner-nav { width: 40px; height: 40px; margin-top: 0; border-radius: 999px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.24); color: #fff; backdrop-filter: blur(10px); }
.about-banner-nav::after { font-size: 15px; font-weight: 700; }
@media (max-width: 768px) {
    .about-banner-card { height: 220px; }
    .about-banner-card .home-banner-content { left: 18px; right: 18px; bottom: 16px; }
    .about-banner-card .home-banner-title { font-size: 1.2rem; }
    .about-banner-card .home-banner-desc { font-size: 0.88rem; line-height: 1.6; }
}

/* 底部 */
.footer {
    text-align: center; padding: 40px 0; margin-top: 40px;
    border-top: 1px solid var(--border); color: var(--text-muted);
}

/* ... 前面的样式保持不变 ... */

/* =========================================
   1. CSS 变量定义 (黑白模式核心)
   ========================================= */
   :root {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #3b82f6;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --dropdown-bg: #ffffff;
    --dropdown-text: #1e293b;
    --dropdown-muted: #475569;
    --dropdown-border: #e2e8f0;
    --dropdown-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --dropdown-child-bg: #f8fafc;
    --dropdown-hover-bg: #eaf3ff;
    --dropdown-hover-text: #2563eb;
}

html.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #60a5fa;
    --border: #334155;
    --shadow: none;
    --nav-bg: rgba(15, 23, 42, 0.9);
    --dropdown-bg: #1a1a2e;
    --dropdown-text: #f8fafc;
    --dropdown-muted: #cbd5e1;
    --dropdown-border: rgba(148, 163, 184, 0.18);
    --dropdown-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
    --dropdown-child-bg: rgba(148, 163, 184, 0.12);
    --dropdown-hover-bg: rgba(96, 165, 250, 0.28);
    --dropdown-hover-text: #ffffff;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0; padding: 0; line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; transition: 0.2s; }
a:hover { color: var(--primary); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航栏 */
.header { background: var(--nav-bg); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10000; border-bottom: 1px solid var(--border); padding: 15px 0; }
.header .container { display: flex; justify-content: space-between; align-items: center; }
.blog-logo { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); padding: 5px 10px; border-radius: 6px; }
.nav a:hover, .nav a.active { color: var(--primary); background: rgba(59, 130, 246, 0.1); }
#theme-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--border); color: var(--text-main); }

/* 布局 */
.banner-container { width: 100%; max-width: 100%; height: 360px; border-radius: 12px; overflow: hidden; margin-bottom: 30px; position: relative; box-shadow: var(--shadow); }
.swiper, .swiper-wrapper, .swiper-slide { width: 100%; max-width: 100%; height: 100%; }
.banner-link img { width: 100%; height: 100%; object-fit: cover; }
.default-banner { width: 100%; height: 100%; background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.main-wrapper { display: flex; gap: 30px; margin-top: 30px; max-width: 100%; overflow-x: clip; align-items: flex-start; }
.post-list-area { flex: 1; min-width: 0; }
.sidebar { width: 320px; flex-shrink: 0; }

/* 文章卡片 */
.post-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 25px; margin-bottom: 25px; box-shadow: var(--shadow); transition: transform 0.2s; }
.post-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.post-cover img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; margin-bottom: 15px; }
.post-card h3 { margin: 10px 0; font-size: 1.5rem; }
.post-summary { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.read-more { color: var(--primary); font-weight: 600; }

/* 侧边栏 */
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.sidebar-widget h4 { margin: 0 0 15px 0; font-size: 1.1rem; border-bottom: 2px solid var(--border); padding-bottom: 10px; color: var(--text-main); }
.search-box { display: flex; gap: 5px; }
.search-box input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-body); color: var(--text-main); }
.search-box button { background: var(--primary); color: white; border: none; border-radius: 6px; padding: 0 15px; cursor: pointer; }
.category-list { display: flex; flex-direction: column; gap: 5px; }
.category-item { display: flex; justify-content: space-between; padding: 10px; border-radius: 6px; background: var(--bg-body); color: var(--text-muted); font-size: 0.9rem; }
.category-item:hover { background: var(--border); color: var(--primary); }
.category-item.active { background: var(--primary); color: white; }

/* 归档页 */
.timeline-year { font-size: 1.8rem; font-weight: bold; margin: 30px 0 15px; color: var(--primary); position: relative; padding-left: 15px; }
.timeline-year::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 6px; height: 24px; background: var(--primary); border-radius: 3px; }
.archive-list { margin-left: 10px; border-left: 2px solid var(--border); padding-left: 20px; }
.archive-item { display: flex; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.archive-date { font-family: monospace; color: var(--text-muted); margin-right: 15px; font-size: 0.95rem; min-width: 50px; }
.archive-title { font-size: 1rem; color: var(--text-main); font-weight: 500; }
.archive-title:hover { color: var(--primary); padding-left: 5px; }

/* 关于页 */
.about-container { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; text-align: center; box-shadow: var(--shadow); }
.avatar { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--bg-body); box-shadow: 0 4px 12px rgba(0,0,0,0.1); margin-bottom: 20px; }
.profile-name { font-size: 1.8rem; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.profile-motto { font-size: 1.1rem; color: var(--text-muted); font-style: italic; margin-bottom: 30px; }
.footer { text-align: center; padding: 40px 0; margin-top: 40px; border-top: 1px solid var(--border); color: var(--text-muted); }

/* 🔥🔥🔥 新增：分页器样式 (适配黑白模式) 🔥🔥🔥 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 20px;
}

.page-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.page-item:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.page-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
}

.page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
    box-shadow: none;
}

/* 筛选提示框样式 */
.filter-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}
.filter-alert a { font-weight: bold; font-size: 0.9rem; }

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* ... 原有代码保持不变，追加以下内容 ... */

/* =========================================
   9. 分页与条数选择器 (Pagination & Limit)
   ========================================= */

/* 容器：使用 Flex 布局让 分页器 和 选择器 并排或居中 */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
}

/* 1. 分页按钮组 */
.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.page-item:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
    box-shadow: none;
}

.page-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 10px;
}

/* 2. 条数下拉框 */
.limit-selector {
    display: flex;
    align-items: center;
}

.limit-select {
    appearance: none; /* 去除原生样式 */
    -webkit-appearance: none;
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 30px 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    /* 添加一个小箭头图标 */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
}

.limit-select:hover {
    border-color: var(--primary);
}

.limit-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}


/* ... 前面的代码保持不变 ... */

/* =========================================
   9. ⚡️ 全新升级：标准分页样式
   ========================================= */

/* 分页容器：整体布局 */
.pagination-container {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px dashed var(--border);
    display: flex;
    justify-content: space-between; /* 两端对齐：左边页码，右边选择器 */
    align-items: center;
    flex-wrap: wrap; /* 手机端自动换行 */
    gap: 20px;
}

/* 左侧：导航区域 */
.pagination-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 页码数字容器 */
.page-numbers {
    display: flex;
    gap: 5px;
}

/* 通用按钮样式 (上一页、下一页、数字) */
.page-btn, .page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    min-width: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* 鼠标悬停效果 */
.page-btn:hover:not(.disabled), 
.page-num:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-body);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* 🔥 选中状态：蓝色背景 */
.page-num.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    cursor: default;
}

/* 禁用状态 */
.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
    border-color: transparent;
}

/* 右侧：条数选择器 */
.limit-select {
    height: 38px;
    padding: 0 15px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border 0.2s;
}

.limit-select:hover {
    border-color: var(--primary);
}

.limit-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 📱 手机端适配 */
@media (max-width: 640px) {
    .pagination-container {
        flex-direction: column; /* 垂直排列 */
        gap: 15px;
    }
    .pagination-nav {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .page-btn {
        flex-grow: 1; /* 按钮充满 */
    }
}

/* ... 原有样式 ... */

/* =========================================
   10. ⚡️ 二级标签筛选栏 (Sub Tags)
   ========================================= */
.sub-tags-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-label {
    font-weight: 600;
    color: var(--text-main);
    margin-right: 10px;
    font-size: 0.95rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 5px 12px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tag-item:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.tag-item.active-parent {
    background: var(--text-main);
    color: var(--bg-card);
    border-color: var(--text-main);
}

/* =========================================
   11. Markdown 代码块展示修复
   ========================================= */
.markdown-body pre {
    position: relative;
    margin: 1.25rem 0;
    padding: 16px 16px 16px 20px;
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-left: 4px solid #d8dee4;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    overflow-x: auto;
    overflow-y: hidden;
}

.markdown-body pre code,
.markdown-body pre code.hljs {
    display: block;
    padding: 0;
    background: transparent;
    color: #24292e;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    font-size: 13px;
    line-height: 1.7;
    tab-size: 4;
    -moz-tab-size: 4;
    font-family: "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
}

.markdown-body :not(pre) > code {
    display: inline-block;
    padding: 0.15em 0.45em;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #476582;
    font-size: 0.9em;
    line-height: 1.4;
    font-family: "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
    white-space: break-spaces;
}

.markdown-body pre::-webkit-scrollbar {
    height: 10px;
}

.markdown-body pre::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

html.dark-mode .markdown-body pre {
    background: #161b22;
    border-color: #30363d;
    border-left-color: #484f58;
    box-shadow: none;
}

html.dark-mode .markdown-body pre code,
html.dark-mode .markdown-body pre code.hljs {
    color: #e6edf3;
}

html.dark-mode .markdown-body :not(pre) > code {
    background: #21262d;
    border-color: #30363d;
    color: #476582;
}

/* 代码块复制按钮样式 */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 12px;
    color: #57606a;
    background-color: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    z-index: 10;
}

pre:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background-color: #f3f4f6;
    color: #24292f;
}

html.dark-mode .copy-btn {
    background-color: #30363d;
    border-color: #484f58;
    color: #c9d1d9;
}

html.dark-mode .copy-btn:hover {
    background-color: #444c56;
}

/* =========================================
   12. 文章详情页暗黑模式适配 (Article Detail Dark Mode)
   ========================================= */
h1.post-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.nav-back a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-back a:hover {
    color: var(--primary);
}

.post-meta-line {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px;
}

/* 覆盖 github-markdown-css 的默认背景和文字颜色 */
html.dark-mode .markdown-body {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

html.dark-mode .markdown-body h1,
html.dark-mode .markdown-body h2,
html.dark-mode .markdown-body h3,
html.dark-mode .markdown-body h4,
html.dark-mode .markdown-body h5,
html.dark-mode .markdown-body h6 {
    color: var(--text-main) !important;
    border-bottom-color: var(--border) !important;
}

html.dark-mode .markdown-body blockquote {
    color: var(--text-muted) !important;
    border-left-color: var(--border) !important;
}

html.dark-mode .markdown-body table tr {
    background-color: var(--bg-card) !important;
    border-top-color: var(--border) !important;
}

html.dark-mode .markdown-body table td,
html.dark-mode .markdown-body table th {
    border-color: var(--border) !important;
    color: var(--text-main) !important;
}

html.dark-mode .markdown-body hr {
    background-color: var(--border) !important;
    height: 1px;
    border: none;
}

html.dark-mode .markdown-body p,
html.dark-mode .markdown-body li {
    color: var(--text-main) !important;
}

/* 链接颜色适配 */
html.dark-mode .markdown-body a {
    color: var(--primary) !important;
}

/* =========================================
   13. 广告位置调整 (Ads Position)
   ========================================= */
.home-side-ads, .bookshelf-side-ads {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1000;
}
.home-side-ads.left, .bookshelf-side-ads.left { left: 10px; }
.home-side-ads.right, .bookshelf-side-ads.right { right: 10px; }

.floating-ad-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    background: var(--bg-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.floating-ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}
.floating-ad-card img {
    width: 100%;
    display: block;
    border-radius: 12px;
}

@media (max-width: 1400px) {
    .home-side-ads, .bookshelf-side-ads { display: none; }
}


/* =========================================
   顶部导航栏分组与下拉菜单增强
   ========================================= */
.header .container {
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10002;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
    min-width: 0;
    position: relative;
    z-index: 10003;
}

.nav-link,
.nav a,
.nav button,
#theme-btn,
.nav-dropdown-title,
.nav-dropdown-child {
    white-space: nowrap;
}

.nav-link,
.nav a,
.nav button {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.nav a:hover,
.nav a.active,
.nav button:hover,
.nav button.active,
.nav-dropdown.is-active > .nav-dropdown-trigger {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.nav-dropdown {
    position: relative;
    z-index: 10004;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-caret {
    font-size: 0.82em;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 320px;
    max-width: min(520px, 80vw);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--dropdown-border);
    background: var(--dropdown-bg);
    box-shadow: var(--dropdown-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 10005;
}

/* 下拉菜单小三角箭头 */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--dropdown-bg);
    border-left: 1px solid var(--dropdown-border);
    border-top: 1px solid var(--dropdown-border);
    transform: rotate(45deg);
    z-index: 1;
}

html:not(.dark-mode) .nav-dropdown-menu::before {
    background: #ffffff;
    border-color: #e2e8f0;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-section + .nav-dropdown-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--dropdown-border);
}

.nav-dropdown-title {
    display: inline-flex;
    align-items: center;
    color: var(--dropdown-text);
    font-weight: 700;
    margin-bottom: 8px;
}

.nav-dropdown-title:hover,
.nav-dropdown-title.active {
    color: var(--dropdown-hover-text);
}

.nav-dropdown-children {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 2px; /* 防止滚动条遮盖内容 */
}

.nav-dropdown-child {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--dropdown-child-bg);
    color: var(--dropdown-muted);
    font-size: 0.88rem;
}

.nav-dropdown-child:hover {
    color: var(--dropdown-hover-text);
    background: var(--dropdown-hover-bg);
}

.nav-child-count {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.75rem;
    color: var(--dropdown-muted);
    opacity: 0.75;
    font-weight: 400;
}

.nav-dropdown-child:hover .nav-child-count,
.nav-dropdown-child.active .nav-child-count {
    color: var(--dropdown-hover-text);
    opacity: 0.85;
}

#theme-btn {
    margin-left: 0;
}


/* 下拉菜单浅色主题兜底，避免浏览器/旧缓存中的深色样式覆盖默认浅色变量 */
html:not(.dark-mode) .nav-dropdown-menu {
    background: #ffffff;
    color: #1e293b;
    border-color: #e2e8f0;
}

html:not(.dark-mode) .nav-dropdown-title {
    color: #1e293b;
}

html:not(.dark-mode) .nav-dropdown-child {
    background: #f8fafc;
    color: #475569;
}

@media (max-width: 900px) {
    .header {
        padding: 12px 0;
    }

    .header .container {
        align-items: flex-start;
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .nav-dropdown-menu {
        left: 0;
        right: auto;
        min-width: min(320px, calc(100vw - 40px));
        max-width: calc(100vw - 40px);
    }
}
/* 首页推荐入口 / AI 助手卡片主题适配 */
.assistant-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 8%, var(--bg-card)), var(--bg-card));
}

.assistant-cta {
    box-sizing: border-box;
}


/* 首页专栏导航分类卡片主题适配 */
.column-card {
    background: var(--bg-body);
    color: var(--text-main);
}

.column-card h4 {
    color: var(--text-main);
}

.column-card p {
    color: var(--text-muted);
}


/* 首页专栏导航布局：多列自动换行 + 查看更多入口 */
.column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.column-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 160px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.column-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.column-card p {
    flex: 1;
}

.column-card span {
    margin-top: 12px;
    color: var(--primary);
    font-weight: 600;
}

.column-more-card {
    border-style: dashed;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--bg-card)), var(--bg-body));
}


/* 首页首屏布局优化 */
.sidebar-home-offset { margin-top: 148px; }
.landing-feature-grid { align-items: stretch; }
.landing-banner-card { padding: 22px; display: flex; flex-direction: column; }
.landing-banner-card .banner-container { margin-bottom: 0; }
.home-default-banner { align-items: flex-start; padding: 28px; text-align: left; background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 45%, #0f172a 100%); }
.home-default-banner .home-banner-title { margin-top: 18px; }
.hero-card {
    width: 100%;
    min-height: 380px;
    display: flex;
    align-items: center;
    padding: 48px clamp(28px, 4vw, 56px);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 44%, #f0f4ff 100%);
    color: #1a1a2a;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.09);
}
.hero-card::before,
.hero-card::after {
    content: "";
    position: absolute;
    inset: auto;
    border-radius: 999px;
    pointer-events: none;
}
.hero-card::before {
    top: -90px;
    right: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(79, 110, 247, 0.15) 0%, rgba(79, 110, 247, 0) 72%);
}
.hero-card::after {
    left: -120px;
    bottom: -150px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(140, 161, 255, 0.14) 0%, rgba(140, 161, 255, 0) 70%);
}
.hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}
.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    max-width: 640px;
    overflow: hidden;
}
.hero-title {
    margin: 0;
    font-size: clamp(2.4rem, 4.2vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: #1a1a2a;
    white-space: nowrap;
}
.hero-subtitle {
    margin: 18px 0 0;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.7;
    font-weight: 600;
    color: rgba(26, 26, 42, 0.74);
    white-space: pre-wrap;
}
.hero-description {
    margin: 18px 0 0;
    max-width: 580px;
    font-size: 1rem;
    line-height: 1.95;
    color: rgba(26, 26, 42, 0.7);
    white-space: pre-wrap;
}
.hero-actions {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.hero-action-primary {
    background: #4f6ef7 !important;
    color: #ffffff !important;
    border: 1px solid #4f6ef7 !important;
    box-shadow: 0 16px 32px rgba(79, 110, 247, 0.22);
}
.hero-action-secondary {
    background: transparent !important;
    color: #1a1a2a !important;
    border: 1px solid rgba(79, 110, 247, 0.24) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.hero-action:hover {
    transform: translateY(-2px);
}
.hero-action-primary:hover {
    box-shadow: 0 20px 36px rgba(79, 110, 247, 0.34);
    color: #ffffff;
}
.hero-action-secondary:hover {
    color: #4f6ef7;
    border-color: rgba(79, 110, 247, 0.34);
    box-shadow: 0 16px 30px rgba(79, 110, 247, 0.12);
}
.hero-visual {
    min-height: 280px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-visual::before {
    content: "";
    position: absolute;
    inset: 12% 18% 12% auto;
    width: 1px;
    background: linear-gradient(180deg, rgba(79, 110, 247, 0), rgba(79, 110, 247, 0.32), rgba(79, 110, 247, 0));
}
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(6px);
}
.hero-orb-one {
    top: 18%;
    right: 6%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.96), rgba(126, 147, 255, 0.36) 52%, rgba(126, 147, 255, 0.04) 76%);
}
.hero-orb-two {
    bottom: 9%;
    left: 10%;
    width: 190px;
    height: 190px;
    background: radial-gradient(circle at 50% 50%, rgba(79, 110, 247, 0.18), rgba(79, 110, 247, 0.04) 58%, rgba(79, 110, 247, 0) 76%);
}
.hero-panel {
    position: relative;
    width: min(100%, 340px);
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}
.hero-panel-kicker {
    display: inline-flex;
    margin-bottom: 14px;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: rgba(79, 110, 247, 0.92);
}
.hero-panel strong {
    display: block;
    font-size: 1.28rem;
    line-height: 1.5;
    color: #1a1a2a;
}
.hero-panel p {
    margin: 12px 0 0;
    font-size: 0.95rem;
    line-height: 1.85;
    color: rgba(26, 26, 42, 0.68);
}
.hero-panel-grid {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hero-panel-grid span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(79, 110, 247, 0.1);
    color: #4f6ef7;
    border: 1px solid rgba(79, 110, 247, 0.12);
    font-size: 0.84rem;
    font-weight: 600;
}
html.dark-mode .hero-card {
    background: linear-gradient(135deg, #0f1117 0%, #151a29 42%, #1a1f35 100%);
    color: #e8eaf0;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 64px rgba(2, 6, 23, 0.48);
}
html.dark-mode .hero-card::before {
    background: radial-gradient(circle, rgba(107, 140, 255, 0.26) 0%, rgba(107, 140, 255, 0) 72%);
}
html.dark-mode .hero-card::after {
    background: radial-gradient(circle, rgba(92, 118, 217, 0.22) 0%, rgba(92, 118, 217, 0) 70%);
}
html.dark-mode .hero-title,
html.dark-mode .hero-panel strong {
    color: #e8eaf0;
}
html.dark-mode .hero-subtitle {
    color: rgba(232, 234, 240, 0.82);
}
html.dark-mode .hero-description,
html.dark-mode .hero-panel p {
    color: rgba(232, 234, 240, 0.7);
}
html.dark-mode .hero-visual::before {
    background: linear-gradient(180deg, rgba(107, 140, 255, 0), rgba(107, 140, 255, 0.26), rgba(107, 140, 255, 0));
}
html.dark-mode .hero-orb-one {
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.2), rgba(107, 140, 255, 0.38) 50%, rgba(107, 140, 255, 0.02) 76%);
}
html.dark-mode .hero-orb-two {
    background: radial-gradient(circle at 50% 50%, rgba(107, 140, 255, 0.22), rgba(107, 140, 255, 0.06) 56%, rgba(107, 140, 255, 0) 76%);
}
html.dark-mode .hero-panel {
    background: rgba(20, 24, 38, 0.62);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 52px rgba(2, 6, 23, 0.34);
}
html.dark-mode .hero-panel-kicker,
html.dark-mode .hero-panel-grid span,
html.dark-mode .hero-action-secondary:hover {
    color: #6b8cff;
}
html.dark-mode .hero-panel-grid span {
    background: rgba(107, 140, 255, 0.1);
    border-color: rgba(107, 140, 255, 0.18);
}
html.dark-mode .hero-action-primary {
    background: #6b8cff !important;
    color: #ffffff !important;
    border-color: #6b8cff !important;
    box-shadow: 0 18px 34px rgba(107, 140, 255, 0.28);
}
html.dark-mode .hero-action-primary:hover {
    box-shadow: 0 22px 40px rgba(107, 140, 255, 0.38);
}
html.dark-mode .hero-action-secondary {
    background: transparent !important;
    color: #e8eaf0 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: none;
}
@media (max-width: 992px) {
    .sidebar-home-offset { margin-top: 0; }
    .hero-card {
        min-height: unset;
        padding: 36px 28px;
    }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .hero-copy,
    .hero-description {
        max-width: none;
    }
    .hero-visual {
        min-height: 220px;
        justify-content: flex-start;
    }
    .hero-visual::before {
        display: none;
    }
}
@media (max-width: 640px) {
    .hero-card {
        padding: 28px 22px;
        border-radius: 24px;
    }
    .hero-title {
        font-size: clamp(2rem, 10vw, 2.6rem);
        white-space: normal;
    }
    .hero-subtitle {
        margin-top: 14px;
    }
    .hero-description {
        margin-top: 14px;
        font-size: 0.96rem;
        line-height: 1.82;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-action {
        width: 100%;
    }
    .hero-visual {
        min-height: 180px;
    }
    .hero-panel {
        width: 100%;
    }
}


/* site-nav-layer-fix: keep navigation dropdowns above homepage/profile cards */
.header,
.header .container,
.nav,
.nav-links,
.nav-dropdown {
    isolation: isolate;
}

.header {
    z-index: 2147483000 !important;
}

.nav-dropdown {
    z-index: 2147483001 !important;
}

.nav-dropdown-menu {
    z-index: 2147483002 !important;
}

.main-content,
.content-wrapper,
.home-main,
.sidebar,
.profile-card,
.post-card,
.hero-card,
.assistant-card,
.column-card,
.landing-banner-card,
.sidebar-widget {
    z-index: auto;
}
