/**
 * 前端模板样式
 * Default Frontend Template Styles
 */

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* ===== 布局容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 头部导航 ===== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
    position: relative;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand .brand-link {
    text-decoration: none;
    color: #333;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

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

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: #3498db;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===== 搜索框基础样式 ===== */
.search-box {
    position: relative;
    display: none; /* 默认隐藏，移动端通过JS控制显示 */
}

.search-container {
    position: relative;
    width: 100%;
}

.search-form {
    width: 100%;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
}

.search-input-group {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.search-input::placeholder {
    color: #718096;
    font-weight: 400;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    color: white;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: scale(1.02);
}

.search-btn:active {
    transform: scale(0.98);
}

.search-icon {
    font-size: 16px;
}

/* ===== 主题切换 ===== */
.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
    user-select: none;
}

.theme-btn:hover {
    background: #f0f0f0;
}

/* ===== 用户菜单 ===== */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
    user-select: none;
}

.user-info:hover {
    background: #f0f0f0;
}

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

.user-avatar-default {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    display: none;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: #f8f9fa;
}

/* ===== 认证链接 ===== */
.auth-links {
    display: flex;
    gap: 1rem;
}

.auth-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.auth-link:hover {
    color: #3498db;
}

.auth-link.register {
    background: #3498db;
    color: #fff;
}

.auth-link.register:hover {
    background: #2980b9;
}

/* ===== 移动端菜单 ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    user-select: none;
}

/* ===== 搜索切换按钮 ===== */
.search-toggle {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-toggle:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.search-toggle:active {
    transform: translateY(0);
}

/* ===== 主内容区 ===== */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* ===== 英雄区域 ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-icon {
    font-size: 1.1em;
    display: inline-block;
}

.btn-text {
    display: inline-block;
    color: inherit;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: #fff;
}

.btn-block {
    width: 100%;
}

/* ===== 文章卡片 ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.post-card.compact {
    border-radius: 6px;
}

.post-content {
    padding: 1.5rem;
}

.post-card.compact .post-content {
    padding: 1.2rem;
}

.post-title {
    margin-bottom: 0.8rem;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.post-title a:hover {
    color: #3498db;
}

.post-excerpt {
    color: #666;
    margin-bottom: 0.8rem;
    line-height: 1.5;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card.compact .post-excerpt {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #999;
    flex-wrap: wrap;
}

.post-card.compact .post-meta {
    font-size: 0.8rem;
    gap: 0.8rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== 分类卡片 ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
}

.category-name a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.category-name a:hover {
    color: #3498db;
}

.category-desc {
    color: #666;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ===== 统计信息 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* ===== 页面头部 ===== */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
}

/* ===== 认证页面 ===== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: #3498db;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.auth-footer a {
    color: #3498db;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===== 个人资料页面 ===== */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.profile-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-avatar {
    text-align: center;
    margin-bottom: 2rem;
}

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

.avatar-default {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto;
}

.profile-form .form-group {
    margin-bottom: 1.5rem;
}

.profile-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.profile-form .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.profile-form .form-control:focus {
    outline: none;
    border-color: #3498db;
}

.form-help {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 2rem 0;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #333;
}

.info-value {
    color: #666;
}

/* ===== 关于页面 ===== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.about-section {
    margin-bottom: 3rem;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.content-text {
    line-height: 1.8;
    color: #666;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.mission-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.mission-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.mission-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.mission-item p {
    color: #666;
    font-size: 0.9rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.tech-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.tech-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tech-item h4 {
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.tech-item p {
    color: #666;
    font-size: 0.8rem;
}

/* ===== 联系页面 ===== */
.contact-content {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
}

.contact-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.contact-details h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-details p {
    color: #666;
    margin-bottom: 0.25rem;
}

.contact-details a {
    color: #3498db;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.social-links h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.social-grid {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.2s;
}

.social-link:hover {
    background: #e9ecef;
}

.social-icon {
    font-size: 1.5rem;
}

.contact-form-container {
    display: flex;
    align-items: flex-start;
}

.contact-form-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.contact-form-card h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.contact-form .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.contact-form .form-control:focus {
    outline: none;
    border-color: #3498db;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== 搜索页面 ===== */
.search-header {
    text-align: center;
    margin-bottom: 3rem;
}

.search-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.search-header p {
    color: #666;
    font-size: 1.1rem;
}

.search-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    gap: 1rem;
}

.search-input-group .search-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.search-input-group .search-input:focus {
    border-color: #3498db;
}

.search-input-group .search-btn {
    padding: 1rem 2rem;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.search-input-group .search-btn:hover {
    background: #2980b9;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-result-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.search-result-item:hover {
    transform: translateY(-2px);
}

.result-title {
    margin-bottom: 0.5rem;
}

.result-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
}

.result-title a:hover {
    color: #3498db;
}

.result-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #999;
    flex-wrap: wrap;
}

.result-url a {
    color: #3498db;
    text-decoration: none;
}

.result-url a:hover {
    text-decoration: underline;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-link:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
}

.page-link.current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* ===== 文章列表页样式 ===== */
.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.page-description,
.search-info {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* ===== 现代化分类筛选设计 ===== */
.posts-filters {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-section {
    margin-bottom: 0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    user-select: none;
}

.filter-header:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.filter-header h3 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-toggle {
    color: white;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.category-filters {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    margin-top: 0;
}

.category-filters.expanded {
    max-height: 500px;
    opacity: 1;
    margin-top: 16px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    color: #5a67d8;
    border-color: rgba(102, 126, 234, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.filter-btn.level-1 {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    font-size: 0.85rem;
    padding: 6px 12px;
    margin-left: 12px;
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.filter-btn.level-2 {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
    font-size: 0.8rem;
    padding: 4px 10px;
    margin-left: 24px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.filter-btn-child {
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
    margin-left: 12px;
}

.category-group {
    margin: 8px 0;
}

.category-parent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-parent:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

.category-name {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
}

.category-arrow {
    color: white;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.category-group.expanded .category-arrow {
    transform: rotate(90deg);
}

.category-children {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-left: 16px;
    opacity: 0;
}

.category-group.expanded .category-children {
    max-height: 300px;
    opacity: 1;
    margin-top: 8px;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 2rem;
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #e9ecef;
}

.post-item .post-title {
    margin-bottom: 1rem;
}

.post-item .post-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    display: block;
}

.post-item .post-title a:hover {
    color: #3498db;
}

.post-item .post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.post-item .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-item .post-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.post-item .author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-item .author-avatar-default {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #666;
}

.post-item .author-name {
    font-weight: 500;
    color: #2c3e50;
}

.post-item .post-info {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #888;
    flex-wrap: wrap;
}

.post-item .post-actions {
    text-align: right;
}

.post-item .read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #3498db;
    display: inline-block;
}

.post-item .read-more:hover {
    color: #fff;
    background: #3498db;
}

/* ===== 分页样式 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-btn,
.page-num {
    padding: 0.8rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid #ddd;
    background: #fff;
}

.page-btn:hover,
.page-num:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.page-num.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.page-dots {
    padding: 0.8rem 0.5rem;
    color: #999;
}

/* ===== 空状态样式 ===== */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ===== 提示消息 ===== */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* ===== 页脚 ===== */
.site-footer {
    background: #2c3e50;
    color: #fff;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-main {
    grid-column: span 1;
}

.footer-links-section {
    grid-column: span 1;
}

.footer-tech {
    grid-column: span 1;
}

.tech-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tech-info span {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 0.8rem;
    color: #fff;
    font-size: 1.1rem;
}

.footer-section p,
.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    line-height: 1.5;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.social-links a {
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
        position: relative;
    }
    
    .navbar .container {
        gap: 0.5rem;
    }
    
    .nav-brand .brand-text {
        font-size: 1.2rem;
        font-weight: 600;
    }
    
    .nav-actions {
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    /* 移动端搜索框被上方的新样式替代，这里注释掉原有样式 */
    /*
    .search-box {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: none;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        padding: 20px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        backdrop-filter: blur(10px);
    }
    
    .search-box.show {
        max-height: 140px;
        opacity: 1;
        visibility: visible;
    }
    */
    
    .search-container {
        position: relative;
        width: 100%;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-input-group {
        position: relative;
        display: flex;
        align-items: center;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border: 2px solid transparent;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
        transition: all 0.3s ease;
    }
    
    .search-input-group:focus-within {
        border-color: #667eea;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.06);
        background: white;
    }
    
    .search-input {
        flex: 1;
        padding: 14px 20px;
        border: none;
        background: transparent;
        font-size: 15px;
        outline: none;
        color: #2c3e50;
        font-weight: 400;
    }
    
    .search-input::placeholder {
        color: #8492a6;
        font-weight: 400;
    }
    
    .search-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        padding: 14px 18px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        position: relative;
        overflow: hidden;
    }
    
    .search-btn:hover {
        background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
        transform: scale(1.05);
    }
    
    .search-btn:active {
        transform: scale(0.98);
    }
    
    .search-icon {
        font-size: 16px;
        transition: transform 0.2s ease;
    }
    
    .search-btn:hover .search-icon {
        transform: scale(1.1);
    }
    
    .theme-toggle {
        order: 1;
    }
    
    .theme-btn {
        padding: 0.6rem;
        font-size: 1.1rem;
    }
    
    .user-menu {
        order: 2;
    }
    
    .user-info {
        padding: 0.4rem;
        gap: 0.3rem;
    }
    
    .user-name {
        display: none;
    }
    
    .user-avatar,
    .user-avatar-default {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .auth-links {
        order: 2;
        gap: 0.5rem;
    }
    
    .auth-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        border-radius: 6px;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 3;
        padding: 0.6rem;
        font-size: 1.3rem;
        border-radius: 6px;
        transition: background 0.2s;
    }
    
    .mobile-menu-toggle:hover {
        background: #f0f0f0;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 999;
    }
    
    .nav-menu.show {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0.5rem 0;
    }
    
    .nav-item {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        color: #333;
        font-size: 1rem;
        transition: all 0.2s;
    }
    
    .nav-link:hover,
    .nav-item.active .nav-link {
        background: #f8f9fa;
        color: #3498db;
        padding-left: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .search-input-group {
        flex-direction: row;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-section {
        padding: 0.8rem 0;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.85rem;
    }
    
    .footer-links li {
        margin-bottom: 0.3rem;
    }
    
    .footer-bottom {
        padding-top: 1rem;
        margin-top: 1rem;
        font-size: 0.85rem;
        gap: 0.6rem;
    }
    
    .footer-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .social-links {
        justify-content: center;
        gap: 0.6rem;
        margin-top: 0.6rem;
    }
    
    .social-links a {
        font-size: 1.1rem;
    }
    
    .site-footer {
        padding: 0.8rem 0 0.5rem;
        margin-top: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .footer-section p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }
    
    .footer-links li {
        margin-bottom: 0;
    }
    
    .footer-links a {
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .footer-bottom {
        padding-top: 0.8rem;
        gap: 0.5rem;
    }
    
    .footer-bottom .copyright p {
        font-size: 0.75rem;
        margin: 0;
    }
    
    .footer-meta {
        gap: 0.8rem;
        font-size: 0.7rem;
    }
    
    .social-links {
        justify-content: center;
        gap: 0.6rem;
        margin-top: 0.5rem;
    }
    
    /* 文章列表页移动端样式 */
    .page-header h1 {
        font-size: 2rem;
    }
    
    .posts-filters {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .category-filters {
        /* 移动端默认部分展开，显示一行分类 */
        max-height: 80px;
        opacity: 0.8;
        overflow: hidden;
        transition: all 0.4s ease;
    }
    
    .category-filters.expanded {
        max-height: 400px;
        opacity: 1;
    }
    
    .filter-btn {
        text-align: center;
        padding: 0.8rem 1rem;
    }
    
    .search-form-advanced {
        max-width: none;
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-input-advanced,
    .search-btn-advanced {
        width: 100%;
    }
    
    .posts-list {
        gap: 1.5rem;
    }
    
    .post-item {
        padding: 1.5rem;
    }
    
    .post-item .post-title a {
        font-size: 1.3rem;
    }
    
    .post-item .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .post-item .post-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-item .post-actions {
        text-align: left;
    }
    
    .pagination {
        margin-top: 2rem;
        gap: 0.3rem;
    }
    
    .page-btn,
    .page-num {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .navbar {
        padding: 0.6rem 0;
    }
    
    .nav-brand .brand-text {
        font-size: 1.1rem;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .nav-actions {
        gap: 0.3rem;
    }
    
    .theme-btn,
    .mobile-menu-toggle {
        padding: 0.5rem;
        font-size: 1rem;
    }
    
    .user-avatar,
    .user-avatar-default {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .auth-link {
        padding: 0.35rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .search-input {
        padding: 0.7rem 1rem;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .nav-link {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .nav-link:hover,
    .nav-item.active .nav-link {
        padding-left: 1.8rem;
    }
    
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mission-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    /* 超小屏幕下的紧凑footer */
    .site-footer {
        padding: 0.6rem 0 0.4rem;
        margin-top: 1rem;
    }
    
    .footer-content {
        gap: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .footer-section p {
        font-size: 0.75rem;
        line-height: 1.2;
        margin-bottom: 0.3rem;
    }
    
    .footer-links {
        gap: 0.3rem 0.8rem;
    }
    
    .footer-links a {
        font-size: 0.75rem;
    }
    
    .footer-bottom {
        padding-top: 0.6rem;
        gap: 0.4rem;
    }
    
    .footer-bottom .copyright p {
        font-size: 0.7rem;
    }
    
    .footer-meta {
        gap: 0.6rem;
        font-size: 0.65rem;
    }
    
    .social-links {
        gap: 0.4rem;
        margin-top: 0.3rem;
    }
    
    .social-links a {
        font-size: 1rem;
    }
}

/* ===== 暗色主题 ===== */
body.dark-theme {
    background: #1a1a1a;
    color: #e0e0e0;
}

.dark-theme .site-header {
    background: #2d2d2d;
    border-bottom-color: #404040;
}

.dark-theme .nav-brand h1 {
    color: #e0e0e0;
}

.dark-theme .nav-link {
    color: #bdc3c7;
}

.dark-theme .nav-link:hover,
.dark-theme .nav-item.active .nav-link {
    color: #3498db;
}

.dark-theme .search-input {
    background: #404040;
    border-color: #555;
    color: #e0e0e0;
}

.dark-theme .search-input:focus {
    border-color: #3498db;
}

.dark-theme .user-dropdown {
    background: #2d2d2d;
    border-color: #404040;
}

.dark-theme .user-dropdown a {
    color: #e0e0e0;
}

.dark-theme .user-dropdown a:hover {
    background: #404040;
}

.dark-theme .post-card,
.dark-theme .category-card,
.dark-theme .stat-item,
.dark-theme .auth-card,
.dark-theme .profile-card,
.dark-theme .info-card,
.dark-theme .about-card,
.dark-theme .contact-form-card,
.dark-theme .search-result-item {
    background: #2d2d2d;
    color: #e0e0e0;
}

.dark-theme .post-title a,
.dark-theme .category-name a {
    color: #e0e0e0;
}

.dark-theme .post-title a:hover,
.dark-theme .category-name a:hover {
    color: #3498db;
}

.dark-theme .form-control {
    background: #404040;
    border-color: #555;
    color: #e0e0e0;
}

.dark-theme .form-control:focus {
    border-color: #3498db;
}

.dark-theme .site-footer {
    background: #1a1a1a;
    border-top: 1px solid #404040;
}

.dark-theme .footer-section h3,
.dark-theme .footer-section h4 {
    color: #e0e0e0;
}

.dark-theme .footer-section p,
.dark-theme .footer-section a {
    color: #bdc3c7;
}

.dark-theme .footer-section a:hover {
    color: #3498db;
}

.dark-theme .footer-bottom {
    border-top-color: #404040;
    color: #95a5a6;
}

/* ===== 暗色主题下的首页特殊样式 ===== */
.dark-theme .hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.dark-theme .nav-brand .brand-text {
    color: #e0e0e0;
}

.dark-theme .section-header h2 {
    color: #e0e0e0;
}

.dark-theme .more-link {
    color: #3498db;
}

.dark-theme .empty-state {
    color: #bdc3c7;
}

.dark-theme .user-info:hover {
    background: #404040;
}

.dark-theme .theme-btn:hover {
    background: #404040;
}

/* ===== 额外的暗色主题样式 ===== */
.dark-theme .btn-primary {
    background: #3498db;
    color: #fff;
}

.dark-theme .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.dark-theme .btn-outline {
    border-color: #3498db;
    color: #3498db;
}

.dark-theme .btn-outline:hover {
    background: #3498db;
    color: #fff;
}

.dark-theme .post-footer {
    background: #404040;
    border-top-color: #555;
}

/* ===== 文章列表页暗色主题 ===== */
.dark-theme .page-header h1 {
    color: #e0e0e0;
}

.dark-theme .page-description,
.dark-theme .search-info {
    color: #bdc3c7;
}

/* 暗色主题适配 */
.dark-theme .posts-filters {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .filter-header {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.dark-theme .filter-header:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dark-theme .filter-row {
    background: rgba(255, 255, 255, 0.05);
}

.dark-theme .filter-btn {
    background: rgba(102, 126, 234, 0.15);
    color: #a5b4fc;
    border-color: rgba(102, 126, 234, 0.25);
}

.dark-theme .filter-btn:hover {
    background: rgba(102, 126, 234, 0.25);
    color: #c7d2fe;
    border-color: rgba(102, 126, 234, 0.4);
}

.dark-theme .filter-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-color: rgba(255, 107, 107, 0.5);
}

.dark-theme .filter-btn.level-1 {
    background: rgba(102, 126, 234, 0.1);
    color: #a5b4fc;
    border-color: rgba(102, 126, 234, 0.2);
}

.dark-theme .filter-btn.level-2 {
    background: rgba(102, 126, 234, 0.08);
    color: #a5b4fc;
    border-color: rgba(102, 126, 234, 0.15);
}

/* 移动端分类筛选优化 */
@media (max-width: 768px) {
    .posts-filters {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .filter-header {
        padding: 12px 16px;
    }
    
    .filter-header h3 {
        font-size: 1rem;
    }
    
    .filter-row {
        padding: 12px;
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .filter-btn.level-1 {
        margin-left: 8px;
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .filter-btn.level-2 {
        margin-left: 16px;
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .category-parent {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

.dark-theme .filter-section h3 {
    color: #e0e0e0;
}

/* 暗色主题分类按钮样式已在上方定义，此处移除重复定义 */

.dark-theme .filter-btn-child {
    background: #2d2d2d;
    border-color: #404040;
}

.dark-theme .search-input-advanced {
    background: #404040;
    border-color: #555;
    color: #e0e0e0;
}

.dark-theme .search-input-advanced:focus {
    border-color: #3498db;
}

.dark-theme .search-input-advanced::placeholder {
    color: #bdc3c7;
}

.dark-theme .post-item {
    background: #2d2d2d;
    border-color: #404040;
}

.dark-theme .post-item:hover {
    border-color: #555;
}

.dark-theme .post-item .post-title a {
    color: #e0e0e0;
}

.dark-theme .post-item .post-title a:hover {
    color: #3498db;
}

.dark-theme .post-item .post-excerpt {
    color: #bdc3c7;
}

.dark-theme .post-item .author-name {
    color: #e0e0e0;
}

.dark-theme .post-item .author-avatar-default {
    background: #555;
    color: #bdc3c7;
}

.dark-theme .post-item .post-info {
    color: #95a5a6;
}

.dark-theme .post-item .read-more {
    color: #3498db;
    border-color: #3498db;
}

.dark-theme .post-item .read-more:hover {
    background: #3498db;
    color: #fff;
}

.dark-theme .page-btn,
.dark-theme .page-num {
    background: #2d2d2d;
    color: #bdc3c7;
    border-color: #555;
}

.dark-theme .page-btn:hover,
.dark-theme .page-num:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.dark-theme .page-num.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.dark-theme .page-dots {
    color: #7f8c8d;
}

.dark-theme .empty-state {
    color: #bdc3c7;
}

.dark-theme .empty-state h3 {
    color: #e0e0e0;
}

.dark-theme .empty-state p {
    color: #95a5a6;
}

.dark-theme .stats-grid .stat-item {
    background: #2d2d2d;
    color: #e0e0e0;
}

.dark-theme .stats-grid .stat-number {
    color: #3498db;
}

.dark-theme .stats-grid .stat-label {
    color: #bdc3c7;
}

/* ===== 暗色主题下的移动端菜单 =====*/
@media (max-width: 768px) {
    .dark-theme .nav-menu {
        background: #2d2d2d;
        border-top: 1px solid #404040;
    }
    
    .dark-theme .nav-item {
        border-bottom-color: #404040;
    }
    
    .dark-theme .nav-link {
        color: #e0e0e0;
    }
    
    .dark-theme .nav-link:hover,
    .dark-theme .nav-item.active .nav-link {
        background: #404040;
        color: #3498db;
    }
    
    .dark-theme .search-box {
        background: #2d2d2d;
        border-top-color: #404040;
    }
    
    .dark-theme .search-input {
        background: #404040;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .dark-theme .mobile-menu-toggle:hover {
        background: #404040;
    }
    
    .dark-theme .theme-btn:hover {
        background: #404040;
    }
    
    .dark-theme .user-info:hover {
        background: #404040;
    }
}

/* ===== 移动端搜索按钮优化 =====*/
.search-toggle {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    order: 0;
}

.search-toggle:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.search-toggle:active {
    transform: translateY(0);
}

/* 桌面端隐藏搜索切换按钮 */
@media (min-width: 769px) {
    .search-toggle {
        display: none !important;
    }
}

/* 移动端显示搜索切换按钮 */
@media (max-width: 768px) {
    .search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 0;
    }
    
    /* 移动端搜索框默认隐藏 */
    .search-box {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        z-index: 999;
        transform: translateY(-100%);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        border-bottom: 2px solid #667eea;
        border-radius: 0 0 16px 16px;
    }
    
    .search-box.show {
        display: block;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        max-height: 200px;
    }
}

/* 暗色主题下的移动端搜索框 */
.dark-theme .search-box {
    background: rgba(45, 55, 72, 0.98);
    border-color: #4a5568;
    backdrop-filter: blur(20px);
}

.dark-theme .search-input-group {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-color: #4a5568;
}

.dark-theme .search-input-group:focus-within {
    border-color: #667eea;
    background: #2d3748;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-theme .search-input {
    color: #e2e8f0;
}

.dark-theme .search-input::placeholder {
    color: #a0aec0;
}

.dark-theme .search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dark-theme .search-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 暗色主题下的搜索切换按钮 */
.dark-theme .search-toggle {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    box-shadow: 0 4px 12px rgba(74, 85, 104, 0.4);
}

.dark-theme .search-toggle:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}



/* ===== 桌面端搜索框现代化设计 =====*/
@media (min-width: 769px) {
    .search-toggle {
        display: none !important;
    }
    
    .search-box {
        position: relative !important;
        display: block !important; /* 桌面端始终显示 */
        order: unset !important;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        max-height: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
        backdrop-filter: none !important;
        transform: none !important;
    }
    
    .search-container {
        position: relative;
        width: auto;
    }
    
    .search-form {
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }
    
    .search-input-group {
        background: rgba(248, 249, 250, 0.95);
        border: 2px solid transparent;
        border-radius: 25px;
        backdrop-filter: blur(10px);
        width: 280px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    }
    
    .search-input-group:focus-within {
        width: 320px;
        background: rgba(255, 255, 255, 0.98);
        border-color: #667eea;
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
        transform: translateY(-1px);
    }
    
    .search-input {
        padding: 12px 18px;
        font-size: 14px;
        border-radius: 25px 0 0 25px;
        background: transparent;
        border: none;
        outline: none;
        color: #2c3e50;
        font-weight: 500;
    }
    
    .search-input::placeholder {
        color: #718096;
        font-weight: 400;
    }
    
    .search-btn {
        padding: 12px 16px;
        border-radius: 0 25px 25px 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .search-btn:hover {
        background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
        transform: scale(1.05);
    }
    
    /* 桌面端暗色主题 */
    .dark-theme .search-input-group {
        background: rgba(45, 55, 72, 0.95);
        border-color: transparent;
    }
    
    .dark-theme .search-input-group:focus-within {
        background: rgba(45, 55, 72, 0.98);
        border-color: #667eea;
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    }
    
    .dark-theme .search-input {
        color: #e2e8f0;
    }
    
    .dark-theme .search-input::placeholder {
        color: #a0aec0;
    }
}

/* ===== 动画效果 ===== */
.post-card,
.category-card,
.stat-item {
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.post-card.fade-in-up,
.category-card.fade-in-up,
.stat-item.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card:hover,
.category-card:hover,
.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ===== 表单错误状态 ===== */
.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-group input.error:focus,
.form-group textarea.error:focus,
.form-group select.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ===== 消息提示样式 ===== */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-size: 14px;
    max-width: 300px;
    word-wrap: break-word;
}

.message-success {
    background: #28a745;
    color: white;
}

.message-error {
    background: #dc3545;
    color: white;
}

.message-warning {
    background: #ffc107;
    color: #212529;
}

.message-info {
    background: #17a2b8;
    color: white;
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: #2980b9;
    transform: scale(1.1);
}

/* ===== 暗色主题下的动画和消息样式 ===== */
.dark-theme .message {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.dark-theme .back-to-top {
    background: #3498db;
}

.dark-theme .back-to-top:hover {
    background: #2980b9;
}

/* ===== 文章详情页面 ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.92rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.breadcrumb a {
    color: #5f6b7a;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #3498db;
}

.breadcrumb .separator {
    color: #c0c4cc;
    margin: 0 0.2rem;
}

.breadcrumb .current {
    color: #2c3e50;
    font-weight: 600;
}

.post-detail {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 3rem;
}

.post-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #eee;
}

.post-header .post-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

/* 文章元信息 - 紧凑布局 */
.post-meta-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* 文章元信息 - 内联布局（超紧凑） */
.post-meta-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: 8px;
    padding: 6px 0;
    line-height: 1.2;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.meta-right {
    display: flex;
    align-items: center;
}

.author-avatar-tiny {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    font-size: 0.6rem;
    color: #666;
    flex-shrink: 0;
}

.meta-separator {
    color: #ccc;
    font-weight: 300;
}

.post-meta-inline .author-name {
    font-weight: 500;
    color: #333;
    font-size: 0.8rem;
}

.post-meta-inline .post-date {
    color: #999;
    font-size: 0.75rem;
    white-space: nowrap;
}

.post-category-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

/* 暗色主题适配 */
.dark-theme .post-meta-inline {
    color: #bdc3c7;
}

.dark-theme .author-avatar-tiny {
    background: #404040;
    color: #bdc3c7;
}

.dark-theme .post-meta-inline .author-name {
    color: #e0e0e0;
}

.dark-theme .post-meta-inline .post-date {
    color: #95a5a6;
}

.dark-theme .post-category-tag {
    background: #2d4159;
    color: #64b5f6;
}

.dark-theme .meta-separator {
    color: #666;
}

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

.author-avatar-mini {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    font-size: 0.7rem;
    color: #666;
    flex-shrink: 0;
}

.post-details {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-meta-compact .post-date,
.post-meta-compact .post-category {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.post-meta-compact .post-category {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.post-meta-compact .author-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* 暗色主题适配 */
.dark-theme .post-meta-compact {
    border-color: #404040;
    color: #bdc3c7;
}

.dark-theme .author-avatar-mini {
    background: #404040;
    color: #bdc3c7;
}

.dark-theme .post-meta-compact .author-name {
    color: #e0e0e0;
}

.dark-theme .post-meta-compact .post-date,
.dark-theme .post-meta-compact .post-category {
    color: #95a5a6;
}

.dark-theme .post-meta-compact .post-category {
    background: #404040;
}

.meta-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.meta-icon {
    font-size: 1rem;
}

.meta-value {
    color: #333;
    font-weight: 500;
}

.category-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    transition: background 0.2s;
}

.category-link:hover {
    background: #2980b9;
    color: white;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label {
    color: #666;
    font-weight: 500;
}

.meta-value {
    color: #333;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 0.5rem;
    object-fit: cover;
}

.category-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    transition: background 0.2s;
}

.category-link:hover {
    background: #2980b9;
    color: white;
}

.tag {
    display: inline-block;
    background: #95a5a6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.post-content {
    padding: 2rem;
}

.post-excerpt {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    border-left: 4px solid #3498db;
}

.post-excerpt p {
    margin: 0;
    color: #666;
    font-style: italic;
}

.post-body {
    line-height: 1.9;
    color: #2b2b2b;
    font-size: 1.06rem;
    word-break: break-word;
}

.post-body p {
    margin: 0 0 1.2rem 0;
}

.post-body h1,.post-body h2,.post-body h3,.post-body h4,.post-body h5{margin:1.2rem 0 .6rem;color:#2c3e50;line-height:1.3}
.post-body h1{font-size:2rem}
.post-body h2{font-size:1.6rem}
.post-body h3{font-size:1.3rem}

.post-body ul,.post-body ol{margin:0 0 1.2rem 1.2rem}
.post-body li{margin:.3rem 0}

.post-body blockquote{margin:1rem 0;padding:.8rem 1rem;border-left:4px solid #3498db;background:#f7fbff;color:#34495e}

.post-body pre{background:#1e1e1e;color:#f8f8f2;padding:1rem;border-radius:6px;overflow:auto;margin:1rem 0}
.post-body code{background:#f4f4f4;padding:.2rem .4rem;border-radius:4px}
.post-body pre code{background:transparent;padding:0}

.post-body img{max-width:100%;height:auto;border-radius:6px;display:block;margin:1rem auto}
.post-body table{width:100%;border-collapse:collapse;margin:1.2rem 0}
.post-body th,.post-body td{border:1px solid #eee;padding:.6rem;text-align:left}
.post-body thead th{background:#f8f9fa}

.post-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.post-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.action-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .post-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-group {
        justify-content: center;
        width: 100%;
    }
    
    .action-group .btn {
        flex: 1;
        min-width: 0;
    }
    
    .post-footer {
        padding: 1rem;
    }
}

.related-posts {
    margin-top: 3rem;
}

.related-posts .section-header {
    margin-bottom: 2rem;
}

.related-posts .posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .post-header .post-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .post-header {
        padding: 1rem;
    }
    
    .post-meta {
        margin-bottom: 1rem;
        padding: 0.8rem 0;
    }
    
    .meta-compact {
        gap: 1rem;
    }
    
    .meta-item {
        font-size: 0.85rem;
        gap: 0.3rem;
    }
    
    .category-link {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }
    
    .post-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-group {
        justify-content: center;
        width: 100%;
    }
    
    .action-group .btn {
        flex: 1;
        min-width: 0;
    }
    
    .post-footer {
        padding: 1rem;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-bottom: 1rem;
        padding: 0.5rem 0;
        font-size: 0.85rem;
    }
}

/* ===== 暗色主题下的文章详情样式 ===== */
.dark-theme .post-detail {
    background: #2d2d2d;
    color: #e0e0e0;
}

.dark-theme .post-header {
    border-bottom-color: #555;
}

.dark-theme .post-header .post-title {
    color: #e0e0e0;
}

.dark-theme .post-meta {
    border-bottom-color: #555;
}

.dark-theme .meta-item {
    color: #bdc3c7;
}

.dark-theme .meta-value {
    color: #e0e0e0;
}

.dark-theme .category-link {
    background: #3498db;
    color: white;
}

.dark-theme .category-link:hover {
    background: #2980b9;
}

.dark-theme .post-excerpt {
    background: #404040;
    color: #bdc3c7;
}

.dark-theme .post-body {
    color: #e0e0e0;
}

.dark-theme .post-footer {
    background: #404040;
    border-top-color: #555;
}

.dark-theme .breadcrumb { background:#2d2d2d; border-color:#3a3a3a; }
.dark-theme .breadcrumb a { color:#bdc3c7; }
.dark-theme .breadcrumb a:hover { color:#3498db; }
.dark-theme .breadcrumb .current { color:#e0e0e0; }
.dark-theme .breadcrumb .separator { color:#6d6d6d; }

/* ===== 分类页面 ===== */
.category-header {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.category-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.category-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.category-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.category-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.category-stats .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
}

.category-stats .stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.category-filters {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.posts-section {
    margin-bottom: 3rem;
}

/* ===== 暗色主题下的分类页面样式 ===== */
.dark-theme .category-header {
    background: #2d2d2d;
    color: #e0e0e0;
}

.dark-theme .category-title {
    color: #e0e0e0;
}

.dark-theme .category-description {
    color: #bdc3c7;
}

.dark-theme .category-stats .stat-number {
    color: #3498db;
}

.dark-theme .category-stats .stat-label {
    color: #bdc3c7;
}

.dark-theme .category-filters {
    background: #2d2d2d;
    color: #e0e0e0;
}

/* ===== 分类列表页面 ===== */
.categories-section {
    margin-bottom: 3rem;
}

.category-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.category-type,
.category-count {
    font-size: 0.9rem;
    color: #666;
}

.category-count a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.category-count a:hover {
    color: #2980b9;
}

.category-actions {
    margin-top: 1rem;
}

/* ===== 暗色主题下的分类列表样式 ===== */
.dark-theme .category-type,
.dark-theme .category-count {
    color: #bdc3c7;
}

.dark-theme .category-count a {
    color: #3498db;
}

.dark-theme .category-count a:hover {
    color: #2980b9;
}

/* ===== 404错误页面 ===== */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 0;
}

.error-content {
    max-width: 600px;
}

.error-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 8rem;
    color: #e74c3c;
    margin: 0;
    line-height: 1;
    font-weight: bold;
}

.error-subtitle {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0 0 1rem 0;
}

.error-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.error-help {
    text-align: left;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.error-help h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.error-help ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-help li {
    margin-bottom: 0.5rem;
}

.error-help a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.error-help a:hover {
    color: #2980b9;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .error-title {
        font-size: 6rem;
    }
    
    .error-subtitle {
        font-size: 1.5rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .error-help {
        padding: 1.5rem;
    }
}

/* ===== 暗色主题下的404页面样式 ===== */
.dark-theme .error-subtitle {
    color: #e0e0e0;
}

.dark-theme .error-description {
    color: #bdc3c7;
}

.dark-theme .error-help {
    background: #404040;
    color: #e0e0e0;
}

.dark-theme .error-help h3 {
    color: #e0e0e0;
}

.dark-theme .error-help a {
    color: #3498db;
}

.dark-theme .error-help a:hover {
    color: #2980b9;
}

/* ===== 文章列表紧凑布局移动端优化 ===== */
@media (max-width: 768px) {
    .post-meta-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-top: 8px;
    }
    
    .post-details {
        gap: 8px;
        width: 100%;
    }
    
    .post-meta-compact .post-date,
    .post-meta-compact .post-category {
        font-size: 0.75rem;
    }
    
    .author-avatar-mini {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .author-info {
        gap: 5px;
    }
    
    .author-name {
        font-size: 0.8rem;
    }
    
    /* 内联布局移动端优化 */
    .post-meta-inline {
        font-size: 0.75rem;
        margin-top: 6px;
        padding: 4px 0;
    }
    
    .meta-left {
        gap: 4px;
    }
    
    .author-avatar-tiny {
        width: 14px;
        height: 14px;
        font-size: 0.55rem;
    }
    
    .post-meta-inline .author-name {
        font-size: 0.75rem;
    }
    
    .post-meta-inline .post-date {
        font-size: 0.7rem;
    }
    
    .post-category-tag {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
}