/* 暗黑科技风格全局样式 */
:root {
    --primary-color: #ff2d55;
    --secondary-color: #ff5e78;
    --dark-bg: #0a0a0c;
    --dark-card: #1a1a1f;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --accent-color: #00e5ff;
    --border-color: #2a2a30;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--accent-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 科技感头部 */
header {
    background-color: rgba(10, 10, 12, 0.9);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    position: relative;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::before {
    width: 100%;
}

/* 主要内容卡片 */
.main-content {
    background-color: var(--dark-card);
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    position: relative;
    color: var(--text-primary);
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

/* 网格布局 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: var(--dark-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 45, 85, 0.2);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(255,45,85,0.1), rgba(0,229,255,0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.article-card:hover::before {
    opacity: 1;
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    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-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 45, 85, 0.2);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* 文章详情页 */
.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: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 4px;
    background-color: rgba(26, 26, 31, 0.8);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    font-weight: 500;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 友情链接 */
.friend-links {
    background-color: var(--dark-card);
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.friend-links h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 15px;
    background-color: rgba(26, 26, 31, 0.8);
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

.friend-links-container a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 科技感页脚 */
footer {
    background-color: #0a0a0c;
    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-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-meta {
        gap: 15px;
    }
}