/* 暗黑模式主题 */
:root {
    --bg-dark: #121212;
    --bg-darker: #0a0a0a;
    --bg-card: #1e1e1e;
    --primary: #7c4dff;
    --primary-light: #9a79ff;
    --text-main: #e0e0e0;
    --text-secondary: #b0b0b0;
    --accent: #00e5ff;
    --border: #333;
    --success: #00c853;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* 布局容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 - 磨砂玻璃效果 */
header {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    gap: 2px;
}

.nav-item {
    position: relative;
}

.nav-link {
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.25s ease;
}

.nav-link:hover {
    background: rgba(124, 77, 255, 0.15);
    color: var(--primary-light);
}

.nav-link.active {
    background: rgba(124, 77, 255, 0.25);
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 40px 0;
}

.content-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.section-title {
    font-size: 22px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    position: relative;
    color: var(--text-main);
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

/* 网格布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* 文章卡片 */
.article-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.card-media {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 17px;
    margin-bottom: 12px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 15px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(124, 77, 255, 0.2);
    color: var(--primary-light);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    border: 1px solid var(--primary);
}

/* 文章详情页 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 34px;
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-main), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 14px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text-main);
}

.article-content a {
    color: var(--accent);
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    border: 1px solid var(--border);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 12px 24px;
    border-radius: 30px;
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid var(--primary);
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary);
    color: white;
}

/* 友情链接 */
.friend-links {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid var(--border);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 18px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 16px;
    background: rgba(124, 77, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid var(--primary);
    transition: all 0.3s;
}

.friend-links-container a:hover {
    background: var(--primary);
    color: white;
}

/* 页脚样式 */
footer {
    background: var(--bg-darker);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.copyright {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .content-card {
        padding: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-card {
    animation: fadeIn 0.6s ease-out forwards;
}