/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 */
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --primary-bg: rgba(52, 152, 219, 0.1);
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --success-hover: #27ae60;
    --warning-color: #f39c12;
    --warning-hover: #e67e22;
    --error-color: #e74c3c;
    --error-hover: #c0392b;
    
    /* 背景色 */
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --hover-bg: #f1f3f4;
    --dark-bg: #1a1a1a;
    --darker-bg: #050505;
    
    /* 文字颜色 */
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --text-light: #95a5a6;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    
    /* 边框颜色 */
    --border-color: #e9ecef;
    --border-light: #f1f3f4;
    --border-dark: #333333;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* 代码样式 */
    --code-bg: #f8f9fa;
    --code-color: #e83e8c;
    
    /* 间距 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* 字体大小 */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    
    /* 过渡动画 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* 文章页面专用变量 */
    --reading-progress-height: 4px;
    --toc-width: 320px;
    --comment-avatar-size: 50px;
    --action-btn-radius: 25px;
    --markdown-btn-size: 0.8rem;
    --input-bg: #ffffff;
    
    /* 移动端断点 */
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
    --large-desktop: 1200px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    /* 防止移动端页面溢出 */
    word-wrap: break-word;
    word-break: break-word;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* 移动端基础样式 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.5;
        /* 移动端溢出处理 */
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* 防止所有元素溢出 */
    * {
        box-sizing: border-box;
        max-width: 100%;
    }
    
    /* 处理长文本 */
    p, h1, h2, h3, h4, h5, h6, span, div {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* 处理表格溢出 */
    table {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        display: block;
    }
    
    /* 处理图片溢出 */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* 处理代码块溢出 */
    pre, code {
        white-space: pre-wrap;
        word-wrap: break-word;
        max-width: 100%;
        overflow-x: auto;
    }
}

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

/* 响应式容器 */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 960px) {
    .container {
        max-width: 720px;
    }
}

@media (max-width: 720px) {
    .container {
        max-width: 540px;
    }
}

@media (max-width: 540px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

/* 侧边导航栏样式 */
.sidebar-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-right: 1px solid var(--border-color);
    z-index: 10000;
    transition: all var(--transition-base);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.sidebar-nav.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.sidebar-header:hover::before {
    transform: translateX(100%);
}

.sidebar-header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header .logo:hover {
    color: var(--accent-color);
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-base);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

/* 导航菜单 */
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition-base);
    border-radius: 0;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    transition: width var(--transition-base);
    z-index: -1;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    color: white;
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.nav-link.active::before {
    width: 100%;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* 用户区域 */
.user-section {
    padding: 0 1.5rem;
    width: 100%;
}

/* 确保侧边栏菜单始终为列表布局 */
.sidebar-menu .nav-menu,
.sidebar-menu .user-menu,
.sidebar-menu .guest-menu {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.sidebar-menu .nav-menu li,
.sidebar-menu .user-menu li,
.sidebar-menu .guest-menu li {
    width: 100% !important;
    margin: 0 !important;
}

/* 消息中心样式 */
.messages-container {
    display: flex;
    min-height: calc(100vh - 80px);
    background: var(--bg-color);
}

.messages-sidebar {
    width: 280px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
}

.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.messages-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.25rem;
}

.compose-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.messages-nav {
    margin-bottom: 1.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: all var(--transition-base);
}

.nav-item:hover {
    background: var(--hover-bg);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
}

.nav-count {
    background: var(--border-color);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.messages-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--radius-md);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.messages-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.messages-list {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.list-header h3 {
    margin: 0;
    color: var(--text-color);
}

.message-count {
    color: var(--text-muted);
    font-weight: normal;
}

.bulk-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.message-items {
    padding: 0;
}

.message-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.message-item:hover {
    background: var(--hover-bg);
}

.message-item.unread {
    background: rgba(0, 123, 255, 0.05);
}

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

.message-checkbox {
    margin-right: 1rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
    flex-shrink: 0;
}

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

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

.message-subject {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.message-subject a {
    color: var(--text-color);
    text-decoration: none;
}

.message-subject a:hover {
    color: var(--primary-color);
}

.unread-indicator {
    color: var(--primary-color);
    margin-left: 0.5rem;
}

.message-preview {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.message-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* 撰写消息表单 */
.compose-form {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.compose-form h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
}

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

.message-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.receiver-search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.search-result-item:hover {
    background: var(--hover-bg);
}

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

.selected-receiver {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.btn-remove-receiver {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.25rem;
}

.content-counter {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 消息详情 */
.message-detail {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.message-header {
    margin-bottom: 2rem;
}

.message-header h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.message-body {
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 2rem;
    white-space: pre-wrap;
}

.message-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .messages-container {
        flex-direction: column;
    }
    
    .messages-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .messages-stats {
        grid-template-columns: 1fr;
    }
    
    .list-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .bulk-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .message-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .message-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* 响应式侧边栏列表布局 */
@media (max-width: 768px) {
    .sidebar-menu .nav-menu,
    .sidebar-menu .user-menu,
    .sidebar-menu .guest-menu {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.25rem !important;
    }
    
    .sidebar-menu .nav-menu li,
    .sidebar-menu .user-menu li,
    .sidebar-menu .guest-menu li {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .sidebar-menu .nav-link,
    .sidebar-menu .user-link,
    .sidebar-menu .guest-link {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .sidebar-menu .nav-menu,
    .sidebar-menu .user-menu,
    .sidebar-menu .guest-menu {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.2rem !important;
    }
    
    .sidebar-menu .nav-link,
    .sidebar-menu .user-link,
    .sidebar-menu .guest-link {
        width: 100% !important;
        padding: 0.6rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
}

.user-info, .guest-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.user-avatar, .guest-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all var(--transition-base);
}

.user-avatar:hover, .guest-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.user-details, .guest-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.username, .guest-text {
    font-weight: 600;
    color: var(--text-color);
}

.user-status, .guest-status {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.user-menu, .guest-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-link, .guest-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
    width: 100%;
    box-sizing: border-box;
}

.user-link:hover, .guest-link:hover {
    color: var(--primary-color);
    background: var(--hover-bg);
}

.user-link i, .guest-link i {
    width: 20px;
    text-align: center;
}

.logout-link {
    color: var(--danger-color);
}

.logout-link:hover {
    color: var(--danger-color);
    background: rgba(220, 53, 69, 0.1);
}

.register-link {
    color: var(--success-color);
}

.register-link:hover {
    color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
}

.admin-link {
    color: var(--warning-color);
}

.admin-link:hover {
    color: var(--warning-color);
    background: rgba(255, 193, 7, 0.1);
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.theme-switcher {
    display: flex;
    justify-content: center;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.theme-toggle:hover::before {
    left: 100%;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

/* 主内容区域 */
.main-wrapper {
    margin-left: 0;
    transition: margin-left var(--transition-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部栏 */
.top-bar {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.sidebar-toggle {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.sidebar-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sidebar-toggle:hover::before {
    left: 100%;
}

.sidebar-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.page-title h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.top-bar-actions {
    display: flex;
    gap: 0.5rem;
}

.search-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.search-toggle:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

/* 遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

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

/* 桌面端侧边栏常开 */
@media (min-width: 1024px) {
    .sidebar-nav {
        left: 0;
        position: fixed;
        transition: width var(--transition-base);
        resize: horizontal;
        overflow: hidden;
        min-width: 200px;
        max-width: 400px;
    }
    
    /* 拖拽调整大小的手柄 */
    .sidebar-resize-handle {
        position: absolute;
        right: 0;
        top: 0;
        width: 4px;
        height: 100%;
        background: transparent;
        cursor: col-resize;
        z-index: 10001;
        transition: background var(--transition-base);
    }
    
    .sidebar-resize-handle:hover,
    .sidebar-resize-handle.dragging {
        background: var(--primary-color);
    }
    
    .sidebar-resize-handle::before {
        content: '';
        position: absolute;
        right: 1px;
        top: 50%;
        transform: translateY(-50%);
        width: 2px;
        height: 40px;
        background: var(--border-color);
        border-radius: 1px;
    }
    
    .sidebar-resize-handle:hover::before,
    .sidebar-resize-handle.dragging::before {
        background: var(--primary-color);
    }
    
    .sidebar-nav.collapsed {
        width: 70px;
    }
    
    .sidebar-nav.collapsed .sidebar-resize-handle {
        display: none;
    }
    
    .sidebar-nav.collapsed .logo span,
    .sidebar-nav.collapsed .nav-link span,
    .sidebar-nav.collapsed .user-link span,
    .sidebar-nav.collapsed .guest-link span,
    .sidebar-nav.collapsed .theme-toggle span,
    .sidebar-nav.collapsed .username,
    .sidebar-nav.collapsed .user-status,
    .sidebar-nav.collapsed .guest-text,
    .sidebar-nav.collapsed .guest-status {
        display: none;
    }
    
    .sidebar-nav.collapsed .sidebar-header {
        padding: 1rem 0.5rem;
        justify-content: center;
    }
    
    .sidebar-nav.collapsed .sidebar-close {
        display: none;
    }
    
    .sidebar-nav.collapsed .nav-link {
        padding: 1rem;
        justify-content: center;
    }
    
    .sidebar-nav.collapsed .nav-link i {
        width: auto;
        font-size: 1.2rem;
    }
    
    .sidebar-nav.collapsed .user-section {
        padding: 0 0.5rem;
    }
    
    .sidebar-nav.collapsed .user-info,
    .sidebar-nav.collapsed .guest-info {
        justify-content: center;
        padding: 0.5rem 0;
    }
    
    .sidebar-nav.collapsed .user-avatar,
    .sidebar-nav.collapsed .guest-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .sidebar-nav.collapsed .user-details,
    .sidebar-nav.collapsed .guest-details {
        display: none;
    }
    
    .sidebar-nav.collapsed .user-link,
    .sidebar-nav.collapsed .guest-link {
        padding: 0.75rem;
        justify-content: center;
    }
    
    .sidebar-nav.collapsed .user-link i,
    .sidebar-nav.collapsed .guest-link i {
        width: auto;
        font-size: 1.1rem;
    }
    
    .sidebar-nav.collapsed .sidebar-footer {
        padding: 1rem 0.5rem;
    }
    
    .sidebar-nav.collapsed .theme-toggle {
        padding: 0.75rem;
        justify-content: center;
    }
    
    .sidebar-nav.collapsed .theme-toggle span {
        display: none;
    }
    
    .main-wrapper {
        margin-left: 280px;
        transition: margin-left var(--transition-base);
    }
    
    .main-wrapper.sidebar-collapsed {
        margin-left: 70px;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar-close {
        display: block;
    }
    
    .sidebar-overlay {
        display: none;
    }
    
    /* 悬停时显示完整内容 */
    .sidebar-nav.collapsed:hover {
        width: 280px;
    }
    
    .sidebar-nav.collapsed:hover .logo span,
    .sidebar-nav.collapsed:hover .nav-link span,
    .sidebar-nav.collapsed:hover .user-link span,
    .sidebar-nav.collapsed:hover .guest-link span,
    .sidebar-nav.collapsed:hover .theme-toggle span,
    .sidebar-nav.collapsed:hover .username,
    .sidebar-nav.collapsed:hover .user-status,
    .sidebar-nav.collapsed:hover .guest-text,
    .sidebar-nav.collapsed:hover .guest-status {
        display: block;
    }
    
    .sidebar-nav.collapsed:hover .sidebar-header {
        padding: 1.5rem;
        justify-content: space-between;
    }
    
    .sidebar-nav.collapsed:hover .sidebar-close {
        display: block;
    }
    
    .sidebar-nav.collapsed:hover .nav-link {
        padding: 1rem 1.5rem;
        justify-content: flex-start;
    }
    
    .sidebar-nav.collapsed:hover .nav-link i {
        width: 20px;
        font-size: 1rem;
    }
    
    .sidebar-nav.collapsed:hover .user-section {
        padding: 0 1.5rem;
    }
    
    .sidebar-nav.collapsed:hover .user-info,
    .sidebar-nav.collapsed:hover .guest-info {
        justify-content: flex-start;
        padding: 1rem 0;
    }
    
    .sidebar-nav.collapsed:hover .user-avatar,
    .sidebar-nav.collapsed:hover .guest-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .sidebar-nav.collapsed:hover .user-details,
    .sidebar-nav.collapsed:hover .guest-details {
        display: flex;
    }
    
    .sidebar-nav.collapsed:hover .user-link,
    .sidebar-nav.collapsed:hover .guest-link {
        padding: 0.75rem 0;
        justify-content: flex-start;
    }
    
    .sidebar-nav.collapsed:hover .user-link i,
    .sidebar-nav.collapsed:hover .guest-link i {
        width: 20px;
        font-size: 1rem;
    }
    
    .sidebar-nav.collapsed:hover .sidebar-footer {
        padding: 1rem 1.5rem;
    }
    
    .sidebar-nav.collapsed:hover .theme-toggle {
        padding: 0.75rem 1rem;
        justify-content: flex-start;
    }
    
    .sidebar-nav.collapsed:hover .theme-toggle span {
        display: inline;
    }
}

/* 移动端适配 */
@media (max-width: 1023px) {
    .sidebar-nav {
        left: -280px;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar-close {
        display: block;
    }
}

/* 头部样式（保留用于兼容性） */
.header {
    display: none;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    color: var(--accent-color);
    transition: color var(--transition-base);
}

.logo i {
    font-size: 2rem;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-weight: 500;
}

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

.nav-menu a.active {
    background: var(--primary-color);
    color: white;
}

/* 用户菜单 */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.user-menu a:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.user-menu .btn {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
}

.user-menu .btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.mobile-menu-toggle:hover {
    background: var(--hover-bg);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .header-content {
        padding: 0.75rem 0;
        position: relative;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.8rem;
    }
    
    .nav {
        position: relative;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
        padding: 1rem 0;
        z-index: 9999;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        /* 确保菜单在最上层 */
        position: fixed;
        top: 80px; /* 调整到header下方 */
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        display: flex !important;
        /* 确保展开的菜单有正确的样式 */
        background: var(--card-bg);
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-color);
        border-top: none;
    }
    
    .nav-menu a {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border-light);
        display: block;
    }
    
    .nav-menu a:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        z-index: 10000;
        position: relative;
    }
    
    .user-menu {
        gap: 0.25rem;
        flex-direction: column;
        width: 100%;
    }
    
    .user-menu .btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .header-content {
        padding: 0.5rem 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .logo {
        font-size: 1.3rem;
        max-width: 60%;
        flex-shrink: 1;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .user-menu {
        gap: 0.25rem;
        flex-direction: column;
        width: 100%;
    }
    
    .user-menu .btn {
        padding: 0.3rem 0.8rem;
        width: 100%;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    /* 超小屏幕特殊处理 */
    .mobile-menu-toggle {
        padding: 0.3rem;
        font-size: 1.2rem;
    }
    
    /* 确保内容不溢出 */
    .container {
        padding: 0 10px;
    }
}

/* 主要内容区域 */
.main-content {
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 200px);
    flex: 1;
}

/* 英雄区域 */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    perspective: 1000px;
}

.grid-item {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    animation: float 3s ease-in-out infinite;
    opacity: 0.8;
}

.grid-item:nth-child(2) {
    animation-delay: 0.5s;
}

.grid-item:nth-child(3) {
    animation-delay: 1s;
}

.grid-item:nth-child(4) {
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-20px) rotateY(180deg); }
}

/* 内容布局 */
.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.main-content-area {
    min-height: 500px;
}

/* 文章卡片 */
.posts-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.posts-grid {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.post-card:hover::before {
    transform: scaleX(1);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

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

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--accent-color);
}

/* 侧边栏 */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-form {
    margin-bottom: 1rem;
}

.search-input-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
}

.search-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
}

.search-input-group button {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-input-group button:hover {
    background: var(--secondary-color);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.category-list a:hover {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
}

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

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* 认证页面 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.auth-header p {
    color: var(--text-secondary);
}

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

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.auth-form input,
.auth-form textarea,
.auth-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 文章详情页 */
.post-detail {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.post-detail .post-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.post-detail .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-detail .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-tags {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-link {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.share-link:hover {
    color: var(--primary-color);
}

/* 评论区 */
.comments-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
}

.comment-form-container {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    resize: vertical;
}

.comments-list {
    margin-top: 2rem;
}

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

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

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.comment-content {
    line-height: 1.6;
}

/* 管理后台 */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
}

.admin-header {
    text-align: center;
    margin-bottom: 3rem;
}

.admin-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

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

.nav-item {
    padding: 1rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item:hover,
.nav-item.active {
    background: var(--primary-color);
    color: var(--dark-bg);
    border-color: var(--primary-color);
}

.dashboard {
    display: grid;
    gap: 2rem;
}

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

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-info p {
    color: var(--text-secondary);
}

.recent-activity {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
}

.activity-list {
    margin-top: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-item i {
    color: var(--primary-color);
    width: 20px;
}

.activity-item small {
    color: var(--text-secondary);
    margin-left: auto;
}

/* 表格样式 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--dark-bg);
    color: var(--primary-color);
    font-weight: 600;
}

.admin-table tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-published {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success-color);
}

.status-draft {
    background: rgba(255, 165, 2, 0.2);
    color: var(--warning-color);
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.role-admin {
    background: rgba(255, 107, 53, 0.2);
    color: var(--accent-color);
}

.role-user {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
}

/* 表单样式 */
.new-post-form {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
}

.new-post-form h3 {
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* 提示框 */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.alert-info {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* 底部样式 */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--dark-bg);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    /* 移除这个规则，因为它会隐藏整个导航区域 */
    /* .nav {
        display: none;
    } */
    
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar {
        position: static;
    }
    
    .admin-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .tech-grid {
        justify-self: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .post-card {
        padding: 1.5rem;
    }
    
    .post-detail {
        padding: 1.5rem;
    }
    
    .admin-container {
        padding: 1rem 0;
    }
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    margin-top: 3rem;
}

/* 无内容状态 */
.no-posts,
.no-comments {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
}

.no-posts i,
.no-comments i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

/* 登录评论提示 */
.login-to-comment {
    text-align: center;
    padding: 2rem;
    background: var(--dark-bg);
    border-radius: 10px;
    margin-bottom: 2rem;
}

.login-to-comment a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 关于页面 */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.about-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.about-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.about-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.features-list i {
    color: var(--success-color);
}

.contact-info {
    display: grid;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.contact-item i {
    color: var(--primary-color);
    width: 20px;
}

.join-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* 错误页面 */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--error-color);
}

.error-page p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* 返回首页按钮 */
.back-to-home {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
}

/* 加载状态样式 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 搜索结果显示 */
.search-results {
    margin-bottom: 2rem;
}

.search-results .section-title {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

/* 标签筛选结果 */
.tag-filter-results .section-title {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

/* 搜索页面样式 */
.search-form-container {
    text-align: center;
    margin: 3rem 0;
}

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

.search-input-group-large {
    display: flex;
    gap: 0;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-input-group-large input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1.1rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.search-input-group-large button {
    padding: 1rem 2rem;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-input-group-large button:hover {
    background: var(--accent-color);
}

.search-tips {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-tips i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.search-summary {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.search-summary p {
    margin: 0;
    color: var(--text-secondary);
}

.search-summary strong {
    color: var(--primary-color);
}

.search-suggestions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.search-suggestions h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
}

.search-suggestions li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.search-suggestions li:before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

/* 分类页面样式 */
.category-selection {
    text-align: center;
    margin: 3rem 0;
}

.category-selection h3 {
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.category-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.category-summary {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.category-summary p {
    margin: 0;
    color: var(--text-secondary);
}

.category-summary strong {
    color: var(--primary-color);
}

.category-suggestions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.category-suggestions h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-suggestions ul {
    list-style: none;
    padding: 0;
}

.category-suggestions li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.category-suggestions li:before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

.category-list .active {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
    border-radius: 5px;
}

.popular-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popular-category a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.popular-category a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.popular-category a:hover .category-count {
    color: rgba(255, 255, 255, 0.8);
}

/* 个人资料页面样式 */
.profile-section {
    max-width: 100%;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar i {
    font-size: 5rem;
    color: var(--primary-color);
}

.profile-details h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.8rem;
}

.profile-role, .profile-joined {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-role i {
    color: var(--accent-color);
}

.profile-joined i {
    color: var(--primary-color);
}

.profile-forms {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.profile-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.profile-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.profile-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.user-activity {
    display: grid;
    gap: 2rem;
}

.activity-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
}

.activity-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.no-activity {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.activity-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.activity-content h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.activity-content h4 a:hover {
    color: var(--accent-color);
}

.comment-text {
    color: var(--text-secondary);
    margin: 0.5rem 0;
    line-height: 1.6;
}

.activity-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

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

.activity-meta i {
    color: var(--primary-color);
}

.activity-post a {
    color: var(--accent-color);
    text-decoration: none;
}

.activity-post a:hover {
    text-decoration: underline;
}

.account-info p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.security-tips ul {
    list-style: none;
    padding: 0;
}

.security-tips li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.security-tips li:before {
    content: '✓';
    color: var(--success-color);
    position: absolute;
    left: 0;
}

/* 文章页面美化样式 */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
}

/* 文章目录导航 */
.table-of-contents {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: all 0.3s ease;
}

.table-of-contents.collapsed {
    right: -260px;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    border-radius: 15px 15px 0 0;
}

.toc-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.toc-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.toc-toggle:hover {
    background: var(--hover-bg);
}

.toc-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

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

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    display: block;
    padding: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.toc-list a:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.toc-list a.active {
    background: var(--primary-color);
    color: white;
}

/* 文章面包屑导航 */
.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.post-breadcrumb i {
    font-size: 0.8rem;
}

/* 文章元信息美化 */
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.meta-left, .meta-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-color);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.reading-time, .word-count {
    background: var(--primary-color) !important;
    color: white !important;
}

/* 文章摘要 */
.post-excerpt {
    background: linear-gradient(135deg, var(--card-bg), var(--bg-color));
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
}

.post-excerpt p {
    margin: 0;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.6;
}

/* 文章操作按钮 */
.post-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.action-btn.liked {
    border-color: #e74c3c;
    background: #e74c3c;
    color: white;
}

/* 评论区美化 */
.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comments-filter {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.comment-form-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.comment-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comment-tips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.char-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.markdown-help {
    display: flex;
    gap: 0.5rem;
}

.markdown-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.markdown-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.preview-btn {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* 评论预览 */
.comment-preview {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.preview-content {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* 登录提示美化 */
.login-prompt {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--card-bg), var(--bg-color));
    border-radius: 15px;
    border: 2px dashed var(--border-color);
}

.login-prompt i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.login-prompt p {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.login-prompt small {
    color: var(--text-muted);
}

/* 评论列表美化 */
.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.comment-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.comment-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
}

.comment-action {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.comment-action:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 相关文章推荐 */
.related-posts-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.related-post-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-post-title a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1.4;
}

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

.related-post-meta {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.related-post-excerpt {
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 1rem;
}

/* 侧边栏美化 */
.author-widget .author-info {
    text-align: center;
    padding: 1.5rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2.5rem;
}

.author-bio {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.author-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.author-stats .stat-item {
    text-align: center;
    padding: var(--spacing-sm);
    background: var(--hover-bg);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.author-stats .stat-item:hover {
    background: var(--card-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.author-stats .stat-number {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--primary-color);
}

.author-stats .stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

.follow-btn {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-base);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.follow-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.follow-btn:disabled {
    border-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.follow-btn:disabled:hover {
    background: transparent;
    color: var(--text-muted);
    transform: none;
    box-shadow: none;
}

.follow-btn.following {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.follow-btn.following:hover {
    background: var(--error-color);
    border-color: var(--error-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.author-self-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: var(--hover-bg);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.author-self-indicator i {
    color: var(--success-color);
}

/* 热门文章美化 */
.popular-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.popular-post {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.popular-post:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.post-thumbnail {
    width: 60px;
    height: 60px;
    background: var(--bg-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.post-info h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

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

/* 阅读统计美化 */
.reading-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.reading-stats .stat-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.reading-stats .stat-info {
    flex: 1;
}

.reading-stats .stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

.reading-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    display: flex;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .table-of-contents {
        display: none;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .meta-left, .meta-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .post-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .comments-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item {
    animation: slideInUp 0.5s ease forwards;
}

.comment-item:nth-child(1) { animation-delay: 0.1s; }
.comment-item:nth-child(2) { animation-delay: 0.2s; }
.comment-item:nth-child(3) { animation-delay: 0.3s; }
.comment-item:nth-child(4) { animation-delay: 0.4s; }
.comment-item:nth-child(5) { animation-delay: 0.5s; }

/* 首页美化样式 */
.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    overflow: hidden;
    margin-bottom: 3rem;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

.hero-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 30s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title .highlight {
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-text {
    display: inline-block;
    border-right: 3px solid white;
    animation: blink 1s infinite;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-stats .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.floating-elements {
    position: relative;
    width: 400px;
    height: 400px;
}

.floating-icon {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.floating-icon:nth-child(2) { top: 20%; right: 0; animation-delay: 1s; }
.floating-icon:nth-child(3) { bottom: 20%; left: 0; animation-delay: 2s; }
.floating-icon:nth-child(4) { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 3s; }
.floating-icon:nth-child(5) { top: 50%; left: 20%; transform: translateY(-50%); animation-delay: 4s; }

/* 特色分类 */
.featured-categories {
    padding: 4rem 0;
    background: var(--bg-color);
    margin-bottom: 3rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

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

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.category-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.category-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: block;
}

.category-link {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-base);
    opacity: 0;
}

.category-card:hover .category-link {
    opacity: 1;
}

.category-link:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

/* 文章区域美化 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.view-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.view-btn {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 文章卡片美化 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.post-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    overflow: hidden;
}

.post-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.post-card:hover .post-overlay {
    opacity: 1;
}

.post-actions {
    display: flex;
    gap: 1rem;
}

.post-actions .action-btn {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-base);
}

.post-actions .action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.post-content {
    padding: 1.5rem;
}

.post-header {
    margin-bottom: 1rem;
}

.post-category {
    margin-bottom: 0.5rem;
}

.post-category a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.post-title {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
}

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

.post-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.post-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

.read-more:hover {
    color: var(--accent-color);
}

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

/* 技术趋势 */
.tech-trends {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.trends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.trend-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
}

.trend-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.trend-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.trend-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.trend-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.trend-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trend-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 0.3rem;
}

.trend-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 侧边栏美化 */
.search-widget .search-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.search-input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.search-input-group button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.search-suggestions {
    margin-top: 1rem;
}

.suggestion-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all var(--transition-base);
}

.suggestion-tag:hover {
    background: var(--primary-color);
    color: white;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-base);
}

.category-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.category-count {
    font-size: 0.85rem;
    opacity: 0.7;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.subscribe-widget .widget-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.subscribe-form .input-group {
    display: flex;
    margin-bottom: 0.5rem;
}

.subscribe-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-right: none;
}

.subscribe-form button {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
}

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

.authors-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.author-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--radius-md);
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.author-info h4 {
    margin: 0 0 0.3rem 0;
    color: var(--text-color);
    font-size: 1rem;
}

.author-bio {
    margin: 0 0 0.3rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.author-posts {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 500;
}

/* 加载更多区域 */
.load-more-section {
    text-align: center;
    padding: 2rem 0;
}

.load-more-info {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading-spinner {
    margin-left: 0.5rem;
}

/* 无文章状态 */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
}

.no-posts-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.no-posts h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.no-posts p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* 动画效果 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes blink {
    0%, 50% { border-color: white; }
    51%, 100% { border-color: transparent; }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        margin-bottom: 2rem;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .trends-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-elements {
        width: 300px;
        height: 300px;
    }
    
    .floating-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        padding: 1.5rem;
    }
}

/* 列表视图样式 */
.posts-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.posts-grid.list-view .post-card {
    display: flex;
    height: auto;
}

.posts-grid.list-view .post-image {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.posts-grid.list-view .post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.posts-grid.list-view .post-footer {
    margin-top: auto;
}

/* 响应式列表视图 */
@media (max-width: 768px) {
    .posts-grid.list-view .post-card {
        flex-direction: column;
    }
    
    .posts-grid.list-view .post-image {
        width: 100%;
        height: 200px;
    }
}

/* 按钮样式增强 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.9rem;
    line-height: 1;
}

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

.btn-primary:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* 文本居中工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* 间距工具类 */
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.pt-1 { padding-top: var(--spacing-sm); }
.pt-2 { padding-top: var(--spacing-md); }
.pt-3 { padding-top: var(--spacing-lg); }
.pt-4 { padding-top: var(--spacing-xl); }

.pb-1 { padding-bottom: var(--spacing-sm); }
.pb-2 { padding-bottom: var(--spacing-md); }
.pb-3 { padding-bottom: var(--spacing-lg); }
.pb-4 { padding-bottom: var(--spacing-xl); }

/* 写文章页面样式 */
.write-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-xl);
}

.write-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-light);
}

.write-header .section-title {
    color: var(--text-color);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
}

.write-description {
    color: var(--text-muted);
    font-size: var(--font-size-lg);
    max-width: 600px;
    margin: 0 auto;
}

.write-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.write-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.write-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.write-form label {
    font-weight: 600;
    color: var(--text-color);
    font-size: var(--font-size-base);
}

.write-form input,
.write-form select,
.write-form textarea {
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color var(--transition-base);
    background: var(--card-bg);
    color: var(--text-color);
}

.write-form input:focus,
.write-form select:focus,
.write-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.write-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

.write-form textarea#content {
    min-height: 400px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-help {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
}

.form-actions .btn {
    min-width: 120px;
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.alert-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: var(--spacing-md);
}

.alert-link:hover {
    text-decoration: underline;
}

/* 写作提示和HTML标签样式 */
.writing-tips ul,
.html-tags {
    list-style: none;
    padding: 0;
}

.writing-tips li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
}

.writing-tips li:last-child {
    border-bottom: none;
}

.html-tags p {
    margin: var(--spacing-sm) 0;
    font-family: 'Courier New', monospace;
    font-size: var(--font-size-sm);
}

.html-tags code {
    background: var(--hover-bg);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--accent-color);
}

.author-info p {
    margin: var(--spacing-sm) 0;
    color: var(--text-muted);
}

.author-info strong {
    color: var(--text-color);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .write-section {
        padding: var(--spacing-lg);
        margin: var(--spacing-md);
    }
    
    .write-form-container {
        max-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .write-form textarea#content {
        min-height: 300px;
    }
}

/* 导航栏写文章链接样式 */
.write-link {
    background: var(--success-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.write-link:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* 编辑器类型选择器 */
.editor-type-selector {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--hover-bg);
    border-radius: var(--radius-md);
}

.editor-type-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    flex: 1;
    justify-content: center;
}

.editor-type-label:hover {
    background: var(--card-bg);
}

.editor-type-label input[type="radio"] {
    display: none;
}

.editor-type-label input[type="radio"]:checked + .editor-type-text {
    color: var(--primary-color);
    font-weight: 600;
}

.editor-type-text {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-muted);
    transition: all var(--transition-base);
}

/* 编辑器容器 */
.editor-container {
    display: none;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.editor-container.active {
    display: block;
}

/* 富文本编辑器样式 */
.rich-toolbar {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: var(--hover-bg);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
}

.toolbar-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 var(--spacing-sm);
}

.rich-editor {
    min-height: 400px;
    padding: var(--spacing-md);
    border: none;
    outline: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    background: var(--card-bg);
    color: var(--text-color);
    overflow-y: auto;
}

.rich-editor[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    font-style: italic;
    pointer-events: none;
}

.rich-editor:focus {
    outline: none;
}

/* Markdown编辑器样式 */
.markdown-toolbar {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: var(--hover-bg);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.markdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
}

.markdown-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.markdown-btn[data-action="preview"] {
    width: auto;
    padding: 0 var(--spacing-sm);
    gap: var(--spacing-xs);
}

.markdown-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 var(--spacing-sm);
}

#markdownEditor {
    width: 100%;
    min-height: 400px;
    border: none;
    outline: none;
    resize: vertical;
    padding: var(--spacing-md);
    font-family: 'Courier New', monospace;
    font-size: var(--font-size-base);
    line-height: 1.6;
    background: var(--card-bg);
    color: var(--text-color);
}

#markdownEditor:focus {
    outline: none;
}

/* 编辑器帮助文本 */
.editor-help {
    display: none;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.editor-help.active {
    display: block;
}

/* 编辑器语法提示 */
.editor-syntax {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.syntax-section h4 {
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.markdown-syntax {
    font-size: var(--font-size-sm);
}

.markdown-syntax p {
    margin: var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.markdown-syntax code {
    background: var(--hover-bg);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background: var(--hover-bg);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
}

.modal-close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-base);
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-body {
    padding: var(--spacing-lg);
    max-height: 60vh;
    overflow-y: auto;
}

#markdownPreviewContent {
    line-height: 1.6;
}

#markdownPreviewContent h1,
#markdownPreviewContent h2,
#markdownPreviewContent h3,
#markdownPreviewContent h4,
#markdownPreviewContent h5,
#markdownPreviewContent h6 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

#markdownPreviewContent h1 {
    font-size: var(--font-size-2xl);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
}

#markdownPreviewContent h2 {
    font-size: var(--font-size-xl);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-xs);
}

#markdownPreviewContent p {
    margin-bottom: var(--spacing-md);
}

#markdownPreviewContent code {
    background: var(--hover-bg);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
}

#markdownPreviewContent pre {
    background: var(--hover-bg);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--spacing-md) 0;
}

#markdownPreviewContent pre code {
    background: none;
    padding: 0;
    color: inherit;
}

#markdownPreviewContent blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: var(--spacing-md);
    margin: var(--spacing-md) 0;
    color: var(--text-muted);
    font-style: italic;
}

#markdownPreviewContent ul,
#markdownPreviewContent ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-xl);
}

#markdownPreviewContent li {
    margin-bottom: var(--spacing-xs);
}

#markdownPreviewContent img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
}

#markdownPreviewContent table {
    border-collapse: collapse;
    width: 100%;
    margin: var(--spacing-md) 0;
}

#markdownPreviewContent th,
#markdownPreviewContent td {
    border: 1px solid var(--border-color);
    padding: var(--spacing-sm);
    text-align: left;
}

#markdownPreviewContent th {
    background: var(--hover-bg);
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .editor-type-selector {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .rich-toolbar,
    .markdown-toolbar {
        gap: var(--spacing-xs);
        padding: var(--spacing-xs);
    }
    
    .toolbar-btn,
    .markdown-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .markdown-btn[data-action="preview"] {
        width: auto;
        padding: 0 var(--spacing-xs);
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header,
    .modal-body {
        padding: var(--spacing-md);
    }
    
    .rich-editor,
    #markdownEditor {
        min-height: 300px;
    }
}

/* 文章详情页样式 */
.post-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
    color: var(--text-color);
    text-decoration: none;
}

.action-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn.liked {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.action-btn.bookmarked {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}

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

.view-count {
    background: var(--hover-bg);
    border-color: var(--border-color);
    cursor: default;
}

.view-count:hover {
    transform: none;
    box-shadow: none;
}

/* 阅读进度条 */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--reading-progress-height);
    background: var(--border-light);
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
}

/* 文章目录 */
.table-of-contents {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 320px;
    max-height: 80vh;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.table-of-contents.collapsed {
    transform: translateY(-50%) translateX(calc(100% - 50px));
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    background: var(--hover-bg);
    flex-shrink: 0;
}

.toc-header h4 {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-color);
    font-weight: 600;
}

.toc-stats {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    background: var(--card-bg);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.toc-count {
    font-weight: 600;
    color: var(--primary-color);
}

.toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-toggle:hover {
    background: var(--card-bg);
    color: var(--text-color);
    transform: scale(1.1);
}

/* 搜索区域 */
.toc-search {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    background: var(--card-bg);
    flex-shrink: 0;
}

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

.search-input-wrapper i {
    position: absolute;
    left: var(--spacing-sm);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

#tocSearchInput {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    background: var(--input-bg);
    color: var(--text-color);
    transition: all var(--transition-base);
}

#tocSearchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.search-clear {
    position: absolute;
    right: var(--spacing-xs);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    opacity: 0.7;
}

.search-clear:hover {
    opacity: 1;
    color: var(--text-color);
    background: var(--hover-bg);
}

/* 目录内容 */
.toc-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

.toc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    gap: var(--spacing-sm);
}

.toc-loading i {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
}

.toc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    gap: var(--spacing-sm);
}

.toc-empty i {
    font-size: var(--font-size-lg);
    color: var(--warning-color);
}

.toc-list {
    list-style: none;
    padding: var(--spacing-md);
    margin: 0;
}

.toc-item {
    margin-bottom: var(--spacing-xs);
    transition: all var(--transition-base);
}

.toc-item a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toc-item a:hover {
    background: var(--hover-bg);
    color: var(--text-color);
    transform: translateX(4px);
}

.toc-item.active a {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.toc-item.hover a {
    background: var(--hover-bg);
    color: var(--text-color);
}

.toc-item.search-highlight a {
    background: var(--warning-color);
    color: white;
}

.toc-item.search-highlight a mark {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0 2px;
    border-radius: 2px;
}

/* 目录层级 */
.toc-level-1 { padding-left: 0; }
.toc-level-2 { padding-left: var(--spacing-md); }
.toc-level-3 { padding-left: calc(var(--spacing-md) * 2); }
.toc-level-4 { padding-left: calc(var(--spacing-md) * 3); }
.toc-level-5 { padding-left: calc(var(--spacing-md) * 4); }
.toc-level-6 { padding-left: calc(var(--spacing-md) * 5); }

/* 目录底部 */
.toc-footer {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    border-top: 1px solid var(--border-light);
    background: var(--hover-bg);
    flex-shrink: 0;
}

.toc-footer button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-footer button:hover {
    background: var(--card-bg);
    color: var(--text-color);
    transform: scale(1.1);
}

/* 滚动条样式 */
.toc-content::-webkit-scrollbar {
    width: 6px;
}

.toc-content::-webkit-scrollbar-track {
    background: var(--border-light);
}

.toc-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.toc-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 提示消息 */
.toast {
    position: fixed;
    top: var(--spacing-xl);
    right: var(--spacing-xl);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-base);
    max-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--error-color);
}

/* 推荐文章样式 */
.recommended-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommended-post {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    text-decoration: none;
    color: var(--text-color);
}

.recommended-post:hover {
    background: var(--hover-bg);
    transform: translateX(4px);
}

.recommended-post .post-thumbnail {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-sm);
}

.recommended-post .post-info h5 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.recommended-post .post-author {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* 文章统计样式 */
.reading-stats .stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

.reading-stats .stat-item:last-child {
    border-bottom: none;
}

.reading-stats .stat-item i {
    width: 20px;
    color: var(--primary-color);
}

.reading-stats .stat-info {
    flex: 1;
}

.reading-stats .stat-number {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    font-size: var(--font-size-lg);
}

.reading-stats .stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .table-of-contents {
        display: none;
    }
    
    .post-actions {
        gap: var(--spacing-sm);
    }
    
    .action-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-xs);
    }
    
    .back-to-top {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
        width: 40px;
        height: 40px;
    }
    
    .toast {
        top: var(--spacing-lg);
        right: var(--spacing-lg);
        left: var(--spacing-lg);
        max-width: none;
    }
}

/* 平板端目录适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .table-of-contents {
        width: 280px;
    }
    
    .toc-header h4 {
        font-size: var(--font-size-xs);
    }
    
    .toc-stats {
        font-size: 0.7rem;
        padding: var(--spacing-xs);
    }
    
    .toc-search {
        padding: var(--spacing-sm);
    }
    
    #tocSearchInput {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 28px;
    }
    
    .toc-list {
        padding: var(--spacing-sm);
    }
    
    .toc-item a {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs);
    }
}

/* ===== 文章详情页美化样式 ===== */

/* 文章详情页整体美化 */
.post-detail {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.post-detail:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.post-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color), var(--warning-color), var(--accent-color));
    z-index: 1;
}

/* 文章头部美化 */
.post-header {
    padding: 3rem 2.5rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
    position: relative;
    overflow: hidden;
}

.post-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23f0f0f0" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23f0f0f0" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23f0f0f0" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.post-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-base);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid transparent;
}

.post-breadcrumb a:hover {
    color: var(--primary-hover);
    background: rgba(52, 152, 219, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.post-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 50%, var(--success-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.meta-left, .meta-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.post-author, .post-date, .post-category, .reading-time, .word-count {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.post-author:hover, .post-date:hover, .reading-time:hover, .word-count:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-bg), var(--card-bg));
}

.post-category a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-bg), var(--primary-color));
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    font-weight: 600;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.post-category a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.post-excerpt {
    background: linear-gradient(135deg, var(--hover-bg), var(--card-bg));
    padding: 2rem;
    border-radius: var(--radius-xl);
    border-left: 6px solid var(--primary-color);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-excerpt::before {
    content: '"';
    position: absolute;
    top: -15px;
    left: 15px;
    font-size: 5rem;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: serif;
    font-weight: bold;
}

.post-excerpt p {
    margin: 0;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.8;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* 文章内容美化 */
.post-content {
    padding: 3rem 2.5rem;
    line-height: 2;
    color: var(--text-color);
    font-size: 1.15rem;
    background: var(--card-bg);
}

.post-content h1, .post-content h2, .post-content h3, 
.post-content h4, .post-content h5, .post-content h6 {
    margin: 3rem 0 1.5rem 0;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    padding-left: 1rem;
}

.post-content h1 {
    font-size: 2.5rem;
    border-bottom: 4px solid var(--primary-color);
    padding-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 4rem;
}

.post-content h1::before {
    content: '📖';
    position: absolute;
    left: -2rem;
    top: 0;
    font-size: 2rem;
}

.post-content h2 {
    font-size: 2rem;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 0.75rem;
    color: var(--primary-color);
    margin-top: 3rem;
}

.post-content h2::before {
    content: '📝';
    position: absolute;
    left: -1.5rem;
    top: 0;
    font-size: 1.5rem;
}

.post-content h3 {
    font-size: 1.7rem;
    color: var(--success-color);
    margin-top: 2.5rem;
}

.post-content h3::before {
    content: '✨';
    position: absolute;
    left: -1.2rem;
    top: 0;
    font-size: 1.2rem;
}

.post-content h4 {
    font-size: 1.4rem;
    color: var(--warning-color);
    margin-top: 2rem;
}

.post-content h4::before {
    content: '💡';
    position: absolute;
    left: -1rem;
    top: 0;
    font-size: 1rem;
}

.post-content p {
    margin-bottom: 1.8rem;
    text-align: justify;
    color: var(--text-color);
    font-weight: 400;
}

.post-content blockquote {
    margin: 2.5rem 0;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, var(--hover-bg), var(--card-bg));
    border-left: 6px solid var(--primary-color);
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    font-style: italic;
    color: var(--text-muted);
    position: relative;
    box-shadow: var(--shadow-lg);
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content blockquote::before {
    content: '"';
    position: absolute;
    top: -15px;
    left: 15px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
    font-weight: bold;
}

.post-content blockquote::after {
    content: '"';
    position: absolute;
    bottom: -15px;
    right: 15px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
    font-weight: bold;
}

.post-content code {
    background: linear-gradient(135deg, var(--code-bg), var(--hover-bg));
    color: var(--code-color);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.post-content pre {
    background: linear-gradient(135deg, var(--code-bg), var(--card-bg));
    padding: 2rem;
    border-radius: var(--radius-xl);
    overflow-x: auto;
    margin: 2.5rem 0;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.post-content pre::before {
    content: '💻 代码';
    position: absolute;
    top: 0.75rem;
    right: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--card-bg);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    border: none;
    box-shadow: none;
    font-size: 0.95em;
    line-height: 1.6;
}

.post-content ul, .post-content ol {
    margin: 2rem 0;
    padding-left: 3rem;
}

.post-content li {
    margin-bottom: 1rem;
    position: relative;
    line-height: 1.7;
}

.post-content ul li::before {
    content: '🎯';
    position: absolute;
    left: -2rem;
    top: 0;
    color: var(--primary-color);
    font-size: 1rem;
}

.post-content ol {
    counter-reset: list-counter;
}

.post-content ol li {
    counter-increment: list-counter;
}

.post-content ol li::before {
    content: counter(list-counter) '.';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: -2.5rem;
    top: 0;
    font-size: 1.1rem;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-base);
    padding: 0.1rem 0;
    font-weight: 500;
}

.post-content a:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-hover);
    transform: translateY(-1px);
    text-shadow: 0 1px 2px rgba(52, 152, 219, 0.3);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    margin: 2.5rem 0;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-base);
    border: 3px solid var(--border-color);
}

.post-content img:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--border-color);
}

.post-content th, .post-content td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.post-content th {
    background: linear-gradient(135deg, var(--hover-bg), var(--primary-bg));
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--primary-color);
}

.post-content tr:hover {
    background: var(--hover-bg);
    transform: scale(1.01);
    transition: all var(--transition-base);
}

.post-content tr:last-child td {
    border-bottom: none;
}

/* 文章底部美化 */
.post-footer {
    padding: 3rem 2.5rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--hover-bg), var(--card-bg));
    position: relative;
}

.post-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* 文章操作按钮美化 */
.post-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-base);
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.action-btn.liked {
    background: linear-gradient(135deg, var(--success-color), var(--success-hover));
    color: white;
    border-color: var(--success-color);
}

.action-btn.bookmarked {
    background: linear-gradient(135deg, var(--warning-color), var(--warning-hover));
    color: white;
    border-color: var(--warning-color);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.action-btn:disabled:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* 文章标签美化 */
.post-tags {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.post-tags .tag {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-bg), var(--primary-color));
    color: var(--primary-color);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: 1px solid var(--primary-color);
    transition: all var(--transition-base);
    cursor: pointer;
}

.post-tags .tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 分享按钮美化 */
.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-base);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.share-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 评论区域美化 */
.comments-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.comments-header {
    background: linear-gradient(135deg, var(--primary-bg), var(--hover-bg));
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.comments-filter {
    display: flex;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 评论表单美化 */
.comment-form-container {
    background: linear-gradient(135deg, var(--hover-bg), var(--card-bg));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.comment-form textarea {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    font-size: 1rem;
    line-height: 1.6;
}

.comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* 评论列表美化 */
.comment-item {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.comment-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    box-shadow: var(--shadow-sm);
}

.comment-action {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.comment-action:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.comment-action.liked {
    background: linear-gradient(135deg, var(--success-color), var(--success-hover));
    color: white;
    border-color: var(--success-color);
}

/* 相关文章美化 */
.related-posts-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.related-post-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    overflow: hidden;
}

.related-post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.related-post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition-base);
}

.related-post-title a:hover {
    color: var(--primary-color);
    text-shadow: 0 1px 2px rgba(52, 152, 219, 0.3);
}

/* 侧边栏美化 */
.sidebar-widget {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-base);
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.widget-title {
    background: linear-gradient(135deg, var(--primary-bg), var(--hover-bg));
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
}

/* 作者信息美化 */
.author-widget {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
    border: 2px solid var(--primary-color);
}

.author-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--card-bg);
}

.author-stats {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.follow-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
}

.follow-btn.following {
    background: linear-gradient(135deg, var(--success-color), var(--success-hover));
    border-color: var(--success-color);
}

.follow-btn.following:hover {
    background: linear-gradient(135deg, var(--error-color), var(--error-hover));
    border-color: var(--error-color);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }
    
    .post-header {
        padding: 2rem 1.5rem;
    }
    
    .post-content {
        padding: 2rem 1.5rem;
        font-size: 1rem;
    }
    
    .post-footer {
        padding: 2rem 1.5rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .meta-left, .meta-right {
        justify-content: center;
    }
    
    .post-actions {
        justify-content: center;
    }
    
    .action-btn {
        padding: 0.5rem 1rem;
        font-size: var(--font-size-sm);
    }
}

/* ===== 个人资料页面美化样式 ===== */

/* 个人资料页面整体布局 */
.profile-stats-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.stats-overview {
    padding: 2rem;
}

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

.stats-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* 用户活动信息 */
.user-activity-info {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.user-activity-info .activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.user-activity-info .activity-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.user-activity-info .activity-item i {
    color: var(--primary-color);
    width: 20px;
}

/* 个人资料编辑区域 */
.profile-section {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.section-title {
    background: linear-gradient(135deg, var(--primary-bg), var(--hover-bg));
    padding: 1.5rem 2rem;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
}

/* 个人资料信息 */
.profile-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--hover-bg), var(--card-bg));
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--card-bg);
}

.profile-details h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.profile-role, .profile-joined {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: var(--font-size-sm);
}

.profile-role i {
    color: var(--warning-color);
}

.profile-joined i {
    color: var(--primary-color);
}

/* 表单区域 */
.profile-forms {
    padding: 2rem;
}

.form-section {
    background: var(--hover-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

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

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3 i {
    color: var(--primary-color);
}

/* 表单布局 */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: var(--font-size-sm);
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-base);
    background: var(--input-bg);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input:invalid {
    border-color: var(--error-color);
}

/* 密码强度提示 */
.strength-tip {
    margin-top: 0.5rem;
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-actions .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.form-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 用户活动区域 */
.user-activity {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.activity-section {
    padding: 2rem;
}

.activity-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-section h3 i {
    color: var(--primary-color);
}

.no-activity {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
    background: var(--hover-bg);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    background: var(--hover-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.activity-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.activity-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.activity-content h4 a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

.activity-content h4 a:hover {
    color: var(--primary-color);
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* 管理员后台样式 */
.admin-container {
    display: flex;
    min-height: calc(100vh - 60px);
    background: var(--bg-color);
}

/* 管理员导航 */
.admin-nav {
    width: 280px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem 0;
    position: fixed;
    height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 1000;
}

.admin-nav-header {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.admin-nav-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-nav-header p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.admin-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.admin-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.admin-nav-item:hover::before {
    left: 100%;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.admin-nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* 主内容区域 */
.admin-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background: var(--bg-color);
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 1rem;
}

/* 管理员警告框 */
.admin-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    font-weight: 500;
}

.admin-alert-success {
    background: var(--success-bg);
    color: var(--success-color);
    border: 1px solid var(--success-border);
}

.admin-alert-error {
    background: var(--error-bg);
    color: var(--error-color);
    border: 1px solid var(--error-border);
}

.admin-alert-warning {
    background: var(--warning-bg);
    color: var(--warning-color);
    border: 1px solid var(--warning-border);
}

/* 仪表盘样式 */
.admin-dashboard {
    max-width: 1200px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: var(--text-color);
}

.stat-info p {
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.trend-up {
    color: var(--success-color);
    font-weight: 600;
}

.trend-down {
    color: var(--error-color);
    font-weight: 600;
}

.trend-period {
    color: var(--text-muted);
}

/* 仪表盘网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.dashboard-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-action {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

.card-action:hover {
    color: var(--primary-dark);
}

/* 活动列表 */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-color);
    transition: background var(--transition-base);
}

.activity-item:hover {
    background: var(--hover-bg);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

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

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

.activity-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.activity-status {
    flex-shrink: 0;
}

/* 分类统计 */
.category-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-name {
    font-weight: 500;
    color: var(--text-color);
}

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

.category-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 表格样式 */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--bg-color);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background var(--transition-base);
}

.admin-table tbody tr:hover {
    background: var(--hover-bg);
}

/* 状态徽章 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-published {
    background: var(--success-bg);
    color: var(--success-color);
}

.status-draft {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.status-active {
    background: var(--success-bg);
    color: var(--success-color);
}

/* 分类标签 */
.category-tag {
    padding: 0.25rem 0.75rem;
    background: var(--primary-bg);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.username {
    font-weight: 500;
    color: var(--text-color);
}

.current-user {
    font-size: 0.75rem;
    color: var(--primary-color);
    background: var(--primary-bg);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    align-self: flex-start;
}

/* 角色选择器 */
.role-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
}

.role-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 评论内容 */
.comment-content {
    max-width: 300px;
}

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

/* 操作按钮 */
.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem;
    font-size: 0.8rem;
    min-width: auto;
}

/* 筛选器 */
.posts-filters {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text-color);
    min-width: 150px;
}

.filter-search {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text-color);
    flex: 1;
    min-width: 200px;
}

.filter-search::placeholder {
    color: var(--text-muted);
}

/* 分类管理 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
}

.category-stats .stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

/* 表单样式 */
.post-form {
    max-width: none;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.form-main {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.form-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.form-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.form-card h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.form-help {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 富文本编辑器 */
.editor-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.toolbar-btn:hover {
    background: var(--primary-color);
    color: white;
}

.toolbar-btn.active {
    background: var(--primary-color);
    color: white;
}

.content-editor {
    min-height: 400px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
    transition: border-color 0.3s ease;
    overflow-y: auto;
}

.content-editor:focus {
    border-color: var(--primary-color);
}

.content-editor[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    font-style: italic;
}

.content-editor h2,
.content-editor h3 {
    margin: 1.5rem 0 1rem 0;
    color: var(--text-color);
}

.content-editor p {
    margin-bottom: 1rem;
}

.content-editor ul,
.content-editor ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-editor li {
    margin-bottom: 0.5rem;
}

.content-editor a {
    color: var(--primary-color);
    text-decoration: underline;
}

.content-editor a:hover {
    color: var(--primary-dark);
}

/* 写作助手 */
.writing-tips {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.tip-item i {
    color: var(--primary-color);
    margin-top: 0.125rem;
}

.tip-item span {
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.5;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline.active {
    background: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-sidebar {
        order: -1;
        position: static;
    }
}

@media (max-width: 768px) {
    .post-form {
        padding: 1rem;
    }
    
    .form-main,
    .form-card {
        padding: 1rem;
    }
    
    .editor-toolbar {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .toolbar-btn {
        padding: 0.375rem;
        font-size: 0.875rem;
    }
    
    .content-editor {
        min-height: 300px;
        font-size: 0.875rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 设置页面 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.settings-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.settings-card h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1.25rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* 通知样式 */
.admin-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.admin-notification.show {
    transform: translateX(0);
}

.admin-notification-success {
    border-left: 4px solid var(--success-color);
}

.admin-notification-error {
    border-left: 4px solid var(--error-color);
}

.admin-notification-info {
    border-left: 4px solid var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .admin-nav {
        width: 100%;
        height: auto;
        position: static;
        margin-bottom: 1rem;
    }
    
    .admin-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select,
    .filter-search {
        min-width: auto;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-sm {
        padding: 0.25rem;
        font-size: 0.75rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.dashboard-card,
.category-card {
    animation: fadeInUp 0.6s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 快速操作 */
.quick-actions {
    margin-top: 2rem;
}

.quick-actions h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

.action-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.action-card span {
    font-weight: 500;
    text-align: center;
}

/* 趋势图表 */
.trend-chart {
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.trend-chart canvas {
    max-width: 100%;
    height: auto;
}

/* 活动元数据 */
.activity-meta .views {
    color: var(--primary-color);
    font-weight: 500;
}

/* 统计趋势 */
.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.trend-up {
    color: var(--success-color);
    font-weight: 600;
}

.trend-down {
    color: var(--error-color);
    font-weight: 600;
}

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

/* 响应式优化 */
@media (max-width: 768px) {
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trend-chart {
        padding: 0.5rem;
    }
    
    .stat-trend {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* 离线通知 */
.offline-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--warning-bg);
    color: var(--warning-color);
    padding: 1rem;
    text-align: center;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    border-bottom: 1px solid var(--warning-border);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.offline-notification i {
    font-size: 1.1rem;
}

/* 通知徽章样式 */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    min-width: 18px;
}

.top-bar-actions .action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.top-bar-actions .action-btn:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

.top-bar-actions .action-btn i {
    font-size: 18px;
}

.user-menu .user-link {
    position: relative;
}

.user-menu .notification-badge {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: auto;
    height: auto;
}
