:root {
    --primary-color: #3b82f6;
    --primary-dark: #1e40af;
    --primary-light: #93c5fd;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --surface-hover: #f1f5f9;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --gradient-button: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition-fast: 0.15s ease;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

[data-theme="dark"] {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --text-color: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-light: #475569;
    
    --gradient-card: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    --gradient-hero: linear-gradient(135deg, #4c1d95 0%, #1e1b4b 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
    transition: background var(--transition), color var(--transition);
}

.navbar {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-title i {
    font-size: 1.5rem;
}

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

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    gap: 2rem;
    min-height: calc(100vh - 70px);
}

/* 主页布局：左侧边栏，右主内容 */
.home-layout .container {
    grid-template-columns: 320px 1fr;
}

/* 文章页布局：左主内容，右侧边栏 */
.article-layout .container {
    grid-template-columns: 1fr 320px;
}

.sidebar {
    background: var(--gradient-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    height: fit-content;
    position: sticky;
    top: 90px;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.sidebar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.sidebar-section {
    margin-bottom: 2rem;
}

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

.sidebar-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.sidebar-section h3 i {
    color: var(--primary-color);
    font-size: 1rem;
}

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

.sidebar-section li {
    margin-bottom: 0.75rem;
}

.sidebar-section a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all var(--transition);
    padding: 0.5rem;
    border-radius: var(--radius);
    display: block;
}

.sidebar-section a:hover {
    color: var(--primary-color);
    background: var(--surface-hover);
    transform: translateX(4px);
}

.search-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.search-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 0.875rem;
    transition: all var(--transition);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-container button {
    padding: 0.75rem;
    background: var(--gradient-button);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-container button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.main-content {
    background: var(--gradient-card);
    padding: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all var(--transition);
}

.main-content:hover {
    box-shadow: var(--shadow-xl);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-title i {
    font-size: 2.5rem;
    animation: float 3s ease-in-out infinite;
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-item i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Featured Section */
.featured-section {
    padding: 2rem;
}

.featured-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.featured-section h2 i {
    color: var(--accent-color);
}

.page-header {
    padding: 2rem 2rem 0;
}

.page-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.page-header h2 i {
    color: var(--primary-color);
}

.post-card {
    background: var(--surface-color);
    margin: 1rem 2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition);
}

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

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

.post-card:last-child {
    margin-bottom: 2rem;
}

.post-card h3,
.post-card h4 {
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-card h3 a,
.post-card h4 a {
    text-decoration: none;
    color: var(--text-color);
    transition: color var(--transition);
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.post-card h3 a:hover,
.post-card h4 a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    margin-left: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.post-meta i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

.post-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.back-btn {
    background: var(--gradient-button);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 2rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.post-actions {
    padding: 2rem;
    display: none; /* 默认隐藏 */
    justify-content: center;
}

.scroll-top-btn {
    background: var(--gradient-button);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.scroll-top-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#article-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    margin-left: 2rem;
    margin-right: 2rem;
    color: var(--text-color);
    font-weight: 800;
    line-height: 1.2;
}

#article-content .post-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    margin-left: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-body {
    margin: 2rem;
    padding: 2rem;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.post-body h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    margin-left: 1rem;
    color: var(--text-color);
    font-weight: 800;
    line-height: 1.2;
}

.post-body h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 700;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.post-body h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
}

.post-body p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-body ul,
.post-body ol {
    margin-left: 2rem;
    margin-bottom: 1.25rem;
}

.post-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.post-body pre {
    background: #f6f8fa;
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.post-body code {
    background: var(--surface-hover);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--error-color);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    border: 1px solid var(--border-light);
}

.post-body pre code {
    background: transparent;
    padding: 0;
    color: #24292e;
    font-size: 0.875rem;
    line-height: 1.5;
    border: none;
}

.post-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--surface-hover);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* 图片自适应样式 */
.post-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: transform var(--transition);
}

.post-body img:hover {
    transform: scale(1.02);
}

/* 视频自适应样式 */
.post-body video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

/* 图片容器响应式处理 */
.post-body p:has(img),
.post-body div:has(img) {
    text-align: center;
}

/* 确保图片在小屏幕上不会溢出 */
@media (max-width: 768px) {
    .post-body img,
    .post-body video {
        max-width: 100%;
        margin: 1rem 0;
        border-radius: var(--radius-sm);
    }
}

/* 表格样式 */
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--surface-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.post-body table thead {
    background: var(--gradient-primary);
    color: white;
}

.post-body table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-body table tbody tr {
    transition: background-color var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

.post-body table tbody tr:hover {
    background: var(--surface-hover);
}

.post-body table tbody tr:last-child {
    border-bottom: none;
}

.post-body table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: top;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-color);
}

.post-body table tbody td:first-child {
    font-weight: 500;
}

/* 表格响应式处理 */
.post-body .table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
}

.post-body .table-container table {
    margin: 0;
    box-shadow: none;
    border: none;
    min-width: 600px; /* 确保表格有最小宽度 */
}

/* 移动端表格优化 */
@media (max-width: 768px) {
    .post-body table thead th {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .post-body table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .post-body .table-container table {
        min-width: 500px;
    }
}

@media (max-width: 480px) {
    .post-body table thead th {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .post-body table tbody td {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .post-body .table-container table {
        min-width: 400px;
    }
}

/* 深色模式下的表格样式 */
[data-theme="dark"] .post-body table thead {
    background: linear-gradient(135deg, #4c1d95 0%, #1e1b4b 100%);
}

[data-theme="dark"] .post-body table tbody tr:hover {
    background: var(--surface-hover);
}

/* 表格内的代码样式 */
.post-body table code {
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* 表格内的链接样式 */
.post-body table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.post-body table a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Mermaid Chart Styles */
.post-body .mermaid-chart {
    text-align: center;
    margin: 24px 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    overflow-x: auto;
}

.post-body .mermaid-chart:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.post-body .mermaid-chart svg {
    max-width: 100%;
    height: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Mermaid dark theme adjustments */
[data-theme="dark"] .post-body .mermaid-chart {
    border-color: var(--border-color);
    background: var(--surface-color);
}

[data-theme="dark"] .post-body .mermaid-chart:hover {
    border-color: var(--primary-color);
}

/* Mobile responsive for Mermaid charts */
@media (max-width: 768px) {
    .post-body .mermaid-chart {
        margin: 16px -8px;
        border-radius: var(--radius);
        padding: 12px 8px;
    }
}

/* Mermaid error message styling */
.post-body .mermaid-chart .mermaid-error {
    color: var(--error-color);
    padding: 12px;
    border: 1px solid var(--error-color);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--error-color) 10%, transparent);
    font-size: 14px;
    text-align: left;
}

.post-body .mermaid-chart .mermaid-error strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.post-body .mermaid-chart .mermaid-error small {
    opacity: 0.8;
    font-size: 12px;
}

/* Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-slow);
}

.page-transition.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.loading-posts,
.no-posts,
.error-posts {
    text-align: center;
    padding: 3rem 2rem;
    margin: 2rem;
    border-radius: var(--radius-lg);
    font-style: italic;
}

.loading-posts {
    background: var(--surface-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.no-posts {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid var(--warning-color);
    color: #92400e;
}

.error-posts {
    background: linear-gradient(135deg, #fee2e2 0%, #fca5a5 100%);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

/* Enhanced Loading Spinner */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    margin: 2rem;
}

.error-content {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--error-color);
    border: 1px solid var(--border-light);
}

.error-content h3 {
    color: var(--error-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.retry-btn {
    background: var(--gradient-button);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    margin-top: 1.5rem;
    transition: all var(--transition);
    font-weight: 500;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 移动端菜单控制 */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1.25rem;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding: 1rem;
        display: flex;
        flex-direction: column;
    }
    
    .home-layout .container {
        grid-template-columns: 1fr !important;
    }
    
    .article-layout .container {
        grid-template-columns: 1fr !important;
    }
    
    .sidebar {
        position: static;
        order: 2;
        padding: 1.5rem;
        width: 100%;
        margin-top: 1rem;
    }
    
    .main-content {
        padding: 0;
        order: 1;
        width: 100%;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .post-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .post-body {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .nav-container {
        padding: 1rem;
        position: relative;
    }
    
    .nav-title {
        font-size: 1.25rem;
    }
    
    .nav-title img {
        width: 32px;
        height: 32px;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--gradient-primary);
        flex-direction: column;
        padding: 1rem;
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 0.75rem;
        margin: 0.25rem 0;
        border-radius: var(--radius);
        text-align: center;
        width: 100%;
    }
    
    .theme-toggle {
        margin: 0.5rem 0 0 0;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
        display: flex !important;
        flex-direction: column;
    }
    
    .nav-container {
        padding: 0.5rem;
    }
    
    .nav-title {
        font-size: 1rem;
    }
    
    .nav-title img {
        width: 28px;
        height: 28px;
    }
    
    .sidebar {
        padding: 1rem;
        width: 100%;
        order: 2;
        margin-top: 1rem;
    }
    
    .main-content {
        order: 1;
        width: 100%;
    }
    
    .hero-section {
        padding: 1.5rem 0.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .post-card {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .post-body {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .post-body h1 {
        font-size: 1.5rem;
        margin-left: 0;
    }
    
    .post-body h2 {
        font-size: 1.25rem;
    }
    
    .post-body h3 {
        font-size: 1.1rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-container input,
    .search-container button {
        width: 100%;
    }
    
    .sidebar-section h3 {
        font-size: 1rem;
    }
    
    .featured-section h2,
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    .post-meta {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-left: 0;
    }
    
    #article-content .post-meta {
        margin-left: 0;
    }
    
    #article-content h1 {
        font-size: 1.5rem;
        margin-left: 0;
    }
}

/* CSS已完成，移除重复的加载和错误状态样式 */
