/* Theme variables & reset - Blender 风格设计（更干净、更亮） */
:root {
    /* 深灰色背景 - Blender 风格（不是纯黑） */
    --bg: #2b2b2b;
    --bg-secondary: #323232;
    --surface: #3a3a3a;
    --surface-elevated: #424242;
    --surface-hover: #4a4a4a;
    
    /* 文本颜色 */
    --text: #ffffff;
    --text-secondary: #d0d0d0;
    --text-muted: #a0a0a0;
    --muted: #a0a0a0;
    
    /* Unreal Engine 蓝色/青色主色调 */
    --accent: #00D9FF;
    --accent-hover: #0E8CFF;
    --accent-strong: #0099FF;
    --accent-glow: rgba(0, 217, 255, 0.3);
    --accent-glow-strong: rgba(0, 217, 255, 0.5);
    
    /* 玻璃态效果 */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-strong: rgba(255, 255, 255, 0.1);
    
    /* 阴影和光效 - 更简洁，减少发光 */
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --glow-shadow: none; /* 移除发光效果 */
    
    /* 圆角 */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 间距 */
    --gap-sm: 12px;
    --gap-md: 24px;
    --gap-lg: 40px;
    --gap-xl: 60px;
    
    /* 布局 */
    --max-width: 1400px;
    --header-height: 80px;
    
    /* 动画 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

/* 全局盒模型重置 */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* 全局样式 - Blender 风格（更干净、更亮） */
html, body { height: 100%; }

/* 噪点纹理 SVG 滤镜 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.01;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        );
    background-size: 100% 4px, 4px 100%;
    animation: noise 0.1s infinite;
}

/* 噪点动画 - 轻微移动增加真实感 */
@keyframes noise {
    0%, 100% {
        transform: translate(0, 0);
    }
    10% {
        transform: translate(-1px, -1px);
    }
    20% {
        transform: translate(1px, 1px);
    }
    30% {
        transform: translate(-1px, 1px);
    }
    40% {
        transform: translate(1px, -1px);
    }
    50% {
        transform: translate(-1px, 0);
    }
    60% {
        transform: translate(1px, 0);
    }
    70% {
        transform: translate(0, -1px);
    }
    80% {
        transform: translate(0, 1px);
    }
    90% {
        transform: translate(-1px, -1px);
    }
}

/* 更精细的噪点纹理 - 使用 SVG 滤镜 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    mix-blend-mode: overlay;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    line-height: 1.6;
    position: relative;
}

/* Utility: visible focus for keyboard users */
:focus { outline: none; }
.focus-ring:focus { box-shadow: 0 0 0 3px rgba(255,107,107,0.16); border-radius: 6px; }

/* ===== 自定义滚动条样式 - Blender 风格 ===== */
/* Firefox 滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) var(--bg-secondary);
}

/* Webkit 浏览器滚动条样式（Chrome, Safari, Edge） */
*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

*::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 6px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
    transition: all 0.3s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

*::-webkit-scrollbar-thumb:active {
    background: rgba(255, 255, 255, 0.45);
}

*::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
}

/* 特定区域的滚动条样式优化 */
.content-area::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
}

.content-area::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* 模块容器的滚动条 */
/* 模块容器磨砂效果增强 */
.module-container {
    background: rgba(58, 58, 58, 0.75) !important;
    backdrop-filter: blur(12px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    position: relative;
}

.module-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0.4;
    mix-blend-mode: overlay;
    border-radius: 8px;
    z-index: 0;
}

.module-container > * {
    position: relative;
    z-index: 1;
}

.module-container:hover {
    background: rgba(66, 66, 66, 0.8) !important;
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.module-container::-webkit-scrollbar,
.notices-list::-webkit-scrollbar,
.memos-list::-webkit-scrollbar {
    width: 8px;
}

.module-container::-webkit-scrollbar-thumb,
.notices-list::-webkit-scrollbar-thumb,
.memos-list::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
    border: 1px solid #2a2a2a;
}

.module-container::-webkit-scrollbar-thumb:hover,
.notices-list::-webkit-scrollbar-thumb:hover,
.memos-list::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

/* small helper classes */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* Buttons & inputs - Blender 风格（更干净、更亮） */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
    font-size: 0.95em;
    transition: var(--transition);
    text-transform: none;
}

.btn:hover {
    background: var(--surface-elevated);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.btn:active {
    transform: translateY(1px);
}

/* 主要按钮（蓝色背景） */
.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #ffffff;
}

.btn.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text);
}

.btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

input[type="text"], input[type="url"], input[type="number"], textarea, select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    outline: none;
    background: var(--surface-elevated);
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.2);
}

/* Cards / grid统一样式 - Blender 风格（更干净、更亮、更整体） */
.card, .grid-card, .directory-card, .gallery-item {
    background: rgba(58, 58, 58, 0.8);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

/* 卡片磨砂效果增强 */
.card::before, .grid-card::before, .directory-card::before, .gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0.4;
    mix-blend-mode: overlay;
    border-radius: var(--radius);
    z-index: 0;
}

.card > *, .grid-card > *, .directory-card > *, .gallery-item > * {
    position: relative;
    z-index: 1;
}

.card:hover, .grid-card:hover, .directory-card:hover, .gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(66, 66, 66, 0.85);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
}

/* Card body spacing */
.card-body, .directory-card-content { padding: 12px 14px; }
.card-title, .directory-card-title { font-size: 1.05em; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.card-meta { color: var(--muted); font-size: 0.9em; }

/* Grid container 调整 */
.card-grid-container, .gallery-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: start; }
/* .directory-grid-container 单独处理，使用block布局以支持纵向主分类组 */

/* 侧边栏在窄屏下折叠至顶部 */
@media (max-width: 900px) {
    .sidebar { position: relative; width: 100%; height: auto; top: auto; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.03); }
    .main-container { flex-direction: column; }
    .content-area { padding: 18px; height: auto; }
}



/* --- 新布局：主容器 --- */
.new-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.main-container {
    display: flex;
    flex-grow: 1;
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    /* height: calc(100vh - 70px); 移除固定高度，让内容区可以滚动 */
}

/* 没有侧边栏时的布局 */
.content-area.no-sidebar-layout {
    width: 100%;
    margin-left: 0;
}

/* 右侧模块栏触发区域 */
/* 左侧模块栏触发区域 */
.left-modules-trigger {
    position: fixed;
    left: 0;
    top: 70px;
    width: 20px;
    height: calc(100vh - 70px);
    z-index: 999;
    background: rgb(43 43 43 / 0%); /* 与页面背景色一致 */
    transition: background 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.left-modules-trigger:hover {
    background: rgb(43 43 43 / 0%);
}

.left-modules-trigger .trigger-icon {
    font-size: 14px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.left-modules-trigger:hover .trigger-icon {
    opacity: 1;
}

/* 左侧模块栏 */
.left-modules-sidebar {
    width: 320px;
    min-width: 0;
    flex: 0 0 0;
    background: rgba(50, 50, 50, 0.85);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    position: fixed;
    left: 0;
    top: 70px;
    z-index: 998;
    height: calc(100vh - 70px);
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.left-modules-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: overlay;
    z-index: 0;
}

.left-modules-sidebar > * {
    position: relative;
    z-index: 1;
}

.left-modules-sidebar.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.left-modules-sidebar.collapsed {
    width: 280px;
}

.left-modules-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: var(--surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.left-modules-title {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.left-modules-toggle {
    background: transparent;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.left-modules-toggle:hover {
    background-color: #3a3a3a;
    border-color: #555;
    color: #fff;
}

.left-modules-toggle .toggle-icon {
    display: inline-block;
    transition: transform 0.3s;
}

.left-modules-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    transition: all 0.3s ease;
}

.left-modules-content.collapsed {
    display: none;
}

.left-modules-content::-webkit-scrollbar {
    width: 6px;
}

.left-modules-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.left-modules-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.left-modules-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 当鼠标在触发区域或左侧栏内时显示 */
.left-modules-trigger:hover ~ .main-container .left-modules-sidebar,
.left-modules-sidebar.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* 在超小屏幕上确保main-container布局正确 */
@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
    }
    .sidebar-trigger {
        display: none;
    }
    .sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        top: auto !important;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.03);
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* --- 1. 顶部 Header (新) - 毛玻璃效果设计 --- */
.site-header {
    width: 100%;
    background: rgba(43, 43, 43, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    /* 磨砂效果增强 */
    position: relative;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0.6;
    mix-blend-mode: overlay;
}
.header-content-left {
    display: flex;
    align-items: center;
    gap: var(--gap-lg);
    overflow: hidden; /* 防止导航过多时溢出 */
    padding-right: 8px;
}
.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.01em;
    transition: var(--transition);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.logo:hover {
    color: var(--accent);
}
.logo .nav-icon {
    opacity: 0.9;
}
.category-nav-bar {
    padding: 0;
    overflow-x: auto; /* 导航项过多时允许滚动 */
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.category-nav-bar::-webkit-scrollbar { display: none; }
.category-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

/* 如果列表中包含 main-category-link，增大间距 */
.category-nav-list:has(.main-category-link) {
    gap: 12px;
}
.category-nav-item a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
    background: transparent;
}
.category-nav-item a:hover {
    background-color: rgba(60, 60, 60, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.category-nav-item a.active {
    background-color: rgba(70, 70, 70, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text);
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* main-category-link 覆盖通用样式 - 毛玻璃效果 */
.category-nav-item a.main-category-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    color: rgba(255, 255, 255, 0.5) !important; /* 默认更暗的文字 */
    background: rgb(43, 43, 43) !important; /* 统一背景色 */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.95em !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    border: 0px solid rgba(255, 255, 255, 0.08) !important;
}
.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    opacity: 0.9;
}
.nav-icon svg {
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.5); /* 默认更暗 */
    stroke: rgba(255, 255, 255, 0.5);
}

.category-nav-item a.main-category-link:hover .nav-icon svg {
    color: rgba(255, 255, 255, 0.7); /* 悬停时稍微亮一点 */
    stroke: rgba(255, 255, 255, 0.7);
}

.category-nav-item a.main-category-link.active .nav-icon svg {
    color: #fff; /* 激活时完全白色 */
    stroke: #fff;
}
.category-nav-item a.main-category-link:hover {
    background: rgba(40, 40, 40, 0.8) !important;
    box-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.7) !important; /* 悬停时稍微亮一点 */
}
.category-nav-item a.main-category-link.active {
    background: rgb(43, 43, 43) !important; /* 激活时使用正常亮度 */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
    color: #fff !important; /* 激活时完全白色 */
}
.category-nav-item a.main-category-link:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1) !important;
}

/* --- 固定左侧快捷链接（主目录菜单）样式 - 毛玻璃效果 --- */
.category-nav-bar.fixed-links {
    margin-left: 16px;
    display: flex;
    align-items: center;
}
.category-nav-bar.fixed-links .category-nav-list {
    display: flex;
    gap: 8px;
}
.category-nav-bar.fixed-links .category-nav-item a {
    padding: 8px 16px;
    color: var(--text);
    background: transparent; /* 与页面背景统一 */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9em;
    transition: var(--transition);
    border: none;
    box-shadow: none;
}
/* 固定链接中的 main-category-link 应该使用毛玻璃样式 */
.category-nav-bar.fixed-links .category-nav-item a.main-category-link {
    background: rgb(43, 43, 43) !important; /* 统一背景色 */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 20px !important;
    color: rgba(255, 255, 255, 0.5) !important; /* 默认更暗的文字 */
    font-weight: 600 !important;
    font-size: 0.95em !important;
    box-shadow: none !important;
    border: 0px solid rgba(255, 255, 255, 0.08) !important;
}
.category-nav-bar.fixed-links .category-nav-item a:hover {
    background: rgba(60, 60, 60, 0.5);
    border-color: transparent;
    color: var(--text);
    box-shadow: none;
}
.category-nav-bar.fixed-links .category-nav-item a.main-category-link:hover {
    background: rgba(40, 40, 40, 0.8) !important;
    box-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.7) !important; /* 悬停时稍微亮一点 */
}
.category-nav-bar.fixed-links .category-nav-item a.active {
    background: rgba(0, 217, 255, 0.15);
    color: var(--accent);
    border-color: transparent;
    box-shadow: none;
}
.category-nav-bar.fixed-links .category-nav-item a.main-category-link.active {
    background: rgb(43, 43, 43) !important; /* 激活时使用正常亮度 */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
    color: #fff !important; /* 激活时完全白色 */
}

/* 窄屏时隐藏固定链接，避免占用过多空间 */
@media (max-width: 600px) {
    .category-nav-bar.fixed-links { display: none; }
    .header-content-left { gap: 12px; }
}

/* 汉堡按钮及折叠菜单样式 */
.header-fixed-toggle {
    display: none; /* 默认隐藏，移动端显示 */
    background: transparent;
    border: none;
    color: #dfefff;
    font-size: 1.2em;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
}
.header-fixed-toggle:focus { outline: 2px solid rgba(255,107,107,0.22); box-shadow: 0 0 0 4px rgba(255,107,107,0.06); }

/* 在小屏幕显示汉堡 */
@media (max-width: 600px) {
    .header-fixed-toggle { display: inline-flex; align-items: center; justify-content: center; }
    /* 当打开时，让 fixed-links 以下拉呈现 */
    .category-nav-bar.fixed-links.open {
        position: absolute;
        left: 0;
        top: var(--header-height); /* header 高度 */
        background: rgba(43, 43, 43, 0.7);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
        padding: 12px 14px;
        display: flex;
        overflow-x: auto;
        z-index: 1200;
        box-shadow: 
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    .category-nav-bar.fixed-links.open .category-nav-list { gap: 12px; }
}

/* main-category-link 样式（与固定链接统一） - 扁平化 */
.main-category-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: var(--text);
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.08);
    /* 移除阴影，扁平化 */
}
.main-category-link:hover {
    background: var(--surface);
    border-color: rgba(255,255,255,0.12);
    color: var(--text);
}
.main-category-link.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.main-category-link:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* 细微间距调整 */
.site-header { padding: 0 24px; }
.header-content-left .logo { margin-right: 6px; }
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6em;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 500;
    color: #dcdcdc;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    line-height: 1.3;
    pointer-events: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.category-nav-item a:hover .count-badge,
.category-nav-item a.active .count-badge,
.sidebar-menu-item .my-category-link:hover .count-badge,
.sidebar-menu-item .my-category-link.active .count-badge {
    background-color: rgba(255,107,107,0.18);
    border-color: rgba(255,107,107,0.22);
    color: #eef5ff;
}
.sidebar-menu-item .count-badge {
    margin-left: 10px;
}

/* 头部右侧：登录/用户信息 */
.header-auth {
    display: flex;
    align-items: center;
    gap: 6px; /* 减小间距 */
    font-size: 0.9em;
    flex-shrink: 0; /* 防止被压缩 */
}
.header-auth .header-link,
.header-auth .header-user {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}
.header-auth .header-link:hover { color: #fff; }
.header-auth .header-user strong { color: #e0e0e0; font-weight: 500; }
.header-auth .header-button {
    display: inline-flex;
    align-items: center;
    gap: 4px; /* 减小图标和文字间距 */
    color: rgba(255, 255, 255, 0.5); /* 默认更暗的文字 */
    background: rgb(43, 43, 43); /* 统一背景色 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px; /* 减小内边距 */
    border: 0px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px; /* 稍微减小圆角 */
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.8em; /* 减小字体大小 */
    white-space: nowrap;
    box-shadow: none;
}
.header-auth .header-button:hover {
    background: rgba(40, 40, 40, 0.8);
    color: rgba(255, 255, 255, 0.7); /* 悬停时稍微亮一点 */
    box-shadow: none;
}
.header-auth .header-button.active {
    background: rgb(43, 43, 43) !important; /* 激活时使用正常亮度 */
    color: #fff !important; /* 激活时完全白色 */
}
.header-auth .header-button .header-icon-circle svg {
    color: rgba(255, 255, 255, 0.5); /* 默认更暗 */
    stroke: rgba(255, 255, 255, 0.5);
}
.header-auth .header-button:hover .header-icon-circle svg {
    color: rgba(255, 255, 255, 0.7); /* 悬停时稍微亮一点 */
    stroke: rgba(255, 255, 255, 0.7);
}
.header-auth .header-button.active .header-icon-circle svg {
    color: #fff; /* 激活时完全白色 */
    stroke: #fff;
}
.header-auth .header-button.logout-button,
.header-auth .header-button.refresh-button {
    background: rgb(43, 43, 43); /* 统一背景色 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.5); /* 默认更暗的文字 */
}
.header-auth .header-button.logout-button:hover,
.header-auth .header-button.refresh-button:hover {
    background: rgba(40, 40, 40, 0.8);
    color: rgba(255, 255, 255, 0.7); /* 悬停时稍微亮一点 */
}
.header-auth .header-button.logout-button.active,
.header-auth .header-button.refresh-button.active {
    background: rgb(43, 43, 43) !important; /* 激活时使用正常亮度 */
    color: #fff !important; /* 激活时完全白色 */
}
.header-auth .header-button:disabled { opacity: 0.5; cursor: not-allowed; }

/* 用户头像容器 */
.user-avatar-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s, transform 0.2s;
    cursor: pointer;
}
.user-avatar:hover {
    border-color: rgba(255, 107, 107, 0.5);
    transform: scale(1.05);
}

/* 用户信息弹窗 - 统一主页面样式 */
.user-info-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background-color: rgb(43, 43, 43); /* 统一背景色 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.user-info-popup.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 顶部Header区域 */
.popup-header-section {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.popup-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.popup-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background-color: var(--surface);
}

.popup-avatar-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background-color: #4caf50;
    border: 2px solid rgb(43, 43, 43);
    border-radius: 50%;
}

.popup-user-info {
    flex: 1;
    min-width: 0;
}

.popup-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.popup-username {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-user-status {
    display: inline-block;
    padding: 2px 8px;
    background-color: #666;
    color: #fff;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
}

.popup-user-email {
    font-size: 0.9em;
    color: #aaa;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 金币余额卡片 */
.popup-balance-card {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.2), rgba(0, 122, 255, 0.1));
    border: 1px solid rgba(0, 122, 255, 0.4);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.popup-balance-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.popup-balance-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-balance-label {
    font-size: 0.85em;
    color: #e0e0e0;
    font-weight: 500;
}

.popup-balance-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #ffd700;
}

/* 统计卡片区域 */
.popup-stats-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.popup-stat-card {
    background-color: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.popup-stat-card-growth {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(0, 122, 255, 0.05));
    border-color: rgba(0, 122, 255, 0.3);
}

.popup-stat-card-contribution {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.05));
    border-color: rgba(255, 193, 7, 0.3);
}

.popup-stat-card-label {
    font-size: 0.85em;
    color: #e0e0e0;
    font-weight: 500;
}

.popup-stat-card-value {
    font-size: 1.4em;
    font-weight: 700;
    color: #fff;
}

/* 操作按钮区域 */
.popup-actions-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popup-action-btn {
    display: block;
    padding: 12px 16px;
    text-align: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    background-color: rgb(43, 43, 43);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.popup-action-btn:hover {
    background-color: rgba(50, 50, 50, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.popup-action-btn.popup-logout-btn {
    background-color: rgb(43, 43, 43);
    border-color: rgba(255, 107, 107, 0.3);
    color: rgba(255, 107, 107, 0.9);
}

.popup-action-btn.popup-logout-btn:hover {
    background-color: rgba(60, 40, 40, 0.95);
    border-color: rgba(255, 107, 107, 0.5);
    color: #ff6b6b;
}

/* 账户切换区域 */
.popup-accounts-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.popup-accounts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.popup-accounts-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #e0e0e0;
}

.popup-accounts-count {
    font-size: 0.85em;
    color: #888;
}

.popup-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.popup-accounts-list::-webkit-scrollbar {
    width: 4px;
}

.popup-accounts-list::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.popup-accounts-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

.popup-accounts-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.popup-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
}

.popup-account-item:hover {
    background-color: #222;
    border-color: #444;
}

.popup-account-item.current {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.05));
    border-color: rgba(255, 107, 107, 0.3);
}

.popup-account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
    flex-shrink: 0;
}

.popup-account-item.current .popup-account-avatar {
    border-color: rgba(255, 107, 107, 0.5);
}

.popup-account-info {
    flex: 1;
    min-width: 0;
}

.popup-account-name {
    font-size: 0.9em;
    font-weight: 500;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-account-username {
    font-size: 0.8em;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-account-badge {
    font-size: 0.75em;
    padding: 4px 8px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: #fff;
    border-radius: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.popup-account-switch-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.popup-account-switch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.popup-account-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background-color: #333;
    color: #aaa;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.popup-account-remove-btn:hover {
    background-color: #d32f2f;
    color: #fff;
    transform: scale(1.1);
}

.popup-accounts-loading,
.popup-accounts-empty,
.popup-accounts-error {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9em;
}

.popup-accounts-error {
    color: #f44336;
}

.popup-account-add-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: fit-content;
}

.popup-account-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 头部菜单容器 */
.header-menu-container {
    display: flex;
    align-items: center;
    gap: 4px; /* 减小间距 */
    margin-right: 10px;
}

.header-menu-item {
    position: relative;
}

.header-menu-link {
    display: inline-flex;
    align-items: center;
    gap: 4px; /* 减小图标和文字间距 */
    padding: 6px 12px; /* 减小内边距 */
    color: rgba(255, 255, 255, 0.5); /* 默认更暗的文字 */
    background: rgb(43, 43, 43); /* 统一背景色 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px; /* 稍微减小圆角 */
    text-decoration: none;
    font-size: 0.8em; /* 减小字体大小 */
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: none;
    border: 0px solid rgba(255, 255, 255, 0.08);
}

.header-menu-link:hover {
    background: rgba(40, 40, 40, 0.8);
    color: rgba(255, 255, 255, 0.7); /* 悬停时稍微亮一点 */
    box-shadow: none;
}

.header-menu-link.active {
    background: rgb(43, 43, 43) !important; /* 激活时使用正常亮度 */
    color: #fff !important; /* 激活时完全白色 */
}

.header-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px; /* 减小图标和文字间距 */
    padding: 6px 12px; /* 减小内边距 */
    background: rgb(43, 43, 43); /* 统一背景色 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.5); /* 默认更暗的文字 */
    text-decoration: none;
    font-size: 0.8em; /* 减小字体大小 */
    font-weight: 600;
    border-radius: 16px; /* 稍微减小圆角 */
    border: 0px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: none;
}

.header-menu-btn:hover {
    background: rgba(40, 40, 40, 0.8);
    color: rgba(255, 255, 255, 0.7); /* 悬停时稍微亮一点 */
    box-shadow: none;
}

.header-menu-btn.active {
    background: rgb(43, 43, 43) !important; /* 激活时使用正常亮度 */
    color: #fff !important; /* 激活时完全白色 */
}

/* 图标样式 - 默认较暗，激活时变亮 */
.header-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 14px; /* 减小图标大小 */
    height: 14px;
    transition: all 0.2s;
}

.header-icon-circle svg {
    width: 14px; /* 减小图标大小 */
    height: 14px;
    color: rgba(255, 255, 255, 0.5); /* 默认更暗 */
    stroke: rgba(255, 255, 255, 0.5);
}

.header-menu-link:hover .header-icon-circle svg,
.header-menu-btn:hover .header-icon-circle svg {
    color: rgba(255, 255, 255, 0.7); /* 悬停时稍微亮一点 */
    stroke: rgba(255, 255, 255, 0.7);
}

.header-menu-link.active .header-icon-circle svg,
.header-menu-btn.active .header-icon-circle svg {
    color: #fff; /* 激活时完全白色 */
    stroke: #fff;
}

.header-button {
    display: inline-flex;
    align-items: center;
    gap: 4px; /* 减小图标和文字间距 */
    padding: 6px 12px; /* 减小内边距 */
    color: rgba(255, 255, 255, 0.5); /* 默认更暗的文字 */
    background: rgb(43, 43, 43); /* 统一背景色 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none;
    font-size: 0.8em; /* 减小字体大小 */
    font-weight: 600;
    border-radius: 16px; /* 稍微减小圆角 */
    border: 0px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
}

.header-button:hover {
    background: rgba(40, 40, 40, 0.8);
    color: rgba(255, 255, 255, 0.7); /* 悬停时稍微亮一点 */
    box-shadow: none;
}

.header-button.active {
    background: rgb(43, 43, 43) !important; /* 激活时使用正常亮度 */
    color: #fff !important; /* 激活时完全白色 */
}

.header-button .header-icon-circle svg {
    color: rgba(255, 255, 255, 0.5); /* 默认更暗 */
    stroke: rgba(255, 255, 255, 0.5);
}

.header-button:hover .header-icon-circle svg {
    color: rgba(255, 255, 255, 0.7); /* 悬停时稍微亮一点 */
    stroke: rgba(255, 255, 255, 0.7);
}

.header-button.active .header-icon-circle svg {
    color: #fff; /* 激活时完全白色 */
    stroke: #fff;
}

.msg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    background: #ff6b6b;
    color: #fff;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    margin-left: 4px;
}

/* === 临时修复：确保博客页面头部与固定快捷链接可见 ===
   如果博客页面仍看不到顶部主菜单，说明某处在运行时或更高优先级的样式隐藏了它。
   这里我们提供一个针对 `.blog-page-body` 的强制覆盖规则，便于快速恢复可见性并继续调试。
   这是低风险的 CSS 覆盖（可回滚）。
*/
.blog-page-body .site-header {
    display: flex !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1200 !important;
    visibility: visible !important;
}
.blog-page-body .category-nav-bar.fixed-links {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.blog-page-body .header-fixed-toggle {
    display: inline-flex !important;
}


/* --- [!! 重大修改 !!] --- */
/* --- 2. 左侧边栏 (新：子分类菜单) --- */
/* 左侧边栏触发区域 */
.sidebar-trigger {
    display: none; /* 隐藏触发区域 */
}

/* 左侧边栏 */
.sidebar {
    display: none; /* 隐藏左侧边栏 */
}

/* [!NEW!] 子分类菜单标题 */
.sidebar-menu-title {
    font-size: 0.9em;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px; /* 标题和列表的间距 */
    padding-bottom: 10px; /* 标题下的分割线 */
    border-bottom: 1px solid #333;
}

/* [!NEW!] 子分类菜单列表 */
.sidebar-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px; /* 菜单项之间的间距 */
}

/* [!NEW!] 子分类菜单项 */
.sidebar-menu-item a {
    display: block;
    font-size: 0.95em;
    color: #aaa;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.3s, color 0.3s, transform 0.2s, border-color 0.3s, box-shadow 0.3s;
    user-select: none; /* 防止选中文本 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-menu-item a:hover {
    background-color: #2a2a2a;
    color: #fff;
}
/* [!NEW!] 激活的菜单项 */
.sidebar-menu-item a.active {
    background: linear-gradient(135deg, #007aff 0%, #00a3ff 100%);
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3), 0 0 8px rgba(0, 122, 255, 0.2);
    transform: translateX(4px);
}

/* [!NEW!] 侧边栏为空时的提示 */
.sidebar-empty-message {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    line-height: 1.5;
}

/* --- (旧的 .sidebar-form, .sidebar-select 等样式已删除) --- */


/* --- 3. 内容区域 (新) --- */
.content-area {
    flex-grow: 1;
    width: 100%;
    margin-left: 0;
    padding: 40px;
    overflow-y: auto;
    height: calc(100vh - 70px);
}
/* 隐藏旧的顶部元素 */
.tag-filter-bar, .filter-sort-container, .header-container {
    display: none;
}

/* --- 4. 轮播图 (新) --- */
/* 轮播和右侧面板容器 */
.hero-section-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: stretch; /* 改为stretch，让子元素高度一致 */
    width: 100%;
}

/* 确保即使没有轮播，容器也能正常显示 */
.hero-carousel-wrapper:empty + .top-items-panel {
    margin-left: 0;
}

.hero-carousel-wrapper {
    flex: 1;
    min-width: 0; /* 防止flex子项溢出 */
    display: flex;
    flex-direction: column;
}

.hero-carousel-container {
    width: 100%;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* 允许flex子项缩小 */
}

/* 右侧Top文章面板 */
.top-items-panel {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%; /* 与轮播图高度一致 */
    box-sizing: border-box;
}

.top-item-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background-color: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    overflow: hidden;
}

.top-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.18);
    background-color: var(--surface-elevated);
}

.top-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #2a2a2a;
}

.top-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.top-item-card:hover .top-item-image img {
    transform: scale(1.1);
}

.top-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: #555;
    background-color: #2a2a2a;
}

.top-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0; /* 防止文本溢出 */
}

.top-item-badge {
    font-size: 0.75em;
    color: #888;
    margin-bottom: 4px;
}

.top-item-title {
    font-size: 0.9em;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-item-card:hover .top-item-title {
    color: #fff;
}

.top-item-tag {
    font-size: 0.75em;
    color: #007aff;
    margin-top: 4px;
}

/* 响应式：在小屏幕上堆叠显示 */
@media (max-width: 1200px) {
    .hero-section-wrapper {
        flex-direction: column;
    }
    
    .top-items-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .top-item-card {
        flex: 1;
        min-width: calc(50% - 6px);
    }
}

@media (max-width: 768px) {
    .top-item-card {
        min-width: 100%;
    }
}
/* 确保轮播图和右侧面板高度一致 */
#heroSwiper {
    width: 100%;
    min-height: 300px;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}
.swiper-slide {
    background-color: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.hero-slide-link {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    text-decoration: none;
    color: #fff;
    overflow: hidden; /* 确保图片不出界 */
}
.hero-slide-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    transition: transform 0.4s ease;
}
.hero-slide-link:hover .hero-slide-image {
    transform: scale(1.05); /* 悬停时图片放大 */
}
.hero-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-placeholder {
    height: 100%; font-size: 5em; color: #555;
    display: flex; align-items: center; justify-content: center;
}
.hero-slide-content {
    position: relative;
    z-index: 10;
    padding: 30px 40px;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0) 100%);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-slide-content h3 { font-size: 2em; margin-bottom: 10px; }
.hero-slide-content p { font-size: 1.1em; color: #ccc; max-width: 50%; }
.swiper-button-prev, .swiper-button-next {
    color: #fff;
    opacity: 0.3;
    transition: opacity 0.3s;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 50%;
    height: 44px; /* Swiper 默认值 */
    width: 44px; /* Swiper 默认值 */
}
.swiper-button-prev:after, .swiper-button-next:after {
    font-size: 18px; /* 箭头大小 */
    font-weight: 600;
}
#heroSwiper:hover .swiper-button-prev,
#heroSwiper:hover .swiper-button-next {
    opacity: 0.8;
}
.swiper-button-prev:hover, .swiper-button-next:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.4);
}
.swiper-pagination-bullet {
    background-color: rgba(255, 255, 255, 0.5);
    width: 10px;
    height: 10px;
    opacity: 0.7;
}
.swiper-pagination-bullet-active {
    background-color: #fff;
    opacity: 1;
}

/* --- [!! 修改 !!] --- */
/* --- 5. 搜索栏 (新位置) --- */
.search-and-categories-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 16px;
    width: 100%;
}
.search-bar-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 12px;
}
.search-container {
    flex-grow: 0;
    max-width: none;
    margin: 0;
}
.search-input-container {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 1;
    max-width: 800px;
    min-width: 400px;
    background-color: rgba(58, 58, 58, 0.8);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.search-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0.3;
    mix-blend-mode: overlay;
    z-index: 0;
}

.search-input-container > * {
    position: relative;
    z-index: 1;
}

/* 内联排序选择框 */
.sort-container-inline {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 0 8px;
}

.sort-select-inline {
    padding: 8px 12px;
    font-size: 0.9em;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: var(--text-secondary);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a8a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
    min-width: 120px;
    transition: var(--transition);
}

.sort-select-inline:hover {
    color: var(--text);
}

.sort-select-inline:focus {
    color: var(--text);
}

/* 下拉选项样式 */
.sort-select-inline option,
.search-scope-select option,
select option {
    background-color: var(--surface);
    color: var(--text);
    padding: 8px 12px;
}

.sort-select-inline option:hover,
.search-scope-select option:hover,
select option:hover {
    background-color: var(--surface-elevated);
}

.sort-select-inline option:checked,
.search-scope-select option:checked,
select option:checked {
    background-color: var(--accent);
    color: #fff;
}

/* 搜索范围下拉框 */
.search-scope-select {
    padding: 12px 16px;
    font-size: 0.9em;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background-color: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a8a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    min-width: 80px;
    transition: var(--transition);
}

.search-scope-select:hover {
    background-color: rgba(255,255,255,0.03);
    color: var(--text);
}

.search-scope-select:focus {
    background-color: rgba(255,255,255,0.03);
    color: var(--text);
}

#searchInput {
    flex: 1;
    padding: 12px 50px 12px 16px;
    font-size: 0.95em;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: var(--text);
    transition: var(--transition);
    outline: none;
}

#searchInput::placeholder {
    color: var(--muted);
}

#searchInput:focus {
    background-color: transparent;
}

.search-input-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
    background-color: rgba(66, 66, 66, 0.85);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.search-button {
    position: relative;
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border-radius: 0;
    border-left: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.search-button:hover {
    color: var(--accent);
    background-color: rgba(74, 158, 255, 0.1);
}
.search-button svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* 热门搜索提示 */
.hot-searches-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 16px;
    flex-wrap: wrap;
    flex-shrink: 0;
    width: 100%;
    max-width: 1200px;
}

.hot-searches-hint {
    font-size: 0.75em;
    color: var(--text-secondary);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hot-searches-container::after {
    content: '';
    flex: 0 0 1px;
    width: 1px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 0 20px;
    display: none;
}

.hot-searches-container:has(.sub-categories-menu):has(.hot-searches-hint)::after {
    display: block;
}

.sub-categories-menu {
    margin-left: 0;
    display: flex;
    align-items: center;
}

.hot-searches-label {
    color: var(--text-secondary);
    margin-right: 0;
    font-size: 0.75em;
}

.hot-searches-tags {
    color: var(--text-secondary);
    font-size: 0.75em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hot-search-tag {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
    font-size: 0.75em;
    white-space: nowrap;
}

.hot-search-tag:hover {
    color: var(--accent);
    text-decoration: underline;
}

.sub-categories-menu {
    display: flex;
    align-items: center;
}

.sub-categories-label {
    display: none;
}

.sub-categories-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sub-category-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--surface-elevated);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95em; /* 文字变大 */
    font-weight: 500; /* 加粗 */
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* 使用CSS变量来设置颜色 */
    --sub-category-color: hsl(200, 80%, 60%);
    border-left: 3px solid var(--sub-category-color);
}

.sub-category-link:hover {
    background-color: var(--surface);
    border-color: var(--sub-category-color);
    color: var(--sub-category-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sub-category-link.active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--sub-category-color) 20%, transparent), color-mix(in srgb, var(--sub-category-color) 15%, transparent));
    border-color: var(--sub-category-color);
    color: var(--sub-category-color);
    font-weight: 600;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--sub-category-color) 30%, transparent);
}

/* --- 6. 卡片网格 (新样式) - 扁平化优化 --- */
.card-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0 auto 40px auto;
}
.grid-card {
    background-color: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.08);
    min-height: auto;
    /* 扁平化设计 */
}
.grid-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(255,255,255,0.12);
}
.card-cover-link { text-decoration: none; display: block; }
.card-cover {
    height: 160px;
    overflow: hidden;
    position: relative;
    background-color: var(--surface-elevated);
}
.card-cover-tag-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 24px);
    pointer-events: none;
}
.card-cover-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 0.72em;
    font-weight: 600;
    line-height: 1;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(15, 15, 20, 0.78), rgba(15, 15, 20, 0.45));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    letter-spacing: 0.03em;
    text-transform: none;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    pointer-events: auto;
    white-space: nowrap;
}
.card-cover-tag-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tag-color, #5ac8fa);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.card-cover-tag-more {
    background: rgba(255, 255, 255, 0.16);
    border-style: dashed;
    color: #f0f0f0;
    font-weight: 500;
}
.card-cover-tag-more .card-cover-tag-dot {
    display: none;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.grid-card:hover .card-cover img { transform: scale(1.05); }
.card-image-placeholder {
    height: 160px;
    background-color: var(--surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 2.5em;
}

/* Cost显示样式（封面左下角） */
.card-cover-cost {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: rgba(100, 100, 100, 0.7);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    z-index: 5;
    pointer-events: none;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 书籍卡片中的Cost显示 */
.book-card .book-card-cover .card-cover-cost {
    position: absolute;
    bottom: 12px;
    left: 12px;
}

.grid-card .favorite-button {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background-color: rgba(60, 60, 60, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #888888; /* 默认灰色 */
    font-size: 1.2em;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}
.grid-card .favorite-button[data-action="unfavorite"] {
    color: #ffd700; /* 黄色星星（已收藏） */
}
.grid-card .favorite-button:hover {
    background-color: rgba(80, 80, 80, 0.8);
    border-color: rgba(255, 255, 255, 0.18);
}
.grid-card .favorite-button:hover:not([data-action="unfavorite"]) {
    color: #aaaaaa; /* 悬停时稍微亮一点的灰色 */
}
.grid-card .favorite-button[data-action="unfavorite"]:hover {
    color: #ffed4e; /* 更亮的黄色 */
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.card-title-link {
    text-decoration: none;
}
.card-title {
    font-size: 1em;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.card-title .card-title-link {
    flex: 1;
    min-width: 0;
    text-decoration: none;
}
.card-title-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.grid-card:hover .card-title-text {
    color: var(--text);
}
.card-favorite-count-inline {
    font-size: 0.85em;
    color: #888888; /* 默认灰色 */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-weight: 500;
    transition: color 0.2s ease;
}

.card-favorite-count-inline.user-favorited {
    color: #ffd700; /* 用户收藏后显示黄色 */
}
.card-meta {
    font-size: 0.85em;
    color: var(--muted);
    margin-bottom: 4px;
}
.card-meta-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.card-meta-secondary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card-meta-secondary.collapsed {
    display: none;
}
.card-meta-item {
    color: var(--muted);
    white-space: nowrap;
}
.card-meta-toggle {
    font-size: 0.75em;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}
.card-meta-toggle:hover {
    color: var(--text);
    background-color: rgba(255,255,255,0.05);
}
.card-meta-toggle::after {
    content: ' 展开';
}
.card-meta-toggle.expanded::after {
    content: ' 收起';
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.card-favorite-count { 
    font-size: 0.8em; 
    color: #888888; /* 默认灰色 */
    display: inline-flex; 
    align-items: center; 
    gap: 4px;
    transition: color 0.2s ease;
}

.card-favorite-count.user-favorited {
    color: #ffd700; /* 用户收藏后显示黄色 */
}
.card-details-link {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background-color: var(--surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.card-details-link:hover {
    color: var(--text);
    background-color: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.2);
}
.card-category, .card-date, .card-desc, .card-link, .card-id { display: none; }

/* 添加文章标签样式 */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.card-tag {
    font-size: 0.75em;
    color: #777;
    background-color: #2a2a2a;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #3a3a3a;
}

.card-tag:hover {
    background-color: #3a3a3a;
    color: #fff;
    border-color: #444;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 标签动画效果 */
.card-tag {
    font-size: 0.75em;
    color: #777;
    background-color: #2a2a2a;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #3a3a3a;
    position: relative;
    overflow: hidden;
}

.card-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
}

.card-tag:hover::before {
    left: 100%;
}

.card-score {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.no-data-message { padding: 50px; text-align: center; color: #888; }

/* --- 7. 分页 UI (新样式) --- */
.pagination-container { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 40px auto 60px auto; padding: 0 5%; flex-wrap: wrap; }
.pagination-info { background-color: #2a2a2a; color: #aaa; font-size: 0.85em; padding: 6px 10px; border-radius: 6px; margin-right: 8px; }
.pagination-link { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; background-color: #2a2a2a; color: #ccc; text-decoration: none; font-weight: 500; border-radius: 6px; transition: background-color 0.3s, color 0.3s; border: 1px solid #3a3a3a; font-size: 0.9em; }
.pagination-link:hover { background-color: #3a3a3a; color: #fff; }
.pagination-link.page-num.active { background-color: #007aff; border-color: #007aff; color: #fff; font-weight: 600; cursor: default; }
.pagination-link.disabled, .pagination-link[disabled] { background-color: #202020; color: #555; border-color: #2a2a2a; cursor: not-allowed; pointer-events: none; }
.pagination-jump { display: flex; align-items: center; margin-left: 10px; }
.pagination-jump-input { width: 45px; height: 36px; padding: 0 8px; font-size: 0.9em; border: 1px solid #3a3a3a; border-radius: 6px 0 0 6px; background-color: #2a2a2a; color: #ccc; text-align: center; outline: none; -webkit-appearance: textfield; -moz-appearance: textfield; appearance: textfield; }
.pagination-jump-input::-webkit-outer-spin-button, .pagination-jump-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.pagination-jump-input:focus { border-color: #007aff; }
.pagination-jump-button { height: 36px; padding: 0 10px; font-size: 0.9em; font-weight: 500; border: 1px solid #007aff; border-left: none; border-radius: 0 6px 6px 0; background-color: #007aff; color: #fff; cursor: pointer; transition: background-color 0.3s; }
.pagination-jump-button:hover { background-color: #0056b3; }


/* --- 8. 详情页样式 (旧) --- */
.detail-container { display: none; }

.detail-article-container {
    width: 100%;
    margin: 0;
    padding: 30px;
    background-color: var(--surface);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 面包屑导航样式 */
.detail-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: #2b2b2b;
    border-radius: 8px;
    border: 0px solid #3a3a3a;
    font-size: 0.9em;
    color: #888;
    width: 100%;
    box-sizing: border-box;
}

/* 确保面包屑在详情页顶部显示 */
.content-area .detail-breadcrumb {
    margin-bottom: 20px;
    margin-top: 0;
}

/* 博客页面面包屑样式 */
.blog-breadcrumb {
    margin-bottom: 20px;
    margin-top: 0;
}

.blog-article-container .blog-breadcrumb {
    margin-bottom: 20px;
    margin-top: 20px;
    background-color: #f5f5f5;
    border-color: #e0e0e0;
}

.blog-breadcrumb .breadcrumb-label {
    color: #666;
}

.blog-breadcrumb .breadcrumb-link {
    color: #007aff;
}

.blog-breadcrumb .breadcrumb-link:hover {
    color: #0056b3;
}

.blog-breadcrumb .breadcrumb-separator {
    color: #999;
}

.blog-breadcrumb .breadcrumb-current {
    color: #333;
}

.breadcrumb-label {
    margin-right: 8px;
    color: #aaa;
    font-weight: 500;
}

.breadcrumb-link {
    color: #007aff;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.breadcrumb-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-home-icon {
    margin-right: 4px;
    font-size: 1em;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #666;
    font-weight: 500;
}

.breadcrumb-current {
    color: #ccc;
    font-weight: 500;
}

.back-button { display: inline-block; margin-bottom: 25px; color: #007aff; text-decoration: none; font-weight: 500; padding: 8px 15px; border: 1px solid #007aff; border-radius: 20px; transition: all 0.3s ease; font-size: 0.9em; }
.back-button:hover { background-color: #007aff; color: #1f1f1f; }


/* --- 9. Notion 块样式 (无修改) --- */
.notion-block-heading-1 { font-size: 2.5em; font-weight: 700; color: #e0e0e0; margin: 40px 0 15px 0; border-bottom: 3px solid #3a3a3a; padding-bottom: 10px; }
.notion-block-heading-2 { font-size: 1.8em; font-weight: 600; color: #e0e0e0; margin: 30px 0 12px 0; }
.notion-block-heading-3 { font-size: 1.4em; font-weight: 500; color: #e0e0e0; margin: 25px 0 8px 0; }
.notion-block-paragraph { font-size: 1em; color: #cccccc; line-height: 1.7; margin-bottom: 15px; }
.notion-block-bulleted-list, .notion-block-numbered-list { margin: 10px 0 15px 0; padding-left: 1.8em; list-style-position: outside; }
.notion-block-bulleted-list-item, .notion-block-numbered-list-item { font-size: 1em; color: #cccccc; margin: 8px 0; line-height: 1.7; position: relative; }
.notion-block-bulleted-list-item::before, .notion-block-numbered-list-item::before { content: none; }
.notion-block-bulleted-list-item { list-style-type: disc !important; } .notion-block-numbered-list-item { list-style-type: decimal !important; }
.notion-block-bulleted-list-item > ul, .notion-block-bulleted-list-item > ol, .notion-block-numbered-list-item > ul, .notion-block-numbered-list-item > ol { margin-left: 0; padding-left: 1.5em; margin-top: 5px; margin-bottom: 5px; }
.notion-block-quote { margin: 20px 0; padding: 15px 20px; border-left: 4px solid #007aff; background-color: #242424; font-style: italic; color: #b0b0b0; }
.notion-block-to-do { font-size: 1em; color: #cccccc; display: flex; align-items: flex-start; margin: 10px 0; gap: 0.7em; }
.notion-block-to-do-prefix { display: inline-block; width: 1.1em; height: 1.1em; border: 2px solid #666; border-radius: 3px; margin-top: 0.25em; flex-shrink: 0; transition: background-color 0.2s, border-color 0.2s; position: relative; cursor: default; }
.notion-block-to-do[data-checked="true"] .notion-block-to-do-prefix { background-color: #007aff; border-color: #007aff; }
.notion-block-to-do[data-checked="true"] .notion-block-to-do-prefix::after { content: '✓'; color: #1f1f1f; font-weight: bold; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); line-height: 1; }
.notion-block-to-do > div { flex: 1; margin-top: 0.05em; } .notion-block-to-do > div p:first-child { margin-top: 0; } .notion-block-to-do > div p:last-child { margin-bottom: 0; }
.notion-block-to-do[data-checked="true"] > div { text-decoration: line-through; color: #777; }
.notion-block-to-do > div > ul, .notion-block-to-do > div > ol { margin-left: 0; padding-left: 1.5em; margin-top: 5px; }
.notion-block-divider { border: none; border-top: 1px solid #3a3a3a; margin: 40px 0; }
.notion-block-image, .notion-block-video, .notion-block-file, .notion-block-embed { margin: 30px 0; text-align: center; }
.notion-block-image img, .notion-block-video video { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); }
.notion-block-image-error { display: flex; align-items: center; justify-content: center; height: 150px; background-color: #2a2a2a; color: #777; font-size: 0.9em; border-radius: 8px; }
.notion-block-file a { color: #007aff; text-decoration: none; border-bottom: 1px dashed #007aff; padding-bottom: 2px; } .notion-block-file a:hover { text-decoration: none; border-bottom-style: solid; }
.notion-block-caption { font-size: 0.85em; color: #888; margin-top: 10px; font-style: italic; }
.notion-block-code-container { position: relative; margin: 30px 0; background-color: #282c34; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid #444; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.notion-block-code-container pre { margin: 0; overflow-x: auto; }
.notion-block-code { font-family: 'Fira Code', 'Consolas', 'Monaco', monospace; font-size: 0.9em; line-height: 1.6; padding: 1.5em; color: #abb2bf; display: block; white-space: pre; }
.notion-block-code-container::after { content: attr(data-lang); position: absolute; top: 0; right: 10px; background-color: #444; color: #aaa; font-size: 0.75em; padding: 2px 6px; border-radius: 0 0 4px 4px; text-transform: uppercase; }
.notion-block-bookmark { margin: 25px 0; padding: 15px; background-color: #242424; border: 1px solid #3a3a3a; border-radius: 8px; }
.notion-block-bookmark a { color: #8ab4f8; text-decoration: none; font-weight: 500; word-break: break-all; } .notion-block-bookmark a:hover { text-decoration: underline; }
.notion-bold { font-weight: 600; } .notion-italic { font-style: italic; } .notion-underline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; } .notion-strikethrough { text-decoration: line-through; }
.notion-code { font-family: 'Fira Code', 'Consolas', 'Monaco', monospace; background-color: rgba(135, 131, 120, 0.15); color: #eb5757; padding: 0.2em 0.4em; border-radius: 3px; font-size: 0.9em; }
.notion-link { color: #8ab4f8; text-decoration: none; border-bottom: 1px solid rgba(138, 180, 248, 0.4); transition: border-color 0.3s; }
.notion-link:hover { border-bottom-color: rgba(138, 180, 248, 0.8); }
.notion-block-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); border: 1px solid #3a3a3a; }
.notion-block-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.notion-block-synced-block { margin: 25px 0; padding: 20px; border: 1px dashed #444; border-radius: 8px; }
.notion-block-callout { display: flex; align-items: flex-start; gap: 12px; margin: 25px 0; padding: 18px; border-radius: 8px; border: 1px solid; }
.notion-callout-icon { font-size: 1.3em; line-height: 1.6; margin-top: 1px; flex-shrink: 0; }
.notion-callout-external-icon { width: 22px; height: 22px; object-fit: cover; margin-top: 1px; flex-shrink: 0; }
.notion-callout-text { flex: 1; color: inherit; line-height: 1.7; }
.notion-callout-text p:last-child { margin-bottom: 0; } .notion-callout-text > *:first-child { margin-top: 0; }
.notion-color-default_background, .notion-color-gray_background { background-color: rgba(85, 85, 85, 0.15); border-color: rgba(85, 85, 85, 0.3); color: #ccc; }
.notion-color-brown_background { background-color: rgba(140, 95, 70, 0.15); border-color: rgba(140, 95, 70, 0.3); color: #e7c7b8; }
.notion-color-orange_background { background-color: rgba(217, 115, 38, 0.15); border-color: rgba(217, 115, 38, 0.3); color: #ffcaa4; }
.notion-color-yellow_background { background-color: rgba(223, 172, 30, 0.15); border-color: rgba(223, 172, 30, 0.3); color: #ffe99b; }
.notion-color-green_background { background-color: rgba(64, 139, 100, 0.15); border-color: rgba(64, 139, 100, 0.3); color: #b1e6ce; }
.notion-color-blue_background { background-color: rgba(51, 120, 189, 0.15); border-color: rgba(51, 120, 189, 0.3); color: #a9d3ff; }
.notion-color-purple_background { background-color: rgba(124, 81, 183, 0.15); border-color: rgba(124, 81, 183, 0.3); color: #d9c7ff; }
.notion-color-pink_background { background-color: rgba(193, 76, 137, 0.15); border-color: rgba(193, 76, 137, 0.3); color: #ffc9e6; }
.notion-color-red_background { background-color: rgba(212, 76, 71, 0.15); border-color: rgba(212, 76, 71, 0.3); color: #ffbdb9; }
.notion-block-toggle { margin: 10px 0; border-bottom: 1px solid #3a3a3a; padding-bottom: 10px; }
.notion-block-toggle summary { cursor: pointer; display: flex; align-items: flex-start; list-style: none; color: #e0e0e0; font-weight: 500; padding: 5px 0; }
.notion-block-toggle summary::-webkit-details-marker { display: none; }
.notion-block-toggle summary::before { content: '▶'; display: inline-block; font-size: 0.8em; margin-right: 0.7em; transition: transform 0.2s; color: #888; flex-shrink: 0; margin-top: 0.3em; }
.notion-block-toggle[open] > summary::before { transform: rotate(90deg); }
.notion-toggle-content { padding-left: 1.8em; margin-top: 8px; border-left: 2px solid #3a3a3a; }
.notion-toggle-content > *:first-child { margin-top: 0; } .notion-toggle-content > *:last-child { margin-bottom: 0; }


/* --- 10. 全新详情页布局 (资产页) --- */

/* 1. 主布局 (两栏) */
.detail-page-layout {
    display: flex;
    flex-direction: row;
    gap: 40px;
    max-width: 1700px; /* 整体最大宽度 */
    margin: 0 auto;
}
.detail-content-left {
    flex: 3;
    min-width: 0; /* 允许 flex item 收缩 */
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.detail-sidebar-right {
    flex: 1;
    min-width: 300px; /* 侧边栏最小宽度 */
    max-width: 380px; /* 侧边栏最大宽度 */
}

/* 2. 右侧粘性信息盒 */
.detail-info-box {
    position: inherit;
    top: 40px; 
    background-color: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.detail-title {
    font-size: 2em;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 0;
    border: none;
    padding: 0;
}
.favorite-button-detail {
    width: 100%;
    padding: 12px;
    font-size: 1.0em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background-color: var(--surface-elevated); /* 默认灰色背景 */
    color: #888888; /* 默认灰色文字 */
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    line-height: 1.4;
    position: static; 
    height: auto;
}
.favorite-button-detail[data-action="unfavorite"] {
    background-color: rgb(43, 43, 43); /* 收藏后高亮背景 */
    color: #ffd700; /* 黄色星星（已收藏） */
    border-color: rgba(255, 215, 0, 0.3);
}
.favorite-button-detail:hover {
    background-color: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.7);
}
.favorite-button-detail[data-action="unfavorite"]:hover {
    background-color: rgba(50, 50, 50, 0.95);
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffed4e;
}
.favorite-button-detail.disabled { 
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
}

/* 详情页收藏数量显示 */
.detail-favorite-count-display {
    margin-top: 10px;
    margin-bottom: 10px;
}

.detail-favorite-count-number {
    font-size: 1em;
    color: #ccc;
    font-weight: 500;
}

/* 资源信息和下载功能样式 */
.detail-resource-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-resource-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.detail-resource-icon {
    font-size: 1.2em;
}

.detail-resource-title {
    font-size: 1em;
    font-weight: 600;
    color: #e0e0e0;
}

.detail-resource-options {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 15px;
}

.detail-resource-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    position: relative;
}

.detail-resource-option:hover {
    background-color: var(--surface-elevated);
}

.detail-resource-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #dc2626;
}

.detail-resource-option-label {
    flex: 1;
    color: #e0e0e0;
    font-size: 0.95em;
}

.detail-resource-option-cost {
    color: #888;
    font-size: 0.9em;
}

.detail-download-btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background-color: #10b981;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
}

.detail-download-btn:hover {
    background-color: #059669;
}

/* 支付方式选择模态框 */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.payment-modal-content {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
    border: 1px solid #3a3a3a;
}

.payment-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.payment-modal-close:hover {
    background-color: #3a3a3a;
    color: #fff;
}

.payment-modal-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #fff;
    margin: 0 0 20px 0;
    text-align: center;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.payment-option:hover {
    background-color: #3a3a3a;
}

.payment-option-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.5em;
    font-weight: 600;
    color: #fff;
}

#paymentAlipay .payment-option-icon {
    background-color: #1677ff;
    font-size: 1.8em;
}

#paymentBalance .payment-option-icon {
    background-color: #fbbf24;
    font-size: 1.3em;
}

.payment-option-text {
    flex: 1;
    color: #fff;
    font-size: 1.1em;
    font-weight: 500;
}

.payment-option-divider {
    height: 1px;
    background-color: #3a3a3a;
    margin: 0;
}

/* 余额不足提示模态框 */
.balance-alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.balance-alert-content {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 40px 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid #3a3a3a;
}

.balance-alert-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.balance-alert-message {
    margin-bottom: 25px;
}

.balance-alert-text {
    background-color: #dc2626;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
}

.balance-alert-text:hover {
    background-color: #b91c1c;
}

.balance-alert-btn {
    background-color: #007aff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 40px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.balance-alert-btn:hover {
    background-color: #0056b3;
}

/* 下载链接模态框 */
.download-link-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10002;
    align-items: center;
    justify-content: center;
}

.download-link-modal-content {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 1px solid #3a3a3a;
}

.download-link-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.download-link-modal-close:hover {
    background-color: #3a3a3a;
    color: #fff;
}

.download-link-modal-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #fff;
    margin: 0 0 20px 0;
    text-align: center;
}

.download-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.download-link-input {
    flex: 1;
    padding: 12px;
    background-color: #1f1f1f;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9em;
    font-family: monospace;
    box-sizing: border-box;
}

.download-link-input:focus {
    outline: none;
    border-color: #007aff;
}

.download-link-copy-btn {
    padding: 12px 20px;
    background-color: #007aff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.download-link-copy-btn:hover {
    background-color: #0056b3;
}

.download-link-direct-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.download-link-direct-btn:hover {
    background-color: #059669;
}

/* 已下载按钮样式 */
.detail-download-btn.downloaded {
    background-color: #10b981;
}

.detail-download-btn.downloaded:hover {
    background-color: #059669;
}


.detail-info-section {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 20px;
}
.detail-info-label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.detail-category-link {
    font-size: 1em;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    background-color: #3a88a8;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}
.detail-category-link:hover { background-color: #4a9ab8; }
.detail-score {
    font-size: 1.1em;
    color: #e0e0e0;
}
.detail-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.detail-tag-link {
    font-size: 0.9em;
    color: #fff;
    background-color: #3c3c3c;
    padding: 5px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
.detail-tag-link:hover {
    background-color: #4a4a4a;
    color: #fff;
}

/* 3. 左侧图片画廊 */
.detail-gallery {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.gallery-main-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.gallery-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-thumbnails {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}
.thumbnail-image {
    width: 120px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: opacity 0.3s, border-color 0.3s;
}
.thumbnail-image:hover {
    opacity: 1;
}
.thumbnail-image.active {
    opacity: 1;
    border-color: #007aff;
}

/* 4. 左侧推荐部分 (横向滚动) */
.recommendations-section {
    width: 100%;
    margin-top: 20px;
}
.recommendations-title {
    font-size: 1.8em;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 25px;
    border-bottom: none;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.recommendations-title a {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s;
}
.recommendations-title a:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.recommendations-scroll-container {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 20px;
    padding: 5px 5px 20px 5px;
    margin-left: -5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.recommendations-scroll-container::-webkit-scrollbar {
    display: none;
}

.recommendations-scroll-container .grid-card {
    width: 280px;
    flex-shrink: 0;
    margin-bottom: 0;
}

/* --- [!! 修改 !!] --- */
/* --- 10. 搜索结果排序 (Sort Dropdown) --- */
.sort-container {
    display: none; /* 隐藏独立的排序容器，因为已嵌入搜索栏 */
}
.sort-container label {
    font-size: 0.9em;
    color: #aaa;
    margin-right: 10px;
    font-weight: 500;
}
.sort-select {
    padding: 8px 12px;
    font-size: 0.9em;
    border: 1px solid #333;
    border-radius: 6px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    outline: none;
    cursor: pointer;
}
.sort-select:focus {
    border-color: #007aff;
}
/* --- [!! 新增 !!] 收藏页样式 --- */
.favorites-category-bar {
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 5px;
    background-color: var(--surface);
}

/* 收藏页移除侧边栏后，主内容区占满 */
.main-container > .content-area:first-child {
    /* 当侧边栏没有渲染时 (收藏页)，让 content-area 占满 */
    width: 100%;
}
/* --- [!! V2.1 !!] 自定义分类侧边栏 --- */

.sidebar-menu-title.my-categories {
    border-bottom-color: #007aff;
    color: #ccc;
}
.sidebar-menu-list.my-categories {
    margin-bottom: 20px;
}
.my-category-link {
    /* 拖拽目标样式 & focus 可见性 */
    transition: background-color 0.18s, color 0.12s;
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--muted);
}
.my-category-link.drag-over {
    background-color: #007aff !important;
    color: #fff !important;
}

.create-category-form {
    display: flex;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 20px;
}
.create-category-form input {
    flex-grow: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px 0 0 6px;
    background-color: var(--surface-elevated);
    color: var(--text);
    outline: none;
}
.create-category-form input:focus {
    border-color: var(--accent);
    background-color: var(--surface-hover);
}
.create-category-form button {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid #007aff;
    border-left: none;
    background-color: #007aff;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    padding: 0;
    line-height: 38px;
}
.create-category-form button:hover {
    background-color: #0056b3;
}

/* 收藏页面分类栏紧凑布局 */
.favorites-categories-bar {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--surface);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.favorites-category-nav {
    margin-bottom: 15px;
}

.favorites-category-nav .category-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.favorites-category-nav .category-nav-item {
    margin: 0;
}

.favorites-my-categories-compact {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.my-categories-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.my-categories-label {
    padding: 6px 12px;
    background-color: #007aff;
    color: #fff;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.my-categories-list-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.my-categories-list-compact .sidebar-menu-item {
    margin: 0;
}

.my-categories-list-compact .my-category-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.my-categories-list-compact .my-category-link {
    padding: 4px 10px;
    font-size: 0.85em;
    white-space: nowrap;
}

.my-categories-list-compact .sort-handle {
    font-size: 0.8em;
    opacity: 0.5;
    cursor: grab;
}

.my-categories-list-compact .category-actions {
    display: flex;
    gap: 2px;
}

.my-categories-list-compact .edit-category-button,
.my-categories-list-compact .delete-category-button {
    font-size: 0.75em;
    padding: 2px 4px;
    opacity: 0.6;
}

.create-category-form-compact {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.create-category-form-compact input {
    width: 180px;
    padding: 6px 10px;
    font-size: 0.85em;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px 0 0 6px;
    background-color: var(--surface-elevated);
    color: var(--text);
    outline: none;
}

.create-category-form-compact input:focus {
    border-color: var(--accent);
    background-color: var(--surface-hover);
}

.create-category-form-compact button {
    width: 36px;
    height: 32px;
    border: 1px solid #007aff;
    border-left: none;
    background-color: #007aff;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    padding: 0;
    line-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-category-form-compact button:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .favorites-my-categories-compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .my-categories-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .create-category-form-compact {
        width: 100%;
    }
    
    .create-category-form-compact input {
        flex: 1;
        width: auto;
    }
}


/* --- [!! V2.1 !!] 卡片拖拽和菜单 --- */

/* 拖拽中的卡片样式 */
.grid-card[draggable="true"] {
    cursor: grab;
}
.grid-card[draggable="true"]:active {
    cursor: grabbing;
}

/* "..." 卡片菜单按钮 */
.card-footer {
    position: relative;
    /* (修复) 确保 footer 内容不会被按钮挤压 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-favorite-count {
    flex-shrink: 0;
}
.card-details-link {
    flex-shrink: 0;
    margin-left: auto; /* 推到右边 */
    padding-left: 10px;
}
.card-menu-button {
    position: absolute;
    right: 35px; /* 放在 "View Details" 左边 */
    bottom: 8px;
    width: 24px;
    height: 24px;
    background-color: rgba(60, 60, 60, 0.8);
    backdrop-filter: blur(2px);
    border: 1px solid #444;
    color: #aaa;
    border-radius: 50%;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* 默认隐藏 */
    transition: opacity 0.3s;
}
.grid-card:hover .card-menu-button {
    opacity: 1; /* 悬停时显示 */
}
.card-menu-button:hover {
    background-color: #555;
    color: #fff;
}
.card-menu-button svg {
    width: 16px;
    height: 16px;
}

/* 卡片菜单弹窗 */
.card-menu-popup {
    display: none;
    position: absolute;
    z-index: 2000;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    min-width: 180px;
    padding: 8px;
    font-size: 0.9em;
}
.card-menu-popup ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.card-menu-popup li {
    margin: 0;
}
.card-menu-popup .card-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    color: #ccc;
    text-decoration: none;
    border-radius: 4px;
}
.card-menu-popup .card-menu-item:hover {
    background-color: #007aff;
    color: #fff;
}
.card-menu-popup .card-menu-item .card-menu-item-label {
    flex: 1;
}
.card-menu-popup .card-menu-item .card-menu-check {
    color: #4cd964;
    font-size: 0.85em;
    line-height: 1;
    visibility: hidden;
}
.card-menu-popup .card-menu-item.assigned {
    background-color: rgba(0, 122, 255, 0.18);
    color: #fff;
}
.card-menu-popup .card-menu-item.assigned .card-menu-check {
    visibility: visible;
}
/* --- [!! V2.2 !!] 卡片菜单按钮 "..." 新位置 --- */
.card-menu-button {
    position: absolute;
    right: 10px; /* 和爱心按钮右对齐 */
    top: 50px;  /* 放在 10px(顶部) + 32px(爱心高度) + 8px(间距) 的位置 */
    bottom: auto; /* 覆盖旧的 bottom 属性 */
    width: 32px;  /* 和爱心按钮一样宽 */
    height: 32px; /* 和爱心按钮一样高 */
    background-color: rgba(31, 31, 31, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    padding: 6px; /* 调整 SVG 居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
}
.grid-card:hover .card-menu-button {
    opacity: 1;
}
.card-menu-button:hover {
    background-color: rgba(60, 60, 60, 0.9);
    color: #fff;
}
.card-menu-button svg {
    width: 20px;
    height: 20px;
}
/* 覆盖旧的右侧定位，确保它不影响 "View Details" */
.card-menu-button {
    right: 10px;
    bottom: auto;
}
/* 确保 "View Details" 不会和按钮重叠 */
.card-details-link {
    margin-right: 0;
}


/* --- [!! V2.2 !!] 自定义分类 (删除 + 排序) --- */
.sidebar-menu-item.my-category-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.sidebar-menu-item.my-category-item a {
    flex-grow: 1;
    min-width: 0;
}
/* 排序手柄 */
.sort-handle {
    flex-shrink: 0;
    padding: 0 5px;
    cursor: move; /* or 'grab' */
    color: #666;
    display: none; /* 默认隐藏 */
}
.sidebar-menu-list:hover .sort-handle {
    display: inline-block; /* 悬停在列表上时显示 */
}
.sort-handle:hover {
    color: #999;
}

/* 删除按钮 */
.delete-category-button {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: none;
    background-color: transparent;
    color: #666;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    line-height: 26px;
    padding: 0;
    text-align: center;
    opacity: 0; /* 默认隐藏 */
    transition: opacity 0.3s, background-color 0.3s, color 0.3s;
}
.sidebar-menu-item.my-category-item:hover .delete-category-button {
    opacity: 1; /* 悬停在项目上时显示 */
}
.delete-category-button:hover {
    background-color: #444;
    color: #f44336;
}
/* --- [!! V2.4 !!] Score Stars Style --- */
.card-score-stars {
    display: inline-block; /* Or block if you want it on a new line */
    margin-top: 4px; /* Adjust spacing as needed */
    font-size: 0.9em; /* Adjust size */
    color: #ffd700; /* Gold color for stars */
    letter-spacing: 1px;
}
/* --- [!! V2.5 !!] 行内编辑和确认删除样式 --- */

.sidebar-menu-item.my-category-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sidebar-menu-item.my-category-item a {
    flex-grow: 1;
    min-width: 0;
    /* 确保链接内的元素垂直居中 */
    display: flex;
    align-items: center;
}

.category-name-label {
    /* 允许文本被截断 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-edit-input {
    flex-grow: 1;
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.9em;
    border: 1px solid #007aff;
    border-radius: 4px;
    background-color: #3a3a3a;
    color: #e0e0e0;
    outline: none;
    /* 确保高度和链接差不多 */
    height: 36px; 
}

/* 按钮容器 */
.category-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    /* 默认隐藏，悬停时显示 */
    opacity: 0;
    transition: opacity 0.3s;
}
.sidebar-menu-item.my-category-item:hover .category-actions {
    opacity: 1;
}

/* 覆盖旧的删除按钮样式 */
.delete-category-button {
    opacity: 1; /* 不再单独控制 */
    position: static;
    font-size: 1.2em; /* 保持原样 */
}

/* 通用操作按钮样式 */
.edit-category-button,
.delete-category-button,
.confirm-delete-button,
.cancel-action-button {
    width: 28px;
    height: 28px;
    border: none;
    background-color: transparent;
    color: #888;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 28px;
    padding: 0;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

.edit-category-button:hover {
    background-color: #444;
    color: #007aff; /* 编辑-蓝色 */
}
.delete-category-button:hover {
    background-color: #444;
    color: #f44336; /* 删除-红色 */
}
.confirm-delete-button {
    color: #4caf50; /* 确认-绿色 */
    font-size: 1em;
}
.confirm-delete-button:hover {
    background-color: #444;
    color: #6eff74;
}
.cancel-action-button {
    color: #aaa;
    font-size: 0.9em;
}
.cancel-action-button:hover {
    background-color: #444;
    color: #fff;
}
/* ... (保留所有 styles.css 的现有内容) ... */
/* ... (这里假设 styles.css 的所有内容都在上面) ... */


/* [!! 新增 !!] --- 博客页面 (/blog) 专属样式 --- */

/* 1. 博客页面 Body */
.blog-page-body {
    /* 使用深色背景，但可能与主站 #121212 不同，以示区分 */
    background-color: #0f0f0f; 
    overflow-y: auto; /* 确保可以滚动 */
}

/* 隐藏主站布局 (以防万一) */
.blog-page-body .new-layout,
.blog-page-body .site-header {
    display: none;
}

/* 2. 博客顶部导航 */
.blog-top-nav {
    width: 100%;
    background-color: #1a1a1a;
    border-bottom: 1px solid #3a3a3a;
    padding: 0 40px;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.blog-nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-nav-left, .blog-nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.blog-nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e0e0e0;
    text-decoration: none;
}

.blog-nav-links {
    display: flex;
    gap: 16px;
}

.blog-nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #a0a0a0;
    text-decoration: none;
    padding: 8px 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.blog-nav-links a:hover {
    color: #e0e0e0;
}

.blog-nav-links a.active {
    color: #ffffff;
    border-bottom-color: #5A95E4;
}

.blog-search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.blog-search-bar svg {
    position: absolute;
    left: 12px;
    color: #777;
    pointer-events: none;
}

.blog-search-bar input {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #e0e0e0;
    padding: 8px 12px 8px 36px;
    font-size: 0.9rem;
    min-width: 250px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.blog-search-bar input:focus {
    border-color: #5A95E4;
    box-shadow: 0 0 0 2px rgba(90, 149, 228, 0.3);
}

.blog-nav-logout {
    font-size: 0.9rem;
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s;
}
.blog-nav-logout:hover {
    color: #ff6b6b;
}


/* 3. 博客主内容区 (容器) */
.blog-main-container {
    width: 100%;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 40px;
}

.blog-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start; /* 顶部对齐 */
}

/* 4. 博客左侧边栏 */
.blog-sidebar-left {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 100px; /* 70px 导航 + 30px 间距 */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 4A. 简介卡片 */
.blog-profile-card {
    background-color: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3a3a3a;
    margin-bottom: 16px;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.profile-bio {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-bottom: 16px;
    line-height: 1.5;
}

.profile-links {
    display: flex;
    gap: 16px;
}

.profile-links a {
    color: #a0a0a0;
    transition: color 0.3s;
}
.profile-links a:hover {
    color: #5A95E4;
}

/* 4B. 分类列表卡片 */
.blog-category-list-card {
    background-color: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    padding: 24px;
}

.blog-category-list-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #3a3a3a;
}

.blog-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-category-list a {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
}

.blog-category-list a:hover {
    background-color: #2a2a2a;
    color: #222222;
}

.blog-category-list a.active {
    background-color: #5A95E4;
    color: #222222;;
    font-weight: 500;
}


/* 5. 博客右侧内容区 */
.blog-content-right {
    flex-grow: 1;
    min-width: 0; /* 防止 flex 溢出 */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 6. 博客文章卡片 (覆盖 .card) */
/* 我们使用 .blog-article-card 来覆盖 .card 的样式，
   使其变为水平布局
*/
.blog-article-card {
    display: flex;
    flex-direction: row; /* 水平布局 */
    background-color: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.blog-article-card:hover {
    border-color: #555;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 覆盖 .card-image-container */
.blog-article-card .card-image-container {
    width: 300px; /* 固定宽度 */
    height: 200px; /* 固定高度 */
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* 覆盖 .card-image */
.blog-article-card .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-article-card:hover .card-image {
    transform: scale(1.05);
}

/* 覆盖收藏夹按钮 */
.blog-article-card .favorite-button,
.blog-article-card .card-menu-button {
    /* 位置微调 */
    top: 12px;
}
.blog-article-card .favorite-button {
    right: 12px;
    position: absolute;
    z-index: 5;
    background-color: rgba(34, 34, 34, 0.75);
    color: #888888; /* 默认灰色 */
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.blog-article-card .favorite-button[data-action="unfavorite"] {
    color: #ffd700; /* 黄色星星（已收藏） */
}
.blog-article-card .favorite-button:hover {
    background-color: rgba(34, 34, 34, 0.9);
    transform: scale(1.05);
}
.blog-article-card .favorite-button:hover:not([data-action="unfavorite"]) {
    color: #aaaaaa; /* 悬停时稍微亮一点的灰色 */
}
.blog-article-card .favorite-button[data-action="unfavorite"]:hover {
    color: #ffed4e; /* 更亮的黄色 */
}
.blog-article-card .card-menu-button { left: 12px; }

.blog-card-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-card-favorite-count {
    font-size: 0.9em;
    color: #888888; /* 默认灰色 */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.blog-card-favorite-count.user-favorited {
    color: #ffd700; /* 用户收藏后显示黄色 */
}

.blog-post-favorite {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.blog-post-favorite .blog-card-favorite-count {
    font-size: 0.95em;
}

.blog-post-favorite .blog-favorite-button-detail {
    width: auto;
    padding: 10px 18px;
}

.blog-post-favorite .blog-favorite-button-detail.disabled {
    background-color: #444;
}

.blog-card--favorites {
    width: 100%;
}

.favorites-blog-card-wrapper {
    width: 100%;
    grid-column: 1 / -1;
}

.favorites-blog-card-wrapper .blog-card {
    margin-bottom: 20px;
}


/* 覆盖 .card-content (让它占据剩余空间) */
.blog-article-card .card-content {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 使 .card-footer 自动到底部 */
}

/* 覆盖 .card-title */
.blog-article-card .card-title {
    font-size: 1.25rem; /* 稍大 */
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 10px;
    line-height: 1.4;
    
    /* 最多显示两行 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 覆盖 .card-summary */
.blog-article-card .card-summary {
    font-size: 0.95rem;
    color: #a0a0a0;
    line-height: 1.6;
    margin-bottom: 16px;
    
    /* 最多显示三行 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 覆盖 .card-footer */
.blog-article-card .card-footer {
    border-top: 1px solid #3a3a3a;
    padding-top: 16px;
    margin-top: auto; /* 关键：推到底部 */
}

/* 响应式：在小屏幕上，左侧边栏移到顶部 */
@media (max-width: 1024px) {
    .blog-layout {
        flex-direction: column;
    }
    .blog-sidebar-left {
        width: 100%;
        position: static;
        flex-direction: row;
        gap: 20px;
        align-items: flex-start;
    }
    .blog-profile-card {
        flex-grow: 1;
    }
    .blog-category-list-card {
        flex-grow: 2;
    }
    .blog-main-container {
        padding: 0 20px;
        margin-top: 20px;
    }
    .blog-top-nav {
        padding: 0 20px;
    }
}

/* 响应式：在更小的屏幕上，文章卡片变回垂直 */
@media (max-width: 768px) {
    .blog-article-card {
        flex-direction: column; /* 变回垂直 */
    }
    .blog-article-card .card-image-container {
        width: 100%; /* 宽度占满 */
        height: 220px; /* 高度固定 */
    }
    .blog-sidebar-left {
        flex-direction: column;
    }
    .blog-nav-left .blog-nav-links {
        display: none; /* 隐藏导航链接 */
    }
    .blog-search-bar input {
        min-width: 150px;
    }
}
/* --- [!! V2.13 最终修复版 !!] 博客页面 (V2) 专用样式 --- */
/* (本代码块已合并 V2.7, V2.8, V2.10, V2.12, V2.12.3 的所有样式) */

/* 1. 博客页面全局 - 统一深色主题 */
.blog-page-body {
    background-color: var(--bg); /* 统一主页面背景色 */
    color: var(--text); /* 统一文字颜色 */
    overflow-y: auto !important; /* 覆盖 new-layout 的 hidden */
}

/* 隐藏主站的 Header 和布局 */
.blog-page-body .site-header,
.blog-page-body .main-container {
    display: none;
}

/* 2. 博客顶部导航栏 - 统一深色主题 */
.blog-header {
    width: 100%;
    background-color: rgb(43, 43, 43); /* 统一背景色 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
    box-shadow: none;
}
.blog-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.blog-logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text); /* 统一文字颜色 */
    text-decoration: none;
}
.blog-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}
.blog-nav-link {
    display: block;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.5); /* 统一文字颜色 */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
}
.blog-nav-link:hover {
    background-color: rgba(50, 50, 50, 0.8);
    color: rgba(255, 255, 255, 0.7);
}
.blog-nav-link.active {
    background-color: rgb(43, 43, 43);
    color: #fff;
    font-weight: 600;
}
.blog-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.blog-search-container {
    position: relative;
    display: flex;
    align-items: center;
}
#blogPageSearchInput {
    background-color: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 6px 30px 6px 15px;
    font-size: 0.9em;
    color: var(--text);
    outline: none;
    transition: all 0.3s;
}
#blogPageSearchInput:focus {
    border-color: var(--accent);
    background-color: var(--surface-elevated);
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.2);
}
#blogPageSearchButton {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 5px;
}
.blog-header-user {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9em;
}
.blog-header-user:hover {
    color: #fff;
}
/* [!! V2.10 !!] 博客头部设置链接 */
.blog-header-user-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}


/* 3. 博客主内容区布局 */
.blog-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}
.blog-content-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    padding: 30px 0;
}

/* 4. 博客侧边栏 (左) */
.blog-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 90px; /* 60px header + 30px margin */
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0 20px;
    margin-left: 0;
}
.blog-widget {
    background-color: var(--surface); /* 统一背景色 */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    overflow: hidden;
    padding: 20px;
}
.blog-widget-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* 4a. 个人简介 Widget */
.blog-profile-widget {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.blog-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}
.blog-profile-name {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}
.blog-profile-bio {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}
.blog-profile-links {
    display: flex;
    gap: 10px;
}
.blog-profile-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--surface-elevated);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.blog-profile-links a:hover {
    background-color: var(--surface-hover);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 4b. 分类 Widget */
.blog-category-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.blog-category-list > li {
    list-style: none;
    margin: 3px 0;
}
.blog-category-item-parent details {
    margin-bottom: 5px;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}
.blog-category-header {
    display: block !important;
    width: 100% !important;
    cursor: pointer !important;
}

.blog-category-item-parent {
    position: relative !important;
    display: block !important;
}

.blog-category-item-parent details {
    display: block !important;
}

.blog-category-item-parent details[open] > summary > .blog-category-header > .blog-category-toggle {
    transform: rotate(90deg) !important;
}

.blog-category-item-parent details > summary {
    list-style: none !important;
    cursor: pointer !important;
    display: block !important;
    padding: 0 !important;
}

.blog-category-item-parent details > summary::-webkit-details-marker {
    display: none !important;
}

.blog-category-toggle {
    flex: 0 0 auto !important;
    padding: 4px !important;
    margin-right: 4px !important;
    background: none !important;
    border: none !important;
    color: #666 !important;
    font-size: 0.75em !important;
    line-height: 1 !important;
    transition: transform 0.2s ease !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 2 !important;
}

.blog-category-item-parent .blog-category-list-child {
    margin-left: 20px !important;
    padding-left: 10px !important;
    border-left: 1px solid #e8e8e8 !important;
    display: block !important;
}

.blog-category-item-parent details .blog-category-link {
    flex-grow: 1 !important;
    background: none !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

.blog-category-item-parent details summary:hover .blog-category-link {
    background-color: #f5f5f5 !important;
}

/* Override any potential conflicts */
.blog-category-item-parent details[open] > summary {
    display: block !important;
}

.blog-category-item-parent details[open] > .blog-category-list-child {
    display: block !important;
}
.blog-category-list-child {
    list-style: none;
    padding: 5px 0 5px 28px;
    margin: 0;
    border-left: 1px solid #e8e8e8;
}
.blog-category-list-child .blog-category-item-child {
    margin: 2px 0;
}
.blog-category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    font-size: 1em;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 38px;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    font-weight: 500;
}

.blog-category-link:hover {
    background-color: #333;
    border-color: #444;
    color: #fff;
}

.blog-category-link.active {
    background-color: #007aff;
    color: #ffffff;
    border-color: #0056b3;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.blog-category-count {
    font-size: 0.85em;
    color: #888;
    background-color: #e8e8e8;
    padding: 2px 6px;
    border-radius: 5px;
    margin-left: 8px;
}
.blog-category-link.active .blog-category-count {
    background-color: #fff;
    color: #007aff;
}
summary .blog-category-link {
    flex: 1;
    margin-right: 5px;
}

/* 4c. 统计 Widget */
.blog-stats-list {
    list-style: none;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.blog-stats-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #555;
}
.blog-stats-list li span:last-child {
    font-weight: 600;
    color: #222;
}

/* 5. 博客主内容 (右) */
.blog-main-content {
    flex-grow: 1;
    min-width: 0;
    padding: 20px 40px;
    background-color: #fff;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0 auto;
    max-width: calc(100% - 560px); /* 减去左右侧边栏宽度 */
}
.blog-article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 6. 博客文章卡片样式 - 统一深色主题 */
.blog-card {
    display: flex;
    background-color: var(--surface); /* 统一背景色 */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 5px;
    padding: 15px;
}
.blog-card:hover {
    box-shadow: none;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    background-color: var(--surface-elevated);
}
.blog-card-image-link {
    width: 280px;
    flex-shrink: 0;
}
.blog-card-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.blog-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-image-wrapper img {
    transform: scale(1.05);
}
.card-image-placeholder-small {
    width: 100%;
    height: 100%;
    background-color: var(--surface-elevated);
}

.blog-card-content {
    display: flex;
    flex-direction: column;
    padding: 25px;
    flex-grow: 1;
}
.blog-card-title {
    font-size: 1.4em;
    font-weight: 600;
    margin: 0;
}
.blog-card-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}
.blog-card-title a:hover {
    color: var(--accent);
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin: 10px 0 15px 0;
}
.blog-card-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.blog-card-meta-item a {
    color: var(--text-secondary);
    text-decoration: none;
}
.blog-card-meta-item a:hover {
    color: var(--text);
}
.blog-card-summary {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.blog-card-footer {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
}
.blog-card-tags:empty {
    display: none;
}
.blog-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.78em;
    font-weight: 500;
    border-radius: 999px;
    background: rgba(0, 217, 255, 0.12);
    color: var(--accent);
    border: 1px solid rgba(0, 217, 255, 0.2);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.blog-card-tag-more {
    background: transparent;
    border-style: dashed;
    cursor: default;
}
.blog-card-stats {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-left: auto;
    white-space: nowrap;
}
.blog-empty-state {
    display: none;
    text-align: center;
    padding: 40px 12px;
    font-size: 0.95em;
    color: #99a0ab;
}
.blog-pagination-container.is-hidden {
    display: none;
}
.blog-category-breadcrumb {
    color: #6f7a8a;
    font-size: 0.85em;
}
.blog-category-breadcrumb-root {
    color: #404b63;
    font-weight: 600;
}
.blog-category-divider {
    display: inline-block;
    margin: 0 6px;
    color: #c0c4cc;
}
/* --- [!! V2.8 !!] 博客文章详情页 (三栏) 样式 --- */

/* 1. 博客三栏布局 */
.blog-page-body.blog-post-page .blog-content-layout {
    display: grid;
    grid-template-columns: 280px 1fr 240px; /* 左侧边栏 | 内容 | 右侧TOC */
    align-items: flex-start;
    gap: 0;
}
.blog-main-content.blog-article-container {
    max-width: none; /* 不限制文章宽度，让内容区域更宽 */
    background-color: var(--bg); /* 统一背景色 */
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 20px 40px;
}
.blog-toc-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 90px; /* 60px header + 30px margin */
    padding: 0 20px;
    margin-right: 0;
}

/* 2. 博客文章头部 */
.blog-post-header {
    padding: 30px 40px 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.blog-post-title {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin: 0 0 15px 0;
}

/* 3. 博客文章内容 (覆盖 Notion 样式) */
.blog-post-content {
    padding: 30px 40px;
}
.blog-post-content .notion-block-paragraph {
    color: var(--text); /* 统一文字颜色 */
    font-size: 1.1em;
    line-height: 1.8;
}
.blog-post-content .notion-block-heading-1 {
    color: var(--text);
    border-bottom: none;
    font-size: 2em;
}
.blog-post-content .notion-block-heading-2 {
    color: var(--text);
    font-size: 1.6em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 10px;
    margin-top: 40px;
}
.blog-post-content .notion-block-heading-3 {
    color: var(--text);
    font-size: 1.3em;
    margin-top: 30px;
}
.blog-post-content .notion-block-image {
    margin: 30px 0;
}
.blog-post-content .notion-block-image img {
    max-width: 100%; /* [!! 修复 !!] 统一图片样式 */
    height: auto;
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.blog-post-content .notion-block-quote {
    color: var(--text-secondary);
    background-color: var(--surface);
    border-left: 4px solid var(--accent);
    padding: 15px 20px;
    border-radius: 8px;
}
.blog-post-content .notion-block-code-container {
    /* 保持深色代码块风格，但提供具体样式以提高一致性 */
    background: var(--surface);
    padding: 12px;
    border-radius: 8px;
    overflow: auto;
    border: 1px solid rgba(255,255,255,0.03);
}
.blog-post-content .notion-link {
    color: var(--accent);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}
.blog-post-content .notion-link:hover {
    border-bottom-color: var(--accent);
}
.blog-post-content .notion-block-bulleted-list-item,
.blog-post-content .notion-block-numbered-list-item {
    color: var(--text); /* 统一列表颜色 */
    line-height: 1.8;
}

/* 4. 目录 (TOC) 样式 */
.blog-toc-list {
    list-style: none;
    padding: 10px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}
.blog-toc-item a {
    display: block;
    padding: 8px 10px;
    font-size: 0.9em;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s;
}
.blog-toc-item a:hover {
    background-color: var(--surface-elevated);
    color: var(--text);
}
.blog-toc-item.level-3 a {
    padding-left: 25px; /* H3 缩进 */
    font-size: 0.85em;
    color: var(--text-muted);
}
.blog-toc-item-empty {
    font-size: 0.9em;
    color: var(--text-muted);
    padding: 10px;
}
/* --- [!! 新增 V2.13 !!] 作品画廊 (/gallery) 样式 --- */

/* 1. 画廊内容区调整 */
.gallery-content-area {
    width: 100%;
    max-width: 100%;
    padding: 30px; /* 减小内边距 */
}

/* 2. 画廊头部 (标题和控制器) */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px; /* 配合网格的边距 */
}

.gallery-title {
    font-size: 2em;
    font-weight: 600;
    color: #e0e0e0;
}

.gallery-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px;
}
.gallery-controls-label {
    font-size: 0.9em;
    color: #888;
    margin-right: 4px;
}

.gallery-control-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.gallery-control-btn svg {
    width: 16px;
    height: 16px;
    fill: #777;
    transition: fill 0.3s;
}
.gallery-control-btn:hover {
    background-color: var(--surface-elevated);
}
.gallery-control-btn:hover svg {
    fill: #ccc;
}
.gallery-control-btn.active {
    background-color: var(--accent);
}
.gallery-control-btn.active svg {
    fill: #fff;
}

/* 3. 画廊网格布局 */
.gallery-grid {
    display: grid;
    gap: 20px;
    padding: 0 10px;
    transition: grid-template-columns 0.4s ease;
}

/* 布局控制 */
.gallery-grid.grid-size-large {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}
.gallery-grid.grid-size-medium {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.gallery-grid.grid-size-small {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.gallery-empty-message {
    color: #888;
    font-size: 1.1em;
    text-align: center;
    padding: 50px;
}

/* 4. 画廊卡片样式 */
.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background-color: var(--surface);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    aspect-ratio: 4 / 3; /* 保持 4:3 比例 */
    transition: border-color 0.3s, background-color 0.3s;
    text-decoration: none;
}
.gallery-item:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background-color: var(--surface-elevated);
}

.gallery-item-image {
    width: 100%;
    height: 100%;
}
.gallery-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover .gallery-item-image img {
    transform: scale(1.05);
}

/* 5. 悬停遮罩 */
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0.7) 60%, 
        rgba(0, 0, 0, 0.9) 100%
    );
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
}
.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    /* 内容在底部 */
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease 0.1s, opacity 0.3s ease 0.1s;
}
.gallery-item:hover .gallery-overlay-content {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-overlay-author {
    font-size: 0.9em;
    color: #ccc;
    margin: 2px 0 0 0;
}

/* 6. 悬停标签 (在遮罩顶部) */
.gallery-overlay-tags {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    
    /* 动画 */
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.3s ease 0.1s, opacity 0.3s ease 0.1s;
}
.gallery-item:hover .gallery-overlay-tags {
    transform: translateY(0);
    opacity: 1;
}
.gallery-overlay-tag, .gallery-overlay-tag-more {
    font-size: 0.75em;
    font-weight: 500;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 99px;
    white-space: nowrap;
}
.gallery-overlay-tag-more {
    background-color: rgba(255, 255, 255, 0.1);
    border-style: dashed;
}
/* --- [!! 新增 V2.13 !!] 详情页 (ArtStation) 布局样式 --- */

/* 1. 重构左侧内容区：移除画廊样式，改为纵向堆叠 */
.detail-content-left {
    flex-direction: column;
    gap: 20px; /* 图片之间的间距 */
    /* 移除 .detail-gallery 相关的旧样式 */
}

/* 2. (新) 纵向图片项样式 */
.detail-image-item {
    position: relative; /* 用于悬停提示定位 */
    width: 100%;
    background-color: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    line-height: 0; /* 移除图片底部的空白 */
}
.detail-image-item img {
    width: 100%;
    height: auto;
    object-fit: contain; /* 改为 contain 以显示完整图片 */
    background-color: var(--bg-secondary); /* 图片未填满时的底色 */
}

/* 3. (新) 图片悬停提示 */
.image-hover-prompt {
    position: absolute;
    inset: 0; /* 铺满父元素 */
    display: flex;
    align-items: center;
    justify-content: center;
    
    background-color: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 600;
    
    opacity: 0; /* 默认隐藏 */
    pointer-events: none; /* 允许点击穿透 */
    transition: opacity 0.3s ease;
}
.detail-image-item:hover .image-hover-prompt {
    opacity: 1; /* 悬停时显示 */
}

/* 4. (新) 美化右侧作者区域 */
.detail-info-section.author-section {
    padding-top: 0; /* 作者信息通常在标题下方，不需要上边框 */
    border-top: none;
    margin-top: -10px; /* 紧贴标题 */
    margin-bottom: 10px; /* 与收藏按钮拉开距离 */
}
.detail-author-name {
    font-size: 1.1em;
    font-weight: 500;
    color: #00A9FF; /* 使用醒目的颜色 */
    cursor: pointer;
    transition: color 0.3s;
}
.detail-author-name:hover {
    color: #5ccbff;
}

/* 5. 调整右侧栏，使其可以容纳文章 */
.detail-sidebar-right {
    /* */
    display: flex;
    flex-direction: column;
    gap: 40px; /* 粘性框、文章、推荐之间的间距 */
}

/* 6. 调整文章容器，因为它现在在右侧栏 */
.detail-article-container {
    padding: 0; /* 移除内边距，因为父级已有 */
    background-color: transparent; /* 移除背景 */
    border: none; /* 移除边框 */
}

/* 7. 调整推荐模块，因为它现在在右侧栏 */
.recommendations-section {
    margin-top: 0; /* 移除顶部间距 */
}
.recommendations-scroll-container {
    /* 在窄栏中，卡片可能需要更小 */
    gap: 15px;
}
.recommendations-scroll-container .grid-card {
    width: 250px; /* 缩小推荐卡片宽度 */
}
/* --- [!! 修复 V2.14 !!] 悬停提示位置 --- */

/* 1. (新) 画廊卡片 "点击查看详情" 提示 */
.gallery-overlay-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    color: #fff;
    font-size: 1.1em;
    font-weight: 500;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    backdrop-filter: blur(4px);

    /* 默认隐藏，在 .gallery-item:hover 时显示 */
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
    z-index: 6; /* 确保在遮罩上 */
}
.gallery-item:hover .gallery-overlay-prompt {
    opacity: 1;
}

/* 2. 当提示显示时，让作者/标签在底部/顶部正常显示 */
.gallery-item-overlay {
    z-index: 5;
}
.gallery-item:hover .gallery-overlay-content {
    opacity: 1;
    transform: translateY(0);
    z-index: 7;
}
.gallery-item:hover .gallery-overlay-tags {
    opacity: 1;
    transform: translateY(0);
    z-index: 7;
}

/* 3. 移除详情页的悬停 (以防万一) */
.detail-image-item .image-hover-prompt {
    display: none;
}
/* --- [!! 修复 V2.15 !!] 详情页条件布局 CSS --- */

/* --- 1. ArtStation 布局 (新) --- */
/* (这些是我上次添加的 V2.14 规则，现在加上了 .detail-layout-artstation 前缀) */

/* 1.1 ArtStation 布局：应用独立滚动 */
.detail-layout-artstation.new-layout .content-area#detailPageContentArea {
    height: calc(100vh - 70px);
    overflow: hidden;
    padding: 0;
}
.detail-layout-artstation .detail-page-layout {
    height: 100%;
    gap: 0;
}

/* 1.2 ArtStation 布局：左侧 (图片) 列独立滚动 */
.detail-layout-artstation .detail-content-left {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px;
    gap: 20px; /* 图片间距 */
    background-color: var(--bg); /* 确保有底色 */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) var(--bg-secondary);
}
.detail-layout-artstation .detail-content-left::-webkit-scrollbar { width: 8px; }
.detail-layout-artstation .detail-content-left::-webkit-scrollbar-track {
    background-color: var(--bg-secondary);
}
.detail-layout-artstation .detail-content-left::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.25); 
    border-radius: 4px;
}
.detail-layout-artstation .detail-content-left::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.35);
}

/* 1.3 ArtStation 布局：纵向图片样式 */
.detail-layout-artstation .detail-image-item {
    position: relative;
    width: 100%;
    background-color: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    line-height: 0;
}
.detail-layout-artstation .detail-image-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: var(--bg-secondary);
}

/* 1.4 ArtStation 布局：右侧 (信息) 列独立滚动 */
.detail-layout-artstation .detail-sidebar-right {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px;
    gap: 30px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background-color: var(--bg);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) var(--bg-secondary);
}
.detail-layout-artstation .detail-sidebar-right::-webkit-scrollbar { width: 8px; }
.detail-layout-artstation .detail-sidebar-right::-webkit-scrollbar-track {
    background-color: var(--bg-secondary);
}
.detail-layout-artstation .detail-sidebar-right::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}
.detail-layout-artstation .detail-sidebar-right::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.35);
}

/* 1.5 ArtStation 布局：信息框粘在 *右侧* 滚动栏顶部 */
.detail-layout-artstation .detail-info-box {
    position: sticky;
    top: 0; 
    z-index: 10; 
    background-color: var(--surface);
}
.detail-layout-artstation .detail-article-container,
.detail-layout-artstation .recommendations-section {
    padding: 0;
    background-color: transparent;
    border: none;
}
.detail-layout-artstation .recommendations-scroll-container .grid-card {
    width: 250px;
}


/* --- 2. Legacy 布局 (旧) --- */
/* (这些规则恢复了旧版 的粘性侧边栏) */

/* 2.1 Legacy 布局：内容区使用标准滚动 */
.detail-layout-legacy.new-layout .content-area#detailPageContentArea {
    /* 明确继承并声明，以避免空规则集警告 */
    height: auto;
    overflow-y: auto;
    padding: 40px;
}

/* 2.2 Legacy 布局：信息框粘在 *视口* 顶部 */
.detail-layout-legacy .detail-info-box {
    position: sticky;
    top: 110px; /* 70px 导航 + 40px padding */
}

/* 2.3 Legacy 布局：(修复) 确保左侧画廊不使用 V2.14 的独立滚动样式 */
.detail-layout-legacy .detail-content-left {
    display: flex; /* 恢复 flex 布局 */
    flex-direction: column; /* 恢复 纵向堆叠 */
    gap: 40px; /* 恢复 元素间距 */
}

/* 2.4 Legacy 布局：(修复) 确保右侧栏不使用 V2.14 的独立滚动样式 */
.detail-layout-legacy .detail-sidebar-right {
    /* 确保右侧栏使用页面滚动（非独立滚动） */
    overflow: visible;
    flex: 1;
    min-width: 100px;
    max-width: 420px;
}
/* --- [!! 修复 V2.16 !!] ArtStation 布局（V2） - 修复滚动、图片压缩、宽度 --- */

/* * 1. (修复) 撤销独立滚动：
 * 我们不再设置 .content-area 的 height/overflow，
 * 让页面恢复到标准滚动。
*/
.detail-layout-artstation.new-layout .content-area#detailPageContentArea {
    height: auto;
    overflow-y: auto;
    padding: 40px;
}
.detail-layout-artstation .detail-page-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.detail-layout-artstation .detail-content-left,
.detail-layout-artstation .detail-sidebar-right {
    min-width: 0;
    overflow: visible;
}

/* * 2. (修复) 推荐模块位置：
 * 信息框改为粘在 *视口* 顶部 (同 Legacy 布局)。
 * 这样页面就可以正常滚动到底部，显示“相关推荐”。
*/
.detail-layout-artstation .detail-info-box {
    position: sticky;
    top: 110px; /* 70px 导航 + 40px padding */
    z-index: 10;
}

/* * 3. (修复) 图片被压缩：
 * 移除 object-fit，让图片按 100% 宽度和自然高度显示。
*/
.detail-layout-artstation .detail-image-item img {
    width: 100%;
    height: auto; /* 关键：让图片保持自然高度 */
    display: block; /* 移除图片底部的额外空间 */
    object-fit: visible; /* 禁用任何压缩/裁剪 */
}
.detail-layout-artstation .detail-image-item {
    background-color: #181818; /* 容器背景 */
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

/* * 4. (修复) 调整右侧栏宽度：
 * 我们将左（图片）右（信息）的比例从 3:1 改为 2:1.2。
*/
.detail-layout-artstation .detail-content-left {
    flex: 2; /* 左侧 (图片) 比例为 2 */
    min-width: 0;
}
.detail-layout-artstation .detail-sidebar-right {
    flex: 1.2; /* 右侧 (信息) 比例为 1.2 (比 1 稍宽) */
    min-width: 100px;
    max-width: 450px;
}
/* --- [!! 修复 V2.17 !!] ArtStation 布局 - 移除 Sticky 并修复所有问题 --- */

/* 1. (关键) 移除所有布局中的 Sticky 行为 */
/* 这将覆盖 .detail-layout-legacy 和 .detail-layout-artstation 的规则 */
.detail-info-box {
    position: static !important; /* 强制移除 sticky */
    top: auto !important;
}

/* 2. (关键) 撤销 V2.16 的独立滚动方案 */
/* 让页面恢复标准滚动 */
.detail-layout-artstation.new-layout .content-area#detailPageContentArea,
.detail-layout-legacy.new-layout .content-area#detailPageContentArea {
    height: auto; /* 恢复自动高度 */
    overflow-y: auto; /* 恢复页面滚动 */
    overflow-x: hidden;
    padding: 40px; /* 恢复 .content-area 的标准内边距 */
}
.detail-layout-artstation .detail-page-layout {
    height: auto; /* 恢复自动高度 */
    gap: 40px; /* 恢复列间距 */
}
.detail-layout-artstation .detail-content-left,
.detail-layout-artstation .detail-sidebar-right {
    height: auto; /* 恢复自动高度 */
    overflow: visible; /* 禁用独立滚动 */
    padding: 0; /* 移除 V2.16 的内边距 */
    border-left: none; /* 移除 V2.16 的边框 */
}

/* 3. (修复) 解决图片压缩问题 */
.detail-layout-artstation .detail-image-item img {
    width: 100%;
    height: auto; /* 关键：让图片保持自然高度 */
    display: block; /* 移除图片底部的额外空间 */
    object-fit: visible; /* 禁用任何压缩/裁剪 */
}
.detail-layout-artstation .detail-image-item {
    background-color: #181818; /* 图片容器背景 */
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

/* 4. (修复) 调整 ArtStation 布局的宽度 */
.detail-layout-artstation .detail-content-left {
    flex: 2; /* 左侧 (图片 + 推荐) 比例为 2 */
    min-width: 0;
}
.detail-layout-artstation .detail-sidebar-right {
    flex: 1.2; /* 右侧 (信息 + 文章) 比例为 1.2 (更宽) */
    min-width: 100px; /* */
    max-width: 450px;
}

/* 5. (新) 为移动到左侧的“相关推荐”添加间距 */
.detail-layout-artstation .detail-content-left .recommendations-section {
    margin-top: 40px; /* 与上方的图片列表隔开 */
}
/* --- [!! V2.18 博客-主站 样式统一 !!] --- */

/* 1. 博客全局：背景和文字 */
.blog-page-body {
    background-color: #121212; /* 匹配主站背景 */
    color: #e0e0e0; /* 匹配主站文字 */
}

/* 2. 博客头部 (.blog-header) */
.blog-header {
    background-color: #1a1a1a; /* 匹配主站头部 */
    border-bottom: 1px solid #3a3a3a; /* 匹配主站头部 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* 深色阴影 */
}
.blog-logo {
    color: #fff; /* */
}
.blog-nav-link {
    color: #aaa; /* */
}
.blog-nav-link:hover {
    background-color: #2a2a2a; /* */
    color: #fff;
}
.blog-nav-link.active {
    background-color: #333; /* */
    color: #fff;
}
#blogPageSearchInput {
    background-color: #2a2a2a; /* 匹配主站搜索框 */
    border-color: #3a3a3a;
    color: #e0e0e0;
}
#blogPageSearchInput:focus {
    background-color: #2f2f2f;
    border-color: #007aff;
}
.blog-header-user,
.blog-header-user-controls a {
    color: #aaa; /* */
}
.blog-header-user:hover,
.blog-header-user-controls a:hover {
    color: #fff; /* */
}

/* 3. 博客侧边栏 (.blog-sidebar) */
.blog-widget {
    background-color: #1f1f1f; /* 匹配主站卡片背景 */
    border: 1px solid #3a3a3a; /* */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* */
}
.blog-widget-title {
    border-bottom-color: #3a3a3a;
}

/* 3a. 侧边栏 - 个人资料 */
.blog-profile-avatar {
    border-color: #3a3a3a; /* */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.blog-profile-name {
    color: #fff; /* */
}
.blog-profile-bio {
    color: #aaa; /* */
}
.blog-profile-links a {
    background-color: #2a2a2a;
    color: #aaa;
}
.blog-profile-links a:hover {
    background-color: #3a3a3a;
    color: #fff;
}

/* 3b. 侧边栏 - 分类 */
.blog-category-link {
    color: #ccc;
    background: none; /* 移除 V2.13 的深色背景 */
    border: none; /* 移除 V2.13 的边框 */
}
.blog-category-link:hover {
    background-color: #2a2a2a; /* */
    color: #fff;
}
.blog-category-link.active {
    background-color: #007aff; /* */
    color: #ffffff;
    border-color: #007aff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.blog-category-count {
    background-color: #3a3a3a;
    color: #aaa;
    border: 1px solid #444;
}
.blog-category-link.active .blog-category-count {
    background-color: #fff; /* */
    color: #007aff;
    border-color: transparent;
}
details summary:hover .blog-category-link {
    background-color: #2a2a2a !important; /* */
}
.blog-category-list-child {
    border-left-color: #3a3a3a; /* */
}
/* [!! 交互修复 !!] V2.12.2 的折叠样式覆盖 */
.blog-category-item-parent details summary:hover .blog-category-link.is-parent {
    background-color: #2a2a2a !important;
}

/* 3c. 侧边栏 - 统计 */
.blog-stats-list li {
    color: #aaa;
}
.blog-stats-list li span:last-child {
    color: #e0e0e0;
}

/* 4. 博客主内容区 (卡片列表) */
.blog-main-content {
    background-color: #1f1f1f; /* */
    border: 1px solid #3a3a3a; /* */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* */
}

/* 5. 博客卡片 (.blog-card) */
.blog-card {
    background-color: #1a1a1a; /* 匹配侧边栏 */
    border: 1px solid #3a3a3a; /* */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
/* [!! 交互统一 !!] 匹配主站卡片的悬停效果 */
.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4); /* */
    border-color: #555; /* */
}
.card-image-placeholder-small {
    background-color: #2a2a2a; /* */
}
.blog-card-title a {
    color: #e0e0e0; /* */
}
.blog-card-title a:hover {
    color: #007aff; /* */
}
.blog-card-summary {
    color: #aaa; /* */
}
.blog-card-meta {
    color: #888; /* */
}
.blog-card-tag {
    /* 匹配主站深色主题下的标签 */
    background: rgba(0, 122, 255, 0.15);
    color: #8ab4f8;
    border: 1px solid rgba(0, 122, 255, 0.3);
}
.blog-card-stats {
    color: #888; /* */
}

/* 6. 博客文章详情页 */
.blog-post-page .blog-main-content {
    background-color: #1f1f1f; /* */
    border-color: #3a3a3a; /* */
}
.blog-post-header {
    border-bottom-color: #3a3a3a; /* */
}
.blog-post-title {
    color: #fff; /* */
}
.blog-post-content .notion-block-paragraph,
.blog-post-content .notion-block-bulleted-list-item,
.blog-post-content .notion-block-numbered-list-item {
    color: #ccc; /* */
}
.blog-post-content .notion-block-heading-1,
.blog-post-content .notion-block-heading-2,
.blog-post-content .notion-block-heading-3 {
    color: #fff; /* */
}
.blog-post-content .notion-block-heading-2 {
    border-bottom-color: #3a3a3a; /* */
}
.blog-post-content .notion-block-quote {
    color: #aaa;
    background-color: #2a2a2a; /* */
    border-left-color: #007aff; /* */
}
.blog-post-content .notion-block-image img {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* */
    border: 1px solid #3a3a3a; /* */
}

/* 7. 目录 (TOC) */
.blog-toc-item a {
    color: #aaa; /* */
}
.blog-toc-item a:hover {
    background-color: #2a2a2a; /* */
    color: #fff;
}
.blog-toc-item.level-3 a {
    color: #888; /* */
}
/* --- [!! V2.19 美化 !!] 博客分类 Active 状态 (活力绿) --- */

.blog-category-link.active {
    background-color: #1DB954 !important; /* 示例：Spotify 绿 */
    color: #ffffff !important;
    font-weight: 600;
    border-color: #1DB954 !important;
}

.blog-category-link.active .blog-category-count {
    background-color: #ffffff !important;
    color: #1DB954 !important;
    border-color: transparent !important;
}
/* --- [!! V2.20 美化 !!] 博客分类 (Active + Hover) --- */

/* 1. 默认悬停 (Hover) 状态 (用于非激活按钮) */
/* (这统一了主站的深色悬停交互) */
.blog-category-link:hover {
    background-color: #2a2a2a !important; /* 主站悬停背景 */
    color: #fff !important;
}

/* 2. 激活 (Active) 状态 (高对比度反转) */
.blog-category-link.active {
    background-color: #e0e0e0 !important; /* 亮灰色背景 */
    color: #121212 !important; /* 深色文字 */
    font-weight: 600;
    border-color: #e0e0e0 !important;
}

/* 3. (重要) 当 "激活" 按钮被 "悬停" 时：保持激活样式不变 */
.blog-category-link.active:hover {
    background-color: #e0e0e0 !important; /* 保持亮灰色 */
    color: #121212 !important; /* 保持深色 */
}

/* 4. 计数徽章 (Active 状态) */
.blog-category-link.active .blog-category-count {
    background-color: #1f1f1f !important; /* 深色背景 */
    color: #e0e0e0 !important; /* 亮色文字 */
    border-color: #444 !important;
}

/* 5. 计数徽章 (Hover 状态) */
.blog-category-link:hover .blog-category-count {
    background-color: #444 !important;
    color: #fff !important;
    border-color: #555 !important;
}

/* 6. 计数徽章 (Active + Hover 状态) */
.blog-category-link.active:hover .blog-category-count {
    background-color: #1f1f1f !important; /* 保持 Active 状态 */
    color: #e0e0e0 !important; /* 保持 Active 状态 */
    border-color: #444 !important;
}
/* --- [!! 新增 V2.21 !!] 网站目录页 样式 --- */
/* */

/* 1. 目录页布局 */
.directory-layout-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.directory-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--surface);
    padding: 20px;
    /* 确保侧边栏始终显示 */
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.directory-main-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    height: calc(100vh - 70px); /* */
}

/* 2. 目录页搜索框 */
.directory-main-content .search-bar-container {
    /* (继承 .search-bar-container 样式) */
    margin-bottom: 40px; /* 增大间距 */
}

/* 3. 目录容器（纵向布局，每个主分类独占一个区域） */
.directory-grid-container {
    display: block; /* 改为block布局，确保主分类组纵向排列 */
    width: 100%;
}

/* 4. 网站目录卡片 (参考图二样式 - 统一卡片高度) */
.directory-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background-color: #1f1f1f;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    position: relative;
    transition: background-color 0.3s, border-color 0.3s, transform 0.2s;
    height: 100%; /* 确保卡片高度统一 */
    min-height: 140px; /* 最小高度 */
}
.directory-card:hover {
    background-color: #2a2a2a;
    border-color: #555;
    transform: translateY(-2px);
}

/* 5. 卡片 - 图标占位符 (浅蓝色背景，白色ICO文字) */
.directory-card-icon-placeholder {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background-color: #5ac8fa; /* 浅蓝色 */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.directory-card-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.directory-card-icon-text {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 6. 卡片 - 内容区域 */
.directory-card-content {
    flex-grow: 1;
    min-width: 0; /* 允许文本截断 */
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 6.1 卡片标题（在图标右侧） */
.directory-card-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 10px 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.directory-card-title a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s;
}
.directory-card:hover .directory-card-title a {
    color: #007aff;
}

/* 6.2 标签区域（在标题下方） */
.directory-card-tags {
    margin-bottom: 10px;
    flex-shrink: 0;
}

/* 6.3 描述文本（在标签下方，固定行数以保持卡片统一高度） */
.directory-card-description {
    font-size: 0.9em;
    color: #888;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 固定3行，超出截断 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 40px; /* 为收藏按钮留出空间 */
    flex-grow: 1; /* 占据剩余空间 */
}

/* 8. 卡片 - 收藏按钮 (右下角) */
.directory-card-favorite {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: rgba(26, 26, 26, 0.9);
    border: 1px solid #3a3a3a;
    color: #aaa;
    border-radius: 50%;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
    z-index: 10;
    
    /* 默认隐藏，悬停时显示 */
    opacity: 0;
    pointer-events: none;
}
.directory-card:hover .directory-card-favorite {
    opacity: 1;
    pointer-events: auto;
}
.directory-card-favorite:hover {
    background-color: #333;
    color: #fff;
    border-color: #555;
    transform: scale(1.1);
}
/* 收藏激活状态 */
.directory-card-favorite {
    color: #888888; /* 默认灰色 */
}
.directory-card-favorite[data-action="unfavorite"] {
    color: #ffd700; /* 激活时用黄色 (星星) */
    opacity: 1; /* 激活时始终显示 */
    pointer-events: auto;
    font-size: 1.2em;
}
.directory-card-favorite:hover:not([data-action="unfavorite"]) {
    color: #aaaaaa; /* 悬停时稍微亮一点的灰色 */
}
.directory-card-favorite[data-action="unfavorite"]:hover {
    color: #ffed4e; /* 更亮的黄色 */
}
/* --- [!! 新增 V2.23 !!] 网站目录 - 标签栏样式 --- */
/* (参考 image_b70f81.jpg 和 .category-nav-bar) */

.directory-tag-bar {
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    gap: 10px;
    padding: 15px;
    margin-bottom: 30px;
    background-color: #1f1f1f; /* 匹配卡片背景 */
    border: 1px solid #3a3a3a; /* */
    border-radius: 12px;
}

.directory-tag-link {
    display: block;
    padding: 6px 14px;
    color: #aaa;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
}
.directory-tag-link:hover {
    background-color: #2a2a2a;
    color: #fff;
}
.directory-tag-link.active {
    background-color: #007aff; /* 匹配主站激活颜色 */
    color: #fff;
    font-weight: 600;
}
/* SubCategory2标签导航栏（每个主分类下） */
.directory-subcategory2-nav {
    position: relative;
    margin-bottom: 25px;
    z-index: 100;
}
.directory-subcategory2-nav.sticky {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    padding: 15px 0;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 998;
    border-bottom: 1px solid #3a3a3a;
}
.directory-subcategory2-nav.sticky .directory-subcategory2-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}
.directory-subcategory2-nav-container {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.directory-subcategory2-nav-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.directory-subcategory2-nav-container.expanded {
    flex-wrap: wrap;
}
.directory-subcategory2-tag {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.9em;
    color: #aaa;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 500;
    background-color: transparent;
    border: 1px solid transparent;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
}
.directory-subcategory2-tag.hidden-tag {
    display: none;
}
.directory-subcategory2-nav-container.expanded .directory-subcategory2-tag.hidden-tag {
    display: inline-block;
}
.directory-subcategory2-tag:hover {
    color: #fff;
    background-color: #2a2a2a;
    border-color: #444;
}
.directory-subcategory2-tag.active {
    color: #007aff;
    background-color: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
    font-weight: 600;
}
.directory-subcategory2-more {
    padding: 8px 16px;
    font-size: 0.9em;
    color: #aaa;
    background-color: transparent;
    border: 1px solid #444;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 0;
    font-family: inherit;
}
.directory-subcategory2-more:hover {
    color: #fff;
    background-color: #2a2a2a;
    border-color: #555;
}
.directory-subcategory2-nav-container.expanded .directory-subcategory2-more {
    display: none;
}

/* 目录主分类组（SubCategory，如"3D创造"）- 每个占据独立区域 */
.directory-main-category-group {
    margin-bottom: 100px; /* 增大间距，确保每个主分类独占一个区域 */
    width: 100%;
    clear: both; /* 确保每个主分类换行显示 */
}
.directory-main-category-group:last-child {
    margin-bottom: 0;
}
.directory-main-category-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #e0e0e0;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #3a3a3a;
}

/* 目录卡片容器 */
.directory-group-cards-container {
    width: 100%;
}

/* 目录卡片网格 */
.directory-subcategory-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    align-items: stretch;
}

/* 目录卡片标签样式 (参考图二 - 标题下方，超过2个时折叠) */
.directory-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}
.directory-card-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8em;
    background-color: rgba(220, 53, 69, 0.15); /* 浅红色背景 */
    color: #e0e0e0;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid rgba(220, 53, 69, 0.4); /* 红色边框 */
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1.4;
}
.directory-card-tag:hover {
    background-color: rgba(220, 53, 69, 0.25);
    border-color: rgba(220, 53, 69, 0.6);
    color: #fff;
    transform: translateY(-1px);
}
/* 折叠的额外标签 */
.directory-card-tags .extra-tag {
    display: none;
}
.directory-card-tags.expanded .extra-tag {
    display: inline-block;
}
/* 标签折叠按钮（参考图二样式） */
.directory-tags-toggle {
    padding: 4px 10px;
    font-size: 0.8em;
    background-color: rgba(136, 136, 136, 0.15); /* 灰色背景，与图二一致 */
    color: #d0d0d0;
    border: 1px solid rgba(136, 136, 136, 0.3);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.4;
}
.directory-tags-toggle:hover {
    background-color: rgba(136, 136, 136, 0.25);
    border-color: rgba(136, 136, 136, 0.5);
    color: #fff;
}
/* --- [!! 新增 V2.24 !!] 书籍阅读卡片样式 --- */

/* 1. (关键) 为书籍卡片指定一个 2:3 的高宽比 */
/* 并使用一个深色背景，以防封面图有透明底 */
.book-card .book-card-cover {
    display: block;
    position: relative;
    aspect-ratio: 2 / 3;
    background-color: #181818; /* 封面未填满时的底色 */
    border-radius: 8px 8px 0 0; /* 轻微圆角 */
    overflow: hidden;
}

/* 2. (关键) 确保封面 *完整显示* (contain) 而不是 *裁剪* (cover) */
.book-card .book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* <b><-- 这将显示完整封面 --></b> */
}

/* 3. 隐藏原始的 .card-cover (它有 160px 的固定高度) */
.book-card .card-cover {
    display: none;
}

/* 4. 调整书籍占位符样式 */
.book-placeholder {
    display: flex; /* */
    align-items: center; /* */
    justify-content: center; /* */
    height: 100%; /* 占满 aspect-ratio 容器 */
    font-size: 5em;
    color: #444;
}

/* 5. 调整按钮位置以适应新封面 */
.book-card .favorite-button {
    top: 10px;
    right: 10px;
}
.book-card .card-menu-button {
    top: 50px; /* */
    right: 10px; /* */
}

/* 6. (新) 添加作者样式 */
.book-card-author {
    font-size: 0.9em;
    color: #aaa; /* */
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 7. 调整卡片 body 的间距 */
.book-card .card-body {
    padding: 15px;
    height: auto; /* 确保 body 高度自适应 */
}
.book-card .card-meta {
    margin-bottom: 10px;
}
.book-card .card-footer {
    border-top: 1px solid #2a2a2a; /* */
    padding-top: 10px;
}










/* 响应式：在小屏幕上，详情页布局变为单栏 */
@media (max-width: 1024px) {
    .blog-page-body.blog-post-page .blog-content-layout {
        grid-template-columns: 280px 1fr; /* 变为两栏 */
        gap: 20px;
    }
    .blog-toc-sidebar {
        display: none; /* 隐藏TOC */
    }
    .blog-main-content.blog-article-container {
        max-width: none;
    }
    .blog-container {
        padding: 0;
        margin-top: 20px;
    }
    .blog-sidebar {
        padding: 0 15px;
    }
    .blog-main-content {
        padding: 20px 30px;
        max-width: calc(100% - 280px);
    }
    .blog-toc-sidebar {
        padding: 0 15px;
    }
}
@media (max-width: 768px) {
    .blog-page-body.blog-post-page .blog-content-layout {
        grid-template-columns: 1fr; /* 变为单栏 */
    }
    .blog-sidebar {
        display: none; /* 彻底隐藏侧边栏 */
    }
    .blog-main-content.blog-article-container {
        padding: 20px 15px;
    }
    .blog-post-title {
        font-size: 1.8em;
    }
    .blog-post-header {
        padding: 20px 15px 15px 15px;
    }
}

/* --- [!! 新增 !!] 待办事项样式 --- */
.blog-todo-widget {
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.todo-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    max-height: 400px;
    min-height: 100px;
}

.todo-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
}

.todo-item:hover {
    background-color: #333;
    border-color: #555;
}

.todo-item.completed {
    opacity: 0.6;
}

.todo-item.overdue {
    border-color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
}

.todo-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.todo-title {
    font-size: 0.95em;
    font-weight: 500;
    color: #e0e0e0;
    margin-bottom: 4px;
    word-break: break-word;
}

.todo-title.completed {
    text-decoration: line-through;
    color: #888;
}

.todo-description {
    font-size: 0.85em;
    color: #aaa;
    margin-top: 4px;
    word-break: break-word;
}

.todo-due-date {
    font-size: 0.8em;
    color: #888;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.todo-due-date.overdue {
    color: #ff6b6b;
    font-weight: 600;
}

.todo-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.todo-actions button {
    pointer-events: auto;
}

.todo-edit,
.todo-delete {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1em;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.todo-item:hover .todo-edit,
.todo-item:hover .todo-delete {
    opacity: 1;
}

.todo-edit:hover {
    background-color: #3a3a3a;
    color: #007aff;
}

.todo-delete:hover {
    background-color: #3a3a3a;
    color: #ff6b6b;
}

.todo-add-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid #3a3a3a;
}

.todo-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.9em;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    outline: none;
}

.todo-input:focus {
    border-color: #007aff;
    background-color: #333;
}

.todo-datetime-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.85em;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    outline: none;
}

.todo-datetime-input:focus {
    border-color: #007aff;
    background-color: #333;
}

.todo-add-button {
    padding: 8px 16px;
    background-color: #007aff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.todo-add-button:hover {
    background-color: #0056b3;
}

.todo-empty,
.todo-loading,
.todo-error {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9em;
}

.todo-notification-bar {
    position: fixed;
    top: var(--header-height, 70px);
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #ff6b6b, #e05555);
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
}

.todo-notification-content {
    max-width: var(--max-width, 1200px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.todo-notification-list {
    font-size: 0.9em;
    margin: 8px 0;
    line-height: 1.6;
}

.todo-notification-close {
    align-self: flex-end;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s;
}

.todo-notification-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 博客页面的待办事项样式调整 */
.blog-page-body .blog-todo-widget {
    background-color: #1f1f1f;
    border: 1px solid #3a3a3a;
}

.blog-page-body .todo-item {
    background-color: #2a2a2a;
}

.blog-page-body .todo-input,
.blog-page-body .todo-datetime-input {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

/* 内联编辑样式 */
.todo-item.editing {
    border-color: #007aff;
    background-color: #333 !important;
}

.todo-title-view {
    font-size: 0.95em;
    font-weight: 500;
    color: inherit;
    margin-bottom: 4px;
    word-break: break-word;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.todo-title-view:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.todo-title-view.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.todo-edit-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.todo-edit-title {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.95em;
    border: 1px solid #007aff;
    border-radius: 6px;
    background-color: #1f1f1f;
    color: #e0e0e0;
    outline: none;
}

.todo-edit-title:focus {
    border-color: #0099ff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.todo-edit-description {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.85em;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background-color: #1f1f1f;
    color: #aaa;
    outline: none;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.todo-edit-description:focus {
    border-color: #007aff;
    background-color: #2a2a2a;
}

.todo-edit-due-date {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.85em;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background-color: #1f1f1f;
    color: #e0e0e0;
    outline: none;
}

.todo-edit-due-date:focus {
    border-color: #007aff;
    background-color: #2a2a2a;
}

.todo-edit-colors {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.todo-edit-colors label {
    font-size: 0.8em;
    color: #aaa;
}

.todo-edit-bg-color,
.todo-edit-text-color {
    width: 40px;
    height: 30px;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.todo-edit-bg-color::-webkit-color-swatch-wrapper,
.todo-edit-text-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.todo-edit-bg-color::-webkit-color-swatch,
.todo-edit-text-color::-webkit-color-swatch {
    border: 1px solid #555;
    border-radius: 3px;
}

.todo-color-reset {
    padding: 4px 8px;
    font-size: 0.8em;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
}

.todo-color-reset:hover {
    background-color: #444;
    color: #fff;
}

.todo-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.todo-save,
.todo-cancel {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85em;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.todo-save {
    background-color: #007aff;
    color: #fff;
}

.todo-save:hover {
    background-color: #0056b3;
}

.todo-cancel {
    background-color: #3a3a3a;
    color: #aaa;
}

.todo-cancel:hover {
    background-color: #444;
    color: #fff;
}

.todo-color-btn {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1em;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.todo-item:hover .todo-color-btn {
    opacity: 1;
}

.todo-color-btn:hover {
    background-color: #3a3a3a;
    color: #ffd700;
}

/* --- 收藏者头像显示 --- */
.card-favorited-users,
.detail-favorited-users {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.favorited-users-label {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 8px;
}

.favorited-users-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.favorited-user-item {
    cursor: pointer;
    transition: transform 0.2s;
}

.favorited-user-item:hover {
    transform: scale(1.1);
}

.favorited-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    transition: border-color 0.2s;
}

.favorited-user-avatar:hover {
    border-color: rgba(255,107,107,0.5);
}

.favorited-user-more {
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    color: #aaa;
    transition: all 0.2s;
}

.favorited-user-more:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,107,107,0.3);
    color: #fff;
}

.favorited-user-more-text {
    font-weight: 600;
}

/* --- 用户菜单弹窗 --- */
.user-menu-popup {
    position: fixed;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 12px;
    z-index: 10000;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.user-menu-item {
    width: 100%;
    padding: 10px 15px;
    background: transparent;
    border: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.95em;
    transition: background 0.2s;
    margin-bottom: 4px;
}

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

.user-menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- 好友操作按钮样式 --- */
.friend-card-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.friend-action-btn {
    padding: 6px 12px;
    font-size: 0.85em;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.friend-action-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.friend-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.friend-action-btn.chat-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

.friend-action-btn.follow-btn.following {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.5);
}

.friend-action-btn.delete-btn:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.5);
}

/* --- 统一卡片高度 --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.grid-card,
.book-card,
.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.grid-card .card-body,
.book-card .card-body,
.blog-card .blog-card-content {
    display: flex;
    flex-direction: column;
}

.grid-card .card-footer,
.book-card .card-footer,
.blog-card .blog-card-footer {
    /* margin-top: auto; 已移除，减少底部空白 */
}

/* 移除固定最小高度，让卡片高度自适应内容 */
.grid-card,
.book-card {
    /* min-height: 400px; 已移除，让卡片高度更紧凑 */
}

/* 书籍卡片特殊处理 */
.book-card .card-body {
    padding: 15px;
}

/* --- 热门标签容器样式 --- */
.hot-tags-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 子分类行 - 居中显示 */
.sub-categories-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.sub-categories-row .sub-categories-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sub-categories-row .sub-categories-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* --- 热门标签栏样式 --- */
.hot-tags-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
}

.hot-tags-label {
    font-size: 0.75em;
    font-weight: 500;
    color: #ff6b6b;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 0;
}

.hot-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.hot-tag-link {
    display: inline-block;
    padding: 5px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.75em;
    border-radius: 6px;
    background-color: var(--surface-elevated);
    border: 1px solid rgba(255,255,255,0.08);
    transition: background-color 0.3s, color 0.3s, transform 0.2s, border-color 0.3s;
    white-space: nowrap;
}

.hot-tag-link:hover {
    background-color: #3a3a3a;
    color: #fff;
    transform: translateY(-2px);
}

.hot-tag-link.active {
    background: linear-gradient(135deg, #007aff 0%, #00a3ff 100%);
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3), 0 0 8px rgba(0, 122, 255, 0.2);
    transform: translateY(-2px) scale(1.05);
}

/* 博客评论模块样式 */
.blog-comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #3a3a3a;
}

.blog-comments-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 30px;
}

.blog-comments-list {
    margin-bottom: 30px;
}

.blog-comments-empty {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 0.95em;
}

.blog-comment-item {
    background-color: #1f1f1f;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.blog-comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.blog-comment-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-comment-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.blog-comment-item-username {
    color: #fff;
    font-weight: 500;
    font-size: 0.95em;
}

.blog-comment-item-badge {
    background-color: #007aff;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 500;
}

.blog-comment-item-date {
    color: #888;
    font-size: 0.85em;
}

.blog-comment-content {
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.blog-comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.blog-comment-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 6px;
    cursor: zoom-in;
    object-fit: cover;
}

/* 评论表单 */
.blog-comment-form-container {
    background-color: #1f1f1f;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    position: relative;
}

.blog-comment-form-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
}

.blog-comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.blog-comment-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-comment-input {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
    outline: none;
}

.blog-comment-input:focus {
    border-color: #007aff;
    background-color: #2f2f2f;
}

.blog-comment-input-disabled {
    background-color: #1a1a1a;
    cursor: not-allowed;
    opacity: 0.6;
}

.blog-comment-images-preview {
    margin-top: 10px;
}

.blog-comment-images-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-comment-image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #3a3a3a;
}

.blog-comment-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-comment-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-comment-image-remove:hover {
    background-color: rgba(255, 0, 0, 0.8);
}

.blog-comment-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.blog-comment-toolbar-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.blog-comment-btn {
    padding: 8px 16px;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.blog-comment-btn:hover {
    background-color: #3a3a3a;
    border-color: #007aff;
    color: #fff;
}

.blog-comment-toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.blog-comment-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-comment-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-comment-username {
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
}

.blog-comment-user-badge {
    background-color: #007aff;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 500;
}

.blog-comment-submit-btn {
    padding: 10px 24px;
    background-color: #007aff;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.blog-comment-submit-btn:hover {
    background-color: #0056b3;
}

.blog-comment-submit-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.blog-comment-login-prompt {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 30px;
}

.blog-comment-login-prompt .blog-comment-input {
    flex: 1;
}

/* 表情选择器 */
.blog-emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 10px;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 300px;
    max-height: 300px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.blog-emoji-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #3a3a3a;
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
}

.blog-emoji-picker-close {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.blog-emoji-picker-close:hover {
    background-color: #3a3a3a;
    color: #fff;
}

.blog-emoji-picker-content {
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 250px;
}

.blog-emoji-item {
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    user-select: none;
}

.blog-emoji-item:hover {
    background-color: #3a3a3a;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .blog-comment-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .blog-comment-toolbar-right {
        justify-content: space-between;
    }
    
    .blog-comment-login-prompt {
        flex-direction: column;
    }
    
    .blog-comment-image {
        max-width: 150px;
        max-height: 150px;
    }
}

/* 博客快速定位按钮 */
.blog-scroll-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.blog-scroll-btn {
    width: 48px;
    height: 48px;
    background-color: #007aff;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    transition: all 0.3s ease;
    opacity: 0.9;
}

.blog-scroll-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
    opacity: 1;
}

.blog-scroll-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.blog-scroll-btn-top {
    /* 当页面在顶部时隐藏 */
}

.blog-scroll-btn-bottom {
    /* 当页面在底部时隐藏 */
}

@media (max-width: 768px) {
    .blog-scroll-buttons {
        right: 15px;
        bottom: 15px;
    }
    
    .blog-scroll-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* --- 消息中心页面样式（磨砂噪点效果） --- */
.message-center-container {
    max-width: 1000px;
    margin: 40px auto;
    background: rgba(58, 58, 58, 0.4);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 30px;
    position: relative;
}

.message-center-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    opacity: 0.03;
    mix-blend-mode: overlay;
    border-radius: 12px;
    z-index: 0;
}

.message-center-container > * {
    position: relative;
    z-index: 1;
}

.message-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}

.message-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #888;
    font-size: 1em;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.message-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.message-tab:hover {
    color: #fff;
}

.message-content {
    display: none;
}

.message-content.active {
    display: block;
}

.friend-request-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(58, 58, 58, 0.35);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    margin-bottom: 15px;
    position: relative;
}

.friend-request-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    opacity: 0.03;
    mix-blend-mode: overlay;
    border-radius: 12px;
    z-index: 0;
}

.friend-request-item > * {
    position: relative;
    z-index: 1;
}

.friend-request-item:hover {
    border-color: rgba(0, 217, 255, 0.3);
    background: rgba(66, 66, 66, 0.8);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.friend-request-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-request-info {
    flex: 1;
}

.friend-request-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.friend-request-info p {
    margin: 0;
    color: #888;
    font-size: 0.9em;
}

.friend-request-actions {
    display: flex;
    gap: 10px;
}

.friend-action-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s;
}

.accept-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
}

.accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.reject-btn {
    background: var(--surface);
    color: #fff;
}

.reject-btn:hover {
    background: var(--surface-elevated);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.friends-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.friend-card {
    background: rgba(58, 58, 58, 0.35);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.friend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    opacity: 0.03;
    mix-blend-mode: overlay;
    border-radius: 12px;
    z-index: 0;
}

.friend-card > * {
    position: relative;
    z-index: 1;
}

.friend-card:hover {
    border-color: rgba(0, 217, 255, 0.3);
    transform: translateY(-3px);
    background: rgba(66, 66, 66, 0.8);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.friend-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
}

.friend-card-name {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.friend-card-id {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 10px;
}

.friend-unread-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: #fff;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 0.8em;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

/* --- 聊天页面样式（磨砂噪点效果） --- */
.chat-container {
    max-width: 1200px;
    margin: 40px auto;
    display: flex;
    gap: 30px;
    height: calc(100vh - 200px);
}

.chat-main {
    flex: 1;
    background: rgba(58, 58, 58, 0.4);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    opacity: 0.03;
    mix-blend-mode: overlay;
    border-radius: 12px;
    z-index: 0;
}

.chat-main > * {
    position: relative;
    z-index: 1;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-info h3 {
    margin: 0;
    font-size: 1.2em;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message-item {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    position: relative;
    width: 100%;
}

.message-item.my-message {
    justify-content: flex-end;
    /* 使用正常行方向，这样 DOM 中先添加的气泡在左、头像在右，整体靠右对齐 */
    flex-direction: row;
}

.message-item.other-message {
    justify-content: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.message-bubble {
    max-width: 60%;
    padding: 10px 15px;
    border-radius: 12px;
    word-wrap: break-word;
}

.message-item.other-message .message-bubble {
    background: #f0f0f0;
    color: #333;
}

.message-item.my-message .message-bubble {
    background: #07c160;
    color: #fff;
    /* 确保我的气泡靠近右侧头像的左边并与屏幕右侧对齐 */
    margin-left: 8px;
    margin-right: 0;
}

/* 对方的气泡靠近头像的右侧（左对齐） */
.message-item.other-message .message-bubble {
    margin-right: 8px;
    margin-left: 0;
}

.message-time {
    font-size: 0.85em;
    color: #888;
    margin-top: 5px;
}

/* 隐藏每条消息旁的单条时间显示（改为使用居中的时间分隔条） */
.message-item .message-time {
    display: none;
}

.message-time-divider {
    text-align: center;
    color: #888;
    font-size: 0.75em;
    margin: 8px 0;
    padding: 4px 0;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 1em;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: rgba(58, 58, 58, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #e0e0e0;
    outline: none;
}

.chat-input:focus {
    border-color: var(--accent);
}

.emoji-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.send-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.4);
}

.emoji-picker {
    position: absolute;
    bottom: 60px;
    left: 20px;
    background: rgba(50, 50, 50, 0.85);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 15px;
    display: none;
    width: auto;
    min-width: 300px;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.emoji-picker.show {
    display: block;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    width: 100%;
}

.emoji-item {
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    text-align: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

