/**
 * Hydrogen - 氢UI 技术博客主题
 * 
 * 设计理念：轻盈通透、科技感、干净利落
 * 主色调：青蓝渐变
 * 布局：内容区 + 右侧边栏
 */

/* ==============================
   CSS Variables / 设计令牌
   ============================== */
:root {
    /* 浅色模式 */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-code: #1e1e2e;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-link: #0ea5e9;
    --text-danger: #ef4444;
    
    --bg-hover: rgba(0, 0, 0, 0.04);
    
    --accent-primary: #0ea5e9;
    --accent-secondary: #6366f1;
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --accent-glow: rgba(14, 165, 233, 0.3);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(14, 165, 233, 0.2);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 10px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Display", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono", "Source Code Pro", Consolas, monospace;
    
    --header-height: 64px;
    --sidebar-width: 300px;
    --content-max: 800px;
    --gap: 24px;
}

/* 深色模式 */
.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.8);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-link: #38bdf8;
    
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --accent-glow: rgba(56, 189, 248, 0.25);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(56, 189, 248, 0.2);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    
    --text-danger: #f87171;
    --bg-hover: rgba(255, 255, 255, 0.06);
}

/* ==============================
   Reset / 基础
   ============================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-primary);
}

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

ul, ol {
    list-style: none;
}

/* ==============================
   首页视频横幅
   ============================== */
.hero-banner {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 400px;
    max-height: 700px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.hero-banner-canvas-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

#heroBannerCanvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    letter-spacing: 0.05em;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 24px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 有 hero 时 main-wrapper 调整顶部间距 */
body.hero-page .main-wrapper {
    padding-top: 32px !important;
}

/* 移动端 hero */
@media (max-width: 768px) {
    .hero-banner {
        height: 35vh;
        min-height: 200px;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-desc {
        font-size: 0.95rem;
    }
}

/* ==============================
   容器 & 布局
   ============================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--gap);
}

.main-wrapper {
    display: flex !important;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: var(--gap);
    padding-top: calc(var(--header-height) + 32px);
    padding-bottom: 48px;
    min-height: calc(100vh - var(--header-height));
    align-items: flex-start;
}

.content {
    flex: 1 !important;
    min-width: 0;
}

.sidebar {
    flex: 0 0 300px !important;
    width: 300px !important;
}

/* ==============================
   顶部导航（透明玻璃效果）
   ============================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 100;
    transition: all 0.3s ease;
}

/* 滚动时增加背景不透明度 */
.site-header.scrolled {
    background: rgba(15, 23, 42, 0.6);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.dark .site-header {
    background: rgba(0, 0, 0, 0.35);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.dark .site-header.scrolled {
    background: rgba(0, 0, 0, 0.6);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 32px;
}

.logo a {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.main-nav {
    display: flex;
    gap: 24px;
    flex: 1;
    align-items: center;
}

.main-nav > a,
.main-nav .dropdown-toggle {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav > a::after,
.main-nav .dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.2s ease;
}

.main-nav > a:hover,
.main-nav .dropdown-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
}

.main-nav > a:hover::after,
.main-nav .dropdown-toggle:hover::after {
    width: 100%;
}

/* 分类下拉菜单 */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle svg {
    color: #ffffff;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-toggle svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: -8px;
    min-width: 160px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 200;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 16px;
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.7);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    transform: rotate(45deg);
}

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

/* 独立页面链接 — 与 nav 一致样式 */
.main-nav > a {
    color: #ffffff;
}

.dropdown-menu a {
    display: block;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.dropdown-menu a::after {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #ffffff;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* 深色模式切换 - 图标切换 */
.dark .icon-sun { display: block; }
.dark .icon-moon { display: none; }
.icon-sun { display: none; }
.icon-moon { display: block; }

/* 移动端菜单隐藏 */
.menu-toggle {
    display: none;
}

/* ==============================
   搜索下拉
   ============================== */
.search-dropdown {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
}

.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0 10px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-inside {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: color 0.2s ease;
}

.search-input-wrapper:focus-within .search-icon-inside {
    color: rgba(255, 255, 255, 0.7);
}

.search-input-inline {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-input-inline::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.search-input-inline:focus {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.search-submit-inline {
    padding: 10px 22px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.search-submit-inline:hover {
    opacity: 0.9;
}

/* 热门搜索 */
.search-hot {
    padding: 4px 0 14px;
}

.search-hot-title {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

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

.search-hot-tag {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-hot-tag:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.search-hot-empty {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
}

/* ==============================
   用户下拉菜单
   ============================== */
.user-dropdown .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 180px;
}

.user-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 4px;
}

.user-menu-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
}

.user-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 8px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}

.user-menu-item svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.6);
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.user-menu-item:hover svg {
    color: #ffffff;
}

.user-menu-item.logout {
    color: #f87171;
}

.user-menu-item.logout svg {
    color: #f87171;
}

.user-menu-item.logout:hover {
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
}

.user-menu-item.logout:hover svg {
    color: #fca5a5;
}

/* 发文章按钮 */
.write-post-btn {
    color: #ffffff;
}

.write-post-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    color: #ffffff;
}

/* 用户下拉箭头 */
.user-dropdown .dropdown-toggle::after {
    display: none;
}

/* ==============================
   分类下拉毛玻璃
   ============================== */

/* ==============================
   栏目头部
   ============================== */
.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-left: 14px;
    border-left: 4px solid var(--accent-primary);
    line-height: 1.4;
}

/* ==============================
   文章卡片 (Joe 风格 - 上图下文)
   ============================== */
.post-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 封面图 */
.post-card-cover {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    display: block;
}

.post-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-cover img {
    transform: scale(1.05);
}

.post-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-muted);
}

/* 内容区 */
.post-card-body {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    flex: 1;
    min-width: 0;
}

/* 标题 */
.post-card-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.5;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.post-card-title:hover {
    color: var(--accent-primary);
}

/* 标签行：分类徽章 + #标签 */
.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.post-card-cat {
    display: inline-block;
    padding: 1px 8px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.6;
}

.post-card-cat:hover {
    opacity: 0.85;
    color: #fff;
}

.post-card-tag {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--bg-hover);
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.6;
}

/* 底部栏：作者+时间 | 统计 */
.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-card-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.post-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-card-stat svg {
    opacity: 0.5;
    width: 13px;
    height: 13px;
}

/* 头部：分类标签 + 日期 */
.post-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.post-card-cat {
    display: inline-block;
    padding: 2px 10px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.post-card-cat:hover {
    opacity: 0.85;
    color: #fff;
}

.post-card-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* 摘要（卡片内使用） */
.post-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 12px;
    flex: 1;
}

/* 底部统计 */
.post-card-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.post-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-card-stat svg {
    opacity: 0.6;
}

.post-cover {
    position: relative;
    overflow: hidden;
}

.post-cover img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-cover img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.badge-source {
    background: var(--accent-gradient);
    color: white;
}

/* archive.php 等页面复用的旧类名 */
.post-content {
    padding: 20px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-meta .post-category {
    padding: 2px 10px;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--accent-primary);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 首页 Joe 风格文章列表 */

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

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

.tag-link {
    padding: 4px 10px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.tag-link:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.post-stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==============================
   文章详情页
   ============================== */
.post-article {
    max-width: 100%;
}

.article-header {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}

.article-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ==============================
   文章内容卡片
   ============================== */
.article-content {
    line-height: 1.8;
    margin-bottom: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* 标题增强 */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.4;
    position: relative;
}

.article-content h1 { font-size: 1.75rem; }
.article-content h1:first-child { margin-top: 0; }

.article-content h2 {
    font-size: 1.5rem;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--border-color);
}
.article-content h2:first-child { margin-top: 0; }

.article-content h3 { font-size: 1.25rem; }

.article-content h2::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 0.15em;
    width: 4px;
    height: 0.8em;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* 段落 */
.article-content p {
    margin-bottom: 1.5em;
    text-align: justify;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 链接 */
.article-content a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.article-content a:hover {
    border-bottom-color: var(--accent-primary);
}

/* 列表 */
.article-content ul,
.article-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

.article-content li {
    margin-bottom: 0.5em;
    padding-left: 0.25em;
}

/* 嵌套列表 */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* 引用块 */
.article-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding: 1em 1.5em;
    background: rgba(99, 102, 241, 0.04);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 1.5em 0;
    color: var(--text-secondary);
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

/* 表格容器 — 支持横向滚动 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    overflow-x: auto;
    display: block;
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}

.article-content th {
    background: var(--bg-primary);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.article-content tbody tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

/* 代码块容器 — 带语言标签 */
.article-content pre {
    position: relative;
    margin: 1.5em 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #1e1e2e !important;
}

.article-content pre code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    display: block;
    padding: 1.25em 1.5em;
    overflow-x: auto;
}

.article-content :not(pre) > code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

/* 水平分割线 */
.article-content hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 2em 0;
}

/* 定义列表 */
.article-content dl {
    margin-bottom: 1.5em;
}

.article-content dt {
    font-weight: 600;
    margin-bottom: 0.5em;
    color: var(--text-primary);
}

.article-content dd {
    margin-left: 1.5em;
    margin-bottom: 1em;
    color: var(--text-secondary);
}

/* 任务列表 checkbox */
.article-content input[type="checkbox"] {
    margin-right: 0.5em;
    accent-color: var(--accent-primary);
}

/* 图片 — 灯箱支持 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.5em auto;
    display: block;
    cursor: zoom-in;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-content img:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 图片说明 */
.article-content figure {
    margin: 1.5em 0;
    text-align: center;
}

.article-content figcaption {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5em;
    font-style: italic;
}

/* 文章标签 */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

/* 上下篇导航 */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 48px;
}

.article-nav a {
    flex: 1;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.article-nav a:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

/* ==============================
   付费下载卡片
   ============================== */
.download-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.download-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.download-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.download-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.price-row {
    margin-bottom: 8px;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 支付方式按钮 */
.payment-methods {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 400px;
}

.pay-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pay-btn:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.pay-alipay:hover {
    border-color: #1677ff;
    color: #1677ff;
    box-shadow: 0 0 15px rgba(22, 119, 255, 0.2);
}

.pay-wechat:hover {
    border-color: #07c160;
    color: #07c160;
    box-shadow: 0 0 15px rgba(7, 193, 96, 0.2);
}

.unlock-form {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 400px;
}

.password-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.unlock-btn {
    padding: 10px 20px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.unlock-btn:hover {
    opacity: 0.9;
}

.unlock-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.download-btn:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
    color: white;
}

/* ==============================
   侧边栏
   ============================== */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: var(--gap);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.widget-profile {
    padding: 0 !important;
    /* min-height: 400px !important; */
    overflow: visible !important;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 8px 0 12px;
    padding: 0 0 0 12px;
    position: relative;
    line-height: 1.5;
}

.widget-title::before {
    content: '';
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    width: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* 个人简介 */
.profile-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: center;
    min-height: 340px;
}

.profile-card-bg {
    width: 100%;
    flex: 0 0 50%;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.profile-card-bg .hero-video {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.profile-avatar img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    border: 3px solid #fff;
    box-shadow: var(--shadow-md);
}

.profile-card-info {
    /* width: 100%; */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* padding-top: 50px;
    padding-bottom: 20px;
    flex: 1; */
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 600;
  
    color: var(--accent-primary);
}

.profile-bio {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 20px;
    padding: 0 20px;
}

.profile-stats {
    display: flex;
    align-items: center;

    width: 100%;
    padding: 0 16px;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
        justify-content: center;
    gap: 4px;
    flex: 1;
}

.profile-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-stat-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
}

/* 分类列表（侧栏） */
.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.category-list li:last-child a {
    border-bottom: none;
}

.category-list li a:hover {
    color: var(--accent-primary);
}

.cat-count {
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cat-name {
    flex: 1;
}

/* 首页分类卡片 */
.cat-cards-section {
    padding: 0;
    position: relative;
    z-index: 2;
}

.cat-cards-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.cat-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: -30px;
}

.cat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.06);
}

.cat-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.cat-card-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cat-card-icon svg {
    width: 22px;
    height: 22px;
}

.cat-card-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cat-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
}

.cat-card-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 1px;
}

.cat-card-badge {
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.6);
}

.dark .cat-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.dark .cat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dark .cat-card-icon {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dark .cat-card-badge {
    background: rgba(255, 255, 255, 0.1);
}

.cat-card-0,
.cat-card-1,
.cat-card-2,
.cat-card-3 {
    background: rgba(255, 255, 255, 0.8);
}

.dark .cat-card-0,
.dark .cat-card-1,
.dark .cat-card-2,
.dark .cat-card-3 {
    background: rgba(255, 255, 255, 0.1);
}

/* 一言 */
.widget-motto {
    text-align: center;
}

.motto-content {
    padding: 3px 3px;
}

.motto-en {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.5;
    margin: 0 0 4px;
}

.motto-cn {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: opacity 0.2s ease;
    text-decoration: none;
    line-height: 1.8;
}

.tag-item:hover {
    opacity: 0.75;
}

/* 热门文章 */
.hot-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.hot-list li:last-child a {
    border-bottom: none;
}

.hot-list li a:hover {
    color: var(--accent-primary);
}

.hot-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-views {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 12px;
}

/* 最近评论 */
.recent-comments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-comment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: opacity 0.2s ease;
}

.recent-comments-list li:last-child .recent-comment-item {
    border-bottom: none;
}

.recent-comment-item:hover {
    opacity: 0.75;
}

.recent-comment-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-comment-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.recent-comment-author {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.recent-comment-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==============================
   评论区
   ============================== */
.comments {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.comment-list {
    margin-bottom: 32px;
}

.comment-list .comment {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 8px;
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

.comment-form {
    margin-top: 24px;
}

.comment-form h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
    margin-bottom: 16px;
    resize: vertical;
}

.logged-in-as {
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.comment-closed {
    color: var(--text-muted);
    font-style: italic;
}

/* ==============================
   按钮
   ============================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
    color: white;
}

/* ==============================
   分页
   ============================== */
.pagination {
    margin-top: 40px;
}

.page-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-nav li {
    display: inline-flex;
}

.page-nav a,
.page-nav span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-nav a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.page-nav .active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.page-nav .prev,
.page-nav .next {
    font-weight: 600;
}

/* ==============================
   404 页面
   ============================== */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-code {
    font-size: 6rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.error-page h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.error-page p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin: 0 auto 16px;
    opacity: 0.5;
}

/* ==============================
   页脚
   ============================== */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: auto;
    transition: border-color 0.3s ease;
}

.footer-inner {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.theme-credit {
    margin-left: 12px;
}

/* ==============================
   移动端侧边栏
   ============================== */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 桌面端隐藏移动端专属元素 */
@media (min-width: 769px) {
    .mobile-bottom-nav,
    .mobile-tab-content,
    .mobile-overlay,
    .mobile-sidebar {
        display: none !important;
    }
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    bottom: 0;
    width: 280px;
    background: var(--bg-secondary);
    z-index: 160;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
}

.mobile-nav {
    padding: 16px;
}

.mobile-nav a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: background 0.2s ease;
}

.mobile-nav a:hover {
    background: var(--bg-primary);
}

/* ==============================
   响应式设计
   ============================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }
}

@media (max-width: 768px) {
    :root {
        --gap: 16px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .content-single {
        padding: 0;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .article-nav {
        flex-direction: column;
    }

    .post-cover img {
        height: 160px;
    }

@media (max-width: 1024px) {
    .post-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .post-list {
        grid-template-columns: 1fr;
    }

    .post-card-thumb {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        gap: 16px;
    }

    .logo a {
        font-size: 1rem;
    }

    .post-content {
        padding: 16px;
    }

    .post-title {
        font-size: 1.1rem;
    }

    .post-excerpt {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    /* 移动端下载卡片 */
    .payment-methods {
        flex-direction: column;
    }

    .unlock-form {
        flex-direction: column;
    }

    .download-card {
        padding: 16px;
    }
}

/* ==============================
   灯箱 Lightbox
   ============================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 8px;
    max-width: 80%;
    text-align: center;
    pointer-events: none;
}

/* ==============================
   暗色模式 - 文章内容
   ============================== */
.dark .article-content {
    background: #1a1a2e;
    border-color: #2a2a4a;
}

.dark .article-content blockquote {
    background: rgba(99, 102, 241, 0.08);
    border-left-color: #818cf8;
}

.dark .article-content :not(pre) > code {
    background: #2a2a4a;
    border-color: #3a3a5a;
}

.dark .article-content th {
    background: #12121f;
}

.dark .article-content tbody tr:hover {
    background: rgba(99, 102, 241, 0.08);
}

.dark .article-content img:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dark .article-content a {
    color: #818cf8;
}

.dark .article-content a:hover {
    border-bottom-color: #818cf8;
}

.dark .article-header {
    background: #1a1a2e;
    border-color: #2a2a4a;
}

.dark .hero-banner {
    background: linear-gradient(135deg, #0a0a1a 0%, #0f172a 50%, #0a0a1a 100%);
}

.dark .hero-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.8) 100%);
}
