:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --text: #2d3748;
    --text-light: #718096;
    --bg: #f7fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans SC', sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.navbar { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.navbar .container { display: flex; align-items: center; height: 70px; gap: 30px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.nav-links { display: flex; gap: 30px; }
.nav-link { color: var(--text); text-decoration: none; font-weight: 500; transition: color 0.3s; }
.nav-link:hover { color: var(--primary); }
.search-box { display: flex; background: var(--bg); border-radius: 25px; overflow: hidden; }
.search-box input { border: none; padding: 10px 20px; background: transparent; outline: none; width: 180px; }
.search-box button { background: var(--gradient); border: none; padding: 10px 20px; color: white; cursor: pointer; }
.main { padding: 40px 0; min-height: calc(100vh - 140px); }
.content-wrapper { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.section-title { 
    font-size: 1.35rem; 
    font-weight: 600;
    margin: 30px 0 25px;
    display: flex; 
    align-items: center; 
    gap: 12px; 
    color: #2d3748;
    position: relative;
    padding-left: 16px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
}
.section-title i { 
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    color: var(--primary); 
    border-radius: 10px;
    font-size: 1rem;
}
/* 文章列表 - 左图右文布局 */
/* 文章列表 */
.posts-list { display: flex; flex-direction: column; gap: 20px; }
.post-card { display: flex; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all 0.3s; }
.post-card:hover { box-shadow: var(--shadow-lg); }
.post-thumb { flex-shrink: 0; width: 200px; }
.post-thumb a { display: block; height: 100%; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-thumb-empty { width: 200px; min-height: 140px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f0f4ff 0%, #e8ecf4 100%); color: #c4cad6; font-size: 2.5rem; }
.post-content { flex: 1; padding: 18px 22px; display: flex; flex-direction: column; min-width: 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.8rem; color: var(--text-light); }
.post-meta .category { background: var(--gradient); color: white; padding: 2px 10px; border-radius: 20px; font-size: 0.75rem; }
.post-title { font-size: 1.1rem; margin-bottom: 8px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-title a { color: var(--text); text-decoration: none; transition: color 0.3s; }
.post-title a:hover { color: var(--primary); }
.post-excerpt { color: var(--text-light); font-size: 0.85rem; line-height: 1.6; flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-footer { display: flex; align-items: center; gap: 15px; font-size: 0.8rem; color: var(--text-light); margin-top: 10px; }
.post-footer .author { display: flex; align-items: center; gap: 5px; }
.read-more { margin-left: auto; color: var(--primary); text-decoration: none; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.read-more:hover { gap: 8px; }
.post-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.post-card-tags .tag-link { font-size: 0.75rem; color: var(--primary); background: #f0f4ff; padding: 2px 8px; border-radius: 10px; text-decoration: none; transition: all 0.2s; }
.post-card-tags .tag-link:hover { background: var(--primary); color: #fff; }
body.dark-mode .post-card-tags .tag-link { background: #374151; color: #a5b4fc; }
body.dark-mode .post-card-tags .tag-link:hover { background: var(--primary); color: #fff; }

/* 响应式 */
@media (max-width: 600px) {
    .post-card { flex-direction: column; }
    .post-thumb { width: 100%; height: 160px; }
}

.sidebar { position: sticky; top: 90px; }
.widget { background: var(--white); border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow); margin-bottom: 30px; }
.widget-title { font-size: 1.1rem; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; padding-bottom: 15px; border-bottom: 2px solid var(--bg); }
.widget-title i { color: var(--primary); }
.category-list { list-style: none; }
.category-list li { margin-bottom: 10px; }
.category-list a { display: flex; justify-content: space-between; color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 8px; transition: all 0.3s; }
.category-list a:hover { background: var(--bg); color: var(--primary); }
.category-list span { background: var(--bg); padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; }
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.page-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--white); border-radius: 10px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: all 0.3s; }
.page-btn:hover, .page-btn.active { background: var(--gradient); color: white; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border: none; border-radius: 25px; font-size: 0.95rem; cursor: pointer; transition: all 0.3s; }
.btn-gradient { background: var(--gradient); color: white; }
.btn-gradient:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.load-more-wrap { text-align: center; margin-top: 30px; }

/* 面包屑导航 */
.post-breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 0.9rem; color: #718096; }
.post-breadcrumb a { color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.post-breadcrumb a:hover { text-decoration: underline; }
.post-breadcrumb i.fa-chevron-right { font-size: 0.7rem; color: #cbd5e0; }
.post-breadcrumb .current { color: #718096; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; }
body.dark-mode .post-breadcrumb { color: #a0aec0; }
body.dark-mode .post-breadcrumb a { color: var(--primary); }
body.dark-mode .post-breadcrumb i.fa-chevron-right { color: #4a5568; }
body.dark-mode .post-breadcrumb .current { color: #a0aec0; }

.post-detail { background: var(--white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.post-header { text-align: center; margin-bottom: 30px; }
.post-detail h1 { font-size: 2rem; margin: 20px 0; }
.author { color: var(--text-light); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; justify-content: center; }
.post-tags .tag-item { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; background: #f0f4ff; color: var(--primary); font-size: 0.85rem; border-radius: 20px; text-decoration: none; transition: all 0.2s; }
.post-tags .tag-item:hover { background: var(--primary); color: #fff; }
.post-tags .tag-item i { font-size: 0.75rem; }
body.dark-mode .post-tags .tag-item { background: #374151; color: #a5b4fc; }
body.dark-mode .post-tags .tag-item:hover { background: var(--primary); color: #fff; }
.featured-image { margin: -40px -40px 30px; border-radius: 16px 16px 0 0; overflow: hidden; }
.featured-image img { width: 100%; max-height: 450px; object-fit: cover; display: block; }
.post-body { font-size: 1.05rem; line-height: 1.9; }
.post-body p { margin-bottom: 1.5em; }
.post-body img { max-width: 100%; border-radius: var(--radius); }
.post-actions { display: flex; gap: 15px; margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border); }
.btn-like { background: #fff0f0; color: #e53e3e; }
.btn-like.liked { background: #e53e3e; color: white; }
.btn-share { background: var(--bg); color: var(--text); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty i { font-size: 4rem; margin-bottom: 20px; opacity: 0.3; }
@media (max-width: 768px) {
    .content-wrapper { grid-template-columns: 1fr; }
    .navbar .container { flex-wrap: wrap; height: auto; padding: 15px 20px; }
    .nav-links { order: 3; width: 100%; justify-content: center; margin-top: 15px; }
    .post-detail { padding: 25px; }
    .featured-image { margin: -25px -25px 20px; border-radius: 12px 12px 0 0; }
}


/* 文章内容样式 - 适配编辑器输出 */
.post-body { font-size: 1.05rem; line-height: 1.9; color: var(--text); }
.post-body p { margin-bottom: 1.5em; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 { margin: 2em 0 1em; font-weight: 700; line-height: 1.4; color: var(--text); }
.post-body h1 { font-size: 2rem; }
.post-body h2 { font-size: 1.6rem; padding-bottom: 0.5em; border-bottom: 2px solid var(--border); }
.post-body h3 { font-size: 1.3rem; }
.post-body h4 { font-size: 1.1rem; }

/* 链接 */
.post-body a { color: var(--primary); text-decoration: none; border-bottom: 1px solid transparent; transition: all 0.2s; }
.post-body a:hover { border-bottom-color: var(--primary); }

/* 图片 */
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.5em 0; box-shadow: var(--shadow); }
.post-body figure { margin: 2em 0; }
.post-body figcaption { text-align: center; color: var(--text-light); font-size: 0.9rem; margin-top: 0.5em; }

/* 列表 */
.post-body ul, .post-body ol { margin: 1.5em 0; padding-left: 2em; }
.post-body li { margin-bottom: 0.5em; }
.post-body ul li { list-style-type: disc; }
.post-body ol li { list-style-type: decimal; }
.post-body ul ul, .post-body ol ol { margin: 0.5em 0; }

/* 引用 */
.post-body blockquote { margin: 1.5em 0; padding: 1em 1.5em; background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%); border-left: 4px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--text); }
.post-body blockquote p:last-child { margin-bottom: 0; }

/* 代码 */
.post-body code { background: #f1f5f9; padding: 0.2em 0.5em; border-radius: 4px; font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.9em; color: #e53e3e; }
.post-body pre { margin: 1.5em 0; padding: 1.2em 1.5em; background: #1e293b; border-radius: var(--radius); overflow-x: auto; }
.post-body pre code { background: transparent; padding: 0; color: #e2e8f0; font-size: 0.9rem; line-height: 1.6; }

/* 表格 */
.post-body table { width: 100%; margin: 1.5em 0; border-collapse: collapse; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-body th, .post-body td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.post-body th { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; font-weight: 600; }
.post-body tr:nth-child(even) { background: #f8fafc; }
.post-body tr:hover { background: #edf2f7; }

/* 分割线 */
.post-body hr { margin: 2em 0; border: none; height: 2px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

/* 视频嵌入 */
.post-body iframe, .post-body video { max-width: 100%; margin: 1.5em 0; border-radius: var(--radius); }
.post-body .video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; margin: 1.5em 0; }
.post-body .video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: var(--radius); }

/* 标记/高亮 */
.post-body mark { background: linear-gradient(120deg, rgba(102,126,234,0.3) 0%, rgba(118,75,162,0.3) 100%); padding: 0.1em 0.3em; border-radius: 3px; }

/* 删除线/下划线 */
.post-body del { color: var(--text-light); }
.post-body u { text-decoration-color: var(--primary); }

/* 上标/下标 */
.post-body sup, .post-body sub { font-size: 0.75em; }

/* 任务列表 */
.post-body ul.task-list { list-style: none; padding-left: 0; }
.post-body ul.task-list li { display: flex; align-items: flex-start; gap: 8px; }
.post-body ul.task-list input[type="checkbox"] { margin-top: 6px; }

/* 提示框 */
.post-body .tip, .post-body .warning, .post-body .info { padding: 1em 1.2em; margin: 1.5em 0; border-radius: var(--radius); }
.post-body .tip { background: #c6f6d5; border-left: 4px solid #48bb78; }
.post-body .warning { background: #feebc8; border-left: 4px solid #ed8936; }
.post-body .info { background: #bee3f8; border-left: 4px solid #4299e1; }


/* 首页顶部小工具区域 */
.home-top-widgets { margin-bottom: 30px; }
.home-top-widgets .widget { margin-bottom: 20px; }

/* 首页底部小工具区域 */
.home-bottom-widgets { margin-top: 40px; padding: 30px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.home-bottom-widgets .widget { margin: 0; padding: 0; box-shadow: none; }
.home-bottom-widgets .widget-title { text-align: left; margin-bottom: 20px; padding-bottom: 0; border-bottom: none; }
.home-bottom-widgets .links-container { justify-content: flex-start; }
.home-bottom-widgets .link-list-item { background: #f8fafc; border: 1px solid #e2e8f0; }
.home-bottom-widgets .link-list-item:hover { background: #667eea; border-color: #667eea; color: white; }

/* ========== 页脚样式 ========== */
.footer { background: #1a202c; color: #a0aec0; }

/* 页脚小工具区域 */
.footer-widgets { background: #2d3748; padding: 40px 0; }
.footer-widgets .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.footer-widgets .widget { background: transparent; box-shadow: none; padding: 0; margin: 0; }
.footer-widgets .widget-title { color: #fff; border-bottom-color: rgba(255,255,255,0.1); font-size: 1rem; }
.footer-widgets .widget-list { list-style: none; }
.footer-widgets .widget-list li { margin-bottom: 8px; }
.footer-widgets .widget-list a { color: #a0aec0; text-decoration: none; transition: color 0.2s; }
.footer-widgets .widget-list a:hover { color: #fff; }

/* 页脚主体 */
.footer-main { padding: 50px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }

/* 品牌区域 */
.footer-brand { }
.footer-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 700; color: #fff; text-decoration: none; margin-bottom: 15px; }
.footer-logo i { color: var(--primary); }
.footer-desc { color: #718096; line-height: 1.7; margin-bottom: 20px; font-size: 0.95rem; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: #2d3748; border-radius: 8px; color: #a0aec0; text-decoration: none; transition: all 0.2s; }
.footer-social a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* 页脚导航 */
.footer-nav h4, .footer-categories h4, .footer-contact h4 { color: #fff; font-size: 1rem; margin-bottom: 20px; font-weight: 600; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #a0aec0; text-decoration: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: #fff; padding-left: 5px; }
.footer-links a i { font-size: 0.8rem; color: var(--primary); }

/* 联系信息 */
.footer-info { list-style: none; padding: 0; margin: 0; }
.footer-info li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; color: #a0aec0; font-size: 0.95rem; }
.footer-info i { color: var(--primary); margin-top: 3px; width: 16px; }

/* 页脚底部 */
.footer-bottom { padding: 20px 0; border-top: 1px solid #2d3748; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { margin: 0; font-size: 0.9rem; color: #718096; }
.footer-bottom a { color: #a0aec0; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* 页脚响应式 */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: span 1; }
    .footer-bottom .container { justify-content: center; text-align: center; }
}


/* 导航菜单样式 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu li {
    position: relative;
}
.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 15px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}
/* 子菜单 */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 8px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    z-index: 100;
}
.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-menu .sub-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s;
}
.nav-menu .sub-menu a:hover {
    background: #f7fafc;
    color: #667eea;
}
/* 三级菜单 */
.nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}
/* 有子菜单的项显示箭头 */
.nav-menu .menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    margin-left: 5px;
}
.nav-menu .sub-menu .menu-item-has-children > a::after {
    content: '\f105';
    margin-left: auto;
}


/* ========== 用户菜单样式 ========== */
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* 导航图标按钮 */
.nav-icon-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; cursor: pointer; border-radius: 50%; color: #4a5568; font-size: 1.25rem; transition: all 0.2s; text-decoration: none; }
.nav-icon-btn:hover { background: #f7fafc; color: var(--primary); }
.nav-icon-btn .nav-icon-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.nav-divider { width: 1px; height: 20px; background: #e2e8f0; margin: 0 4px; }

/* 用户图标菜单 - 悬浮下拉 */
.user-menu.icon-menu { position: relative; }
.user-menu.icon-menu:hover .user-dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }

/* 搜索下拉 */
.search-dropdown { position: relative; }
.search-panel { position: absolute; top: calc(100% + 10px); right: 0; width: 360px; background: #fff; border-radius: 16px; box-shadow: 0 10px 50px rgba(0,0,0,0.15); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.25s; z-index: 1000; overflow: hidden; }
.search-panel.show { opacity: 1; visibility: visible; transform: translateY(0); }
.search-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; }
.search-panel-header span { font-weight: 600; color: #2d3748; }
.search-panel-close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: #f7fafc; border: none; border-radius: 50%; cursor: pointer; color: #718096; transition: all 0.2s; }
.search-panel-close:hover { background: #edf2f7; color: #2d3748; }
.search-panel-form { display: flex; padding: 16px 20px; gap: 10px; }
.search-panel-form input { flex: 1; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 0.95rem; outline: none; transition: all 0.2s; }
.search-panel-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.search-panel-form button { width: 44px; height: 44px; background: var(--primary); color: #fff; border: none; border-radius: 10px; cursor: pointer; font-size: 1rem; transition: all 0.2s; }
.search-panel-form button:hover { background: #5a67d8; }
.search-panel-tags { padding: 0 20px 20px; }
.search-tags-title { font-size: 0.8rem; color: #a0aec0; margin-bottom: 10px; }
.search-tags-list { display: flex; flex-wrap: wrap; gap: 8px; }
.search-tags-list a { padding: 6px 14px; background: #f7fafc; color: #4a5568; font-size: 0.85rem; border-radius: 20px; text-decoration: none; transition: all 0.2s; }
.search-tags-list a:hover { background: var(--primary); color: #fff; }

.user-menu { position: relative; }

/* 用户下拉面板 */
.user-dropdown-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 280px; background: white; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s; z-index: 100; overflow: hidden; }
.user-menu.open .user-dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }

/* 深色模式 */
body.dark-mode .nav-icon-btn { color: #e2e8f0; }
body.dark-mode .nav-icon-btn:hover { background: #374151; color: var(--primary); }
body.dark-mode .nav-divider { background: #4a5568; }
body.dark-mode .search-panel { background: #2d3748; }
body.dark-mode .search-panel-header { border-bottom-color: #4a5568; }
body.dark-mode .search-panel-header span { color: #e2e8f0; }
body.dark-mode .search-panel-close { background: #374151; color: #a0aec0; }
body.dark-mode .search-panel-close:hover { background: #4a5568; color: #e2e8f0; }
body.dark-mode .search-panel-form input { background: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode .search-panel-form input::placeholder { color: #718096; }
body.dark-mode .search-tags-list a { background: #374151; color: #e2e8f0; }
body.dark-mode .search-tags-list a:hover { background: var(--primary); color: #fff; }

/* 用户下拉面板 */
.user-dropdown-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 280px; background: white; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s; z-index: 100; overflow: hidden; }
.user-menu.open .user-dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }

.udp-header { display: flex; align-items: center; gap: 12px; padding: 16px; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); }
.udp-avatar { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.udp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.udp-avatar span { width: 100%; height: 100%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.3rem; font-weight: 600; }
.udp-info { flex: 1; min-width: 0; }
.udp-name { font-weight: 600; color: #2d3748; font-size: 1rem; margin-bottom: 2px; }
.udp-bio { font-size: 0.8rem; color: #718096; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.udp-stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 8px; border-bottom: 1px solid #f1f5f9; }
.udp-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; }
.udp-stat i { font-size: 0.9rem; }
.udp-stat:nth-child(1) i { color: #667eea; }
.udp-stat:nth-child(2) i { color: #48bb78; }
.udp-stat:nth-child(3) i { color: #ed64a6; }
.udp-stat:nth-child(4) i { color: #ed8936; }
.udp-stat span { font-size: 0.9rem; font-weight: 600; color: #2d3748; }

.udp-menu { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 8px; }
.udp-menu a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 5px; text-decoration: none; border-radius: 10px; transition: all 0.2s; }
.udp-menu a:hover { background: #f7fafc; }
.udp-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.udp-icon.blue { background: #ebf8ff; color: #3182ce; }
.udp-icon.purple { background: #faf5ff; color: #805ad5; }
.udp-icon.green { background: #f0fff4; color: #38a169; }
.udp-icon.red { background: #fff5f5; color: #e53e3e; }
.udp-menu a span:last-child { font-size: 0.75rem; color: #4a5568; font-weight: 500; }

@media (max-width: 768px) {
    .nav-right { gap: 10px; }
    .search-box { display: none; }
    .user-name { display: none; }
    .auth-btns .btn-login { padding: 8px 12px; }
    .auth-btns .btn-register { padding: 8px 12px; }
}


/* ========== 评论可见区块样式 ========== */
.comment-visible-block { margin: 20px 0; border-radius: var(--radius); overflow: hidden; }
.comment-visible-block .cvb-header { padding: 12px 16px; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.comment-visible-block .cvb-content { padding: 16px; }

/* 已解锁状态 */
.comment-visible-block.unlocked { border: 2px solid #48bb78; background: rgba(72, 187, 120, 0.05); }
.comment-visible-block.unlocked .cvb-header { background: #48bb78; color: white; }

/* 锁定状态 */
.comment-visible-block.locked { border: 2px solid #e2e8f0; background: #f7fafc; }
.comment-visible-block.locked .cvb-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.comment-visible-block.locked .cvb-placeholder { text-align: center; padding: 30px 20px; }
.comment-visible-block.locked .cvb-placeholder i { font-size: 2.5rem; color: #cbd5e0; margin-bottom: 12px; }
.comment-visible-block.locked .cvb-placeholder p { font-size: 1rem; color: #4a5568; margin: 0 0 5px; font-weight: 500; }
.comment-visible-block.locked .cvb-placeholder span { font-size: 0.85rem; color: #a0aec0; }


/* 文章编辑按钮 */
.post-edit-btn { position: absolute; top: 20px; right: 20px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--gradient); color: white; text-decoration: none; font-size: 0.85rem; border-radius: 8px; transition: all 0.2s; z-index: 10; }
.post-edit-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102,126,234,0.3); }
.post-detail { position: relative; }


/* ========== 分享海报样式 ========== */
.share-poster-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.share-poster-modal.show { display: flex; }

.poster-container { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.poster-card { width: 340px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }

/* 海报封面 */
.poster-cover { height: 200px; background-size: cover; background-position: center; position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; }
.poster-cover::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.4) 100%); }
.poster-date { position: relative; z-index: 1; color: white; }
.poster-date .weekday { display: block; font-size: 0.9rem; opacity: 0.9; }
.poster-date .day { display: block; font-size: 1.5rem; font-weight: 700; }
.poster-site { position: relative; z-index: 1; color: white; display: flex; align-items: center; gap: 8px; justify-content: center; }
.poster-site i { font-size: 1.5rem; }
.poster-site span { font-size: 1.2rem; font-weight: 600; }

/* 海报内容 */
.poster-content { padding: 20px; }
.poster-title { font-size: 1.1rem; font-weight: 700; color: #1a202c; margin: 0 0 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; border-left: 4px solid var(--primary, #667eea); padding-left: 12px; }
.poster-meta { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--primary, #667eea); margin-bottom: 12px; }
.poster-excerpt { font-size: 0.9rem; color: #4a5568; line-height: 1.7; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 海报底部 */
.poster-footer { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; background: #f7fafc; border-top: 1px solid #e2e8f0; }
.poster-brand { display: flex; align-items: center; gap: 10px; }
.poster-brand i { font-size: 2rem; color: var(--primary, #667eea); }
.poster-brand strong { display: block; font-size: 1rem; color: #1a202c; }
.poster-brand small { display: block; font-size: 0.75rem; color: #a0aec0; }
.poster-qrcode { width: 80px; height: 80px; background: #fff; padding: 5px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.poster-qrcode img { width: 100%; height: 100%; }
.poster-qrcode canvas { width: 100% !important; height: 100% !important; }

.poster-tip { text-align: center; padding: 10px; font-size: 0.8rem; color: #a0aec0; background: #f7fafc; }

/* 海报操作按钮 */
.poster-actions { display: flex; gap: 15px; }
.poster-btn { width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer; font-size: 1.2rem; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.poster-download { background: #3b82f6; color: white; }
.poster-download:hover { background: #2563eb; transform: scale(1.1); }
.poster-close { background: #f87171; color: white; }
.poster-close:hover { background: #ef4444; transform: scale(1.1); }

@media (max-width: 400px) {
    .poster-card { width: 300px; }
    .poster-cover { height: 160px; }
}

/* ========== 悬浮按钮 ========== */
.float-buttons { position: fixed; right: 20px; bottom: 100px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.float-btn { width: 45px; height: 45px; border: none; border-radius: 50%; background: #fff; color: #4a5568; box-shadow: 0 2px 12px rgba(0,0,0,0.15); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: all 0.3s; }
.float-btn:hover { background: var(--primary); color: #fff; transform: translateY(-3px); box-shadow: 0 5px 20px rgba(102,126,234,0.4); }

.float-btn-group { position: relative; }
.float-popup { position: absolute; right: 55px; bottom: -10px; min-width: 200px; background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.12); padding: 16px; opacity: 0; visibility: hidden; transform: translateX(10px); transition: all 0.3s; }
.float-popup.show { opacity: 1; visibility: visible; transform: translateX(0); }
.float-popup::after { content: ''; position: absolute; right: -6px; bottom: 22px; border: 6px solid transparent; border-left-color: #fff; }
.float-popup-title { font-size: 0.8rem; color: #a0aec0; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 6px; }
.float-popup-title i { font-size: 0.75rem; }

.contact-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: #4a5568; text-decoration: none; border-radius: 10px; transition: all 0.2s; cursor: pointer; margin-bottom: 6px; background: #f8fafc; }
.contact-item:last-child { margin-bottom: 0; }
.contact-item:hover { background: #eef2ff; transform: translateX(3px); }
.contact-item .contact-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.contact-item .contact-icon.qq { background: linear-gradient(135deg, #12b7f5, #0d9ddb); color: #fff; }
.contact-item .contact-icon.wechat { background: linear-gradient(135deg, #07c160, #06ad56); color: #fff; }
.contact-item .contact-info { flex: 1; min-width: 0; }
.contact-item .contact-label { font-size: 0.75rem; color: #a0aec0; margin-bottom: 2px; }
.contact-item .contact-value { font-size: 0.9rem; font-weight: 500; color: #2d3748; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wechat-item { position: relative; }
.wechat-qr { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: #fff; padding: 12px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); opacity: 0; visibility: hidden; transition: all 0.3s; }
.wechat-item:hover .wechat-qr { opacity: 1; visibility: visible; }
.wechat-qr::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-left-color: #fff; }
.wechat-qr img { width: 120px; height: 120px; display: block; border-radius: 8px; }
.wechat-qr-tip { font-size: 0.75rem; color: #a0aec0; text-align: center; margin-top: 8px; }

/* ========== 深色模式 ========== */
body.dark-mode { 
    --bg: #1a202c; 
    --white: #2d3748; 
    --text: #e2e8f0; 
    --text-light: #a0aec0; 
    --border: #4a5568;
    background: #1a202c;
    color: #e2e8f0;
}

/* 导航栏 */
body.dark-mode .navbar { background: #2d3748; border-bottom-color: #4a5568; }
body.dark-mode .nav-link { color: #e2e8f0; }
body.dark-mode .nav-link:hover { color: #667eea; }
body.dark-mode .search-box input { background: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode .search-box input::placeholder { color: #718096; }
body.dark-mode .user-dropdown-panel { background: #2d3748; }
body.dark-mode .udp-header { background: linear-gradient(135deg, #374151 0%, #1f2937 100%); border-bottom-color: #4a5568; }
body.dark-mode .udp-avatar span { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
body.dark-mode .udp-name { color: #e2e8f0; }
body.dark-mode .udp-bio { color: #a0aec0; }
body.dark-mode .udp-stats { background: #1a202c; border-bottom-color: #4a5568; }
body.dark-mode .udp-stat span { color: #e2e8f0; }
body.dark-mode .udp-menu { background: #2d3748; }
body.dark-mode .udp-menu a { color: #e2e8f0; }
body.dark-mode .udp-menu a:hover { background: #374151; }
body.dark-mode .udp-menu a span:last-child { color: #a0aec0; }
body.dark-mode .udp-menu a:hover span:last-child { color: #e2e8f0; }

/* 主内容区 */
body.dark-mode .main { background: #1a202c; }
body.dark-mode .container { color: #e2e8f0; }

/* 卡片和小工具 */
body.dark-mode .card,
body.dark-mode .widget,
body.dark-mode .sidebar .widget { background: #2d3748; border-color: #4a5568; }
body.dark-mode .widget-title { color: #e2e8f0; border-bottom-color: #4a5568; }
body.dark-mode .widget-title i { color: #667eea; }

/* 小工具列表 */
body.dark-mode .widget-list a,
body.dark-mode .category-list a { color: #e2e8f0; }
body.dark-mode .widget-list a:hover,
body.dark-mode .category-list a:hover { color: #667eea; }
body.dark-mode .widget-list .count,
body.dark-mode .category-list .count { color: #718096; }

/* 搜索小工具 */
body.dark-mode .search-widget input { background: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode .search-widget input::placeholder { color: #718096; }
body.dark-mode .hot-tags span,
body.dark-mode .hot-search-tags a { background: #1a202c; color: #e2e8f0; border-color: #4a5568; }
body.dark-mode .hot-tags span:hover,
body.dark-mode .hot-search-tags a:hover { background: #4a5568; }

/* 热门文章小工具 */
body.dark-mode .hot-post-item,
body.dark-mode .popular-item { background: #1a202c; border-color: #4a5568; }
body.dark-mode .hot-post-item:hover,
body.dark-mode .popular-item:hover { background: #374151; }
body.dark-mode .hot-post-title,
body.dark-mode .popular-title { color: #e2e8f0; }
body.dark-mode .hot-post-meta,
body.dark-mode .popular-meta { color: #a0aec0; }

/* 友情链接小工具 */
body.dark-mode .friend-links a,
body.dark-mode .links-widget a { background: #1a202c; color: #e2e8f0; border-color: #4a5568; }
body.dark-mode .friend-links a:hover,
body.dark-mode .links-widget a:hover { background: #4a5568; border-color: #667eea; }

/* 文章列表 */
body.dark-mode .post-card,
body.dark-mode .article-card { background: #2d3748; border-color: #4a5568; }
body.dark-mode .post-title,
body.dark-mode .article-title { color: #e2e8f0; }
body.dark-mode .post-title:hover,
body.dark-mode .article-title:hover { color: #667eea; }
body.dark-mode .post-excerpt,
body.dark-mode .article-excerpt { color: #a0aec0; }
body.dark-mode .post-meta,
body.dark-mode .article-meta { color: #718096; }

/* 文章详情页 */
body.dark-mode .post-content,
body.dark-mode .article-content { color: #e2e8f0; }
body.dark-mode .post-content h1,
body.dark-mode .post-content h2,
body.dark-mode .post-content h3,
body.dark-mode .post-content h4 { color: #e2e8f0; }
body.dark-mode .post-content a { color: #667eea; }
body.dark-mode .post-content blockquote { background: #1a202c; border-left-color: #667eea; color: #a0aec0; }
body.dark-mode .post-content code { background: #1a202c; color: #f687b3; }
body.dark-mode .post-content pre { background: #1a202c; border-color: #4a5568; }
body.dark-mode .post-content table { border-color: #4a5568; }
body.dark-mode .post-content th { background: #1a202c; color: #e2e8f0; border-color: #4a5568; }
body.dark-mode .post-content td { border-color: #4a5568; color: #e2e8f0; }

/* 个人中心页面 */
body.dark-mode .profile-card,
body.dark-mode .profile-header,
body.dark-mode .profile-stats,
body.dark-mode .profile-menu,
body.dark-mode .profile-settings { background: #2d3748; border-color: #4a5568; }
body.dark-mode .profile-name { color: #e2e8f0; }
body.dark-mode .profile-bio { color: #a0aec0; }
body.dark-mode .profile-member-bar { background: #1a202c; }
body.dark-mode .profile-stat-value { color: #e2e8f0; }
body.dark-mode .profile-stat-label { color: #a0aec0; }
body.dark-mode .profile-menu-item { color: #e2e8f0; }
body.dark-mode .profile-menu-item:hover { background: #4a5568; }
body.dark-mode .profile-menu-icon { background: #1a202c; }
body.dark-mode .settings-title { color: #e2e8f0; }
body.dark-mode .settings-tabs .tab { color: #a0aec0; background: #1a202c; }
body.dark-mode .settings-tabs .tab.active { color: #fff; }
body.dark-mode .settings-form label { color: #e2e8f0; }
body.dark-mode .settings-form input,
body.dark-mode .settings-form textarea { background: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode .settings-form input::placeholder,
body.dark-mode .settings-form textarea::placeholder { color: #718096; }

/* 友链申请页面 */
body.dark-mode .links-page,
body.dark-mode .page-links { background: #1a202c; }
body.dark-mode .page-title { color: #e2e8f0; }
body.dark-mode .page-title i { color: #667eea; }
body.dark-mode .section-title { color: #e2e8f0; }
body.dark-mode .section-title i { background: rgba(102,126,234,0.2); color: #a5b4fc; }
body.dark-mode .link-card,
body.dark-mode .apply-card,
body.dark-mode .apply-form { background: #2d3748; border-color: #4a5568; }
body.dark-mode .apply-tips { background: #1a202c; border-color: #4a5568; }
body.dark-mode .apply-tips h4 { color: #e2e8f0; }
body.dark-mode .apply-tips li { color: #a0aec0; }
body.dark-mode .form-label { color: #e2e8f0; }
body.dark-mode .form-input,
body.dark-mode .form-textarea,
body.dark-mode .apply-form input,
body.dark-mode .apply-form textarea { background: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode .form-input::placeholder,
body.dark-mode .form-textarea::placeholder,
body.dark-mode .apply-form input::placeholder,
body.dark-mode .apply-form textarea::placeholder { color: #718096; }
body.dark-mode .link-item { background: #1a202c; color: #e2e8f0; border-color: #4a5568; }
body.dark-mode .link-item:hover { background: #374151; border-color: #667eea; }

/* 评论区 */
body.dark-mode .comments-area { border-top-color: #4a5568; }
body.dark-mode .comments-title { color: #e2e8f0; }
body.dark-mode .comment-form { background: #2d3748; }
body.dark-mode .comment-form textarea,
body.dark-mode .comment-guest-fields input { background: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode .comment-form textarea::placeholder,
body.dark-mode .comment-guest-fields input::placeholder { color: #718096; }
body.dark-mode .comment-username { color: #e2e8f0; }
body.dark-mode .comment-item { border-bottom-color: #4a5568; }
body.dark-mode .comment-author { color: #e2e8f0; }
body.dark-mode .comment-content { color: #e2e8f0; }
body.dark-mode .comment-date { color: #718096; }
body.dark-mode .comment-replies { border-left-color: #4a5568; }
body.dark-mode .no-comments { color: #718096; }
body.dark-mode .comment-login-notice { background: #2d3748; color: #e2e8f0; }

/* 页脚 */
body.dark-mode .footer { background: #2d3748; }
body.dark-mode .footer-main { background: #2d3748; }
body.dark-mode .footer-bottom { background: #1a202c; border-top-color: #4a5568; }
body.dark-mode .footer-desc { color: #a0aec0; }
body.dark-mode .footer-links a { color: #a0aec0; }
body.dark-mode .footer-links a:hover { color: #667eea; }
body.dark-mode .footer h4 { color: #e2e8f0; }
body.dark-mode .footer-info li { color: #a0aec0; }

/* 悬浮按钮 */
body.dark-mode .float-btn { background: #2d3748; color: #e2e8f0; }
body.dark-mode .float-btn:hover { background: #667eea; color: #fff; }
body.dark-mode .float-popup { background: #2d3748; }
body.dark-mode .float-popup::after { border-left-color: #2d3748; }
body.dark-mode .float-popup-title { color: #718096; border-bottom-color: #4a5568; }
body.dark-mode .contact-item { color: #e2e8f0; background: #374151; }
body.dark-mode .contact-item:hover { background: #4a5568; }
body.dark-mode .contact-item .contact-label { color: #718096; }
body.dark-mode .contact-item .contact-value { color: #e2e8f0; }
body.dark-mode .wechat-qr { background: #2d3748; }
body.dark-mode .wechat-qr::after { border-left-color: #2d3748; }
body.dark-mode .wechat-qr-tip { color: #718096; }

/* 分页 */
body.dark-mode .pagination a,
body.dark-mode .pagination span { background: #2d3748; color: #e2e8f0; border-color: #4a5568; }
body.dark-mode .pagination a:hover { background: #4a5568; }
body.dark-mode .pagination .current { background: #667eea; color: #fff; border-color: #667eea; }

/* 标签 */
body.dark-mode .tag,
body.dark-mode .category-tag { background: #1a202c; color: #e2e8f0; border-color: #4a5568; }
body.dark-mode .tag:hover,
body.dark-mode .category-tag:hover { background: #4a5568; border-color: #667eea; }

/* 按钮 */
body.dark-mode .btn-secondary { background: #4a5568; color: #e2e8f0; }
body.dark-mode .btn-secondary:hover { background: #718096; }

/* 表单通用 */
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode input[type="url"],
body.dark-mode textarea,
body.dark-mode select { background: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder { color: #718096; }

/* 首页底部小工具区 */
body.dark-mode .home-bottom-widgets { background: #2d3748; }
body.dark-mode .home-bottom-widgets .widget { background: transparent; }
body.dark-mode .home-bottom-widgets .widget-title { color: #e2e8f0; }
body.dark-mode .home-bottom-widgets .link-list-item { background: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode .home-bottom-widgets .link-list-item:hover { background: #667eea; border-color: #667eea; color: #fff; }

@media (max-width: 768px) {
    .float-buttons { right: 15px; bottom: 80px; }
    .float-btn { width: 40px; height: 40px; font-size: 0.9rem; }
}
