/* 暗黑科技风格主题 */
:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --primary: #ff2d55;
    --primary-dark: #d42045;
    --text-main: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #252525;
    --card-bg: #121212;
    --glow-effect: 0 0 8px rgba(255, 45, 85, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: white;
    text-shadow: var(--glow-effect);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 科技感头部 */
header {
    background-color: var(--bg-darker);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-link {
    position: relative;
    padding: 5px 0;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 主要内容区 */
.main-content {
    background-color: var(--bg-darker);
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary);
}

/* 网格布局 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), var(--glow-effect);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 15px;
}

/* 分类标签 */
.category-badge {
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(255, 45, 85, 0.2);
    color: var(--primary);
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
    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: 32px;
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 600;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 8px 20px;
    border-radius: 4px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.pagination a:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 友情链接 */
.link-section {
    background-color: var(--bg-darker);
    border-radius: 6px;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
}

.link-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.link-grid a {
    padding: 8px 15px;
    background-color: var(--card-bg);
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.link-grid a:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 页脚 */
footer {
    background-color: var(--bg-darker);
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.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;
        gap: 15px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-meta {
        gap: 15px;
    }
}