/* 宇宙紫沉浸式主题 */
:root {
    --cosmic-purple: #3a0ca3;
    --space-dark: #10002b;
    --star-light: #e0aaff;
    --nebula-pink: #f72585;
    --galaxy-blue: #4361ee;
    --text-glow: rgba(224, 170, 255, 0.8);
}

@font-face {
    font-family: 'Orbitron';
    src: url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: white;
    background: linear-gradient(135deg, var(--space-dark), var(--cosmic-purple));
    min-height: 100vh;
    line-height: 1.8;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* 星空背景效果 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, var(--star-light) 0.5px, transparent 1px),
        radial-gradient(circle at 80% 70%, var(--star-light) 0.5px, transparent 1px);
    background-size: 100px 100px;
    z-index: -1;
    opacity: 0.3;
    animation: twinkle 10s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    100% { opacity: 0.5; }
}

/* 导航栏 - 悬浮玻璃效果 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(58, 12, 163, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-bottom: 1px solid rgba(224, 170, 255, 0.2);
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--star-light), var(--nebula-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--text-glow);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav ul li a {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(224, 170, 255, 0.3), transparent);
    transition: all 0.5s ease;
}

nav ul li a:hover {
    background: rgba(247, 37, 133, 0.3);
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.5);
}

nav ul li a:hover::before {
    left: 100%;
}

/* 主要内容区域 - 星际卡片 */
.main-content {
    width: 90%;
    max-width: 1200px;
    margin: 7rem auto 3rem;
    padding: 2.5rem;
    background: rgba(26, 3, 71, 0.6);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(58, 12, 163, 0.3);
    border: 1px solid rgba(224, 170, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(247, 37, 133, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(224, 170, 255, 0.3);
    position: relative;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px var(--text-glow);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, var(--nebula-pink), transparent);
}

/* 文章网格 - 全息投影效果 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: rgba(34, 4, 93, 0.5);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(224, 170, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.article-card:hover {
    transform: translateY(-0.5rem) scale(1.02);
    box-shadow: 0 10px 25px rgba(247, 37, 133, 0.4);
    border-color: rgba(247, 37, 133, 0.3);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.1), rgba(67, 97, 238, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover::before {
    opacity: 1;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(224, 170, 255, 0.1);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 2rem;
    height: 2px;
    background: var(--nebula-pink);
    transition: width 0.3s ease;
}

.article-card:hover .card-title::after {
    width: 4rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--star-light);
    margin-top: 1rem;
    opacity: 0.8;
}

/* 分类标签 - 星系徽章 */
.category-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(to right, var(--galaxy-blue), var(--cosmic-purple));
    color: white;
    border-radius: 1rem;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 文章详情页 - 叙事中心 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.article-header {
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 15px var(--text-glow);
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--nebula-pink), transparent);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--star-light);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(58, 12, 163, 0.5);
    border: 1px solid rgba(224, 170, 255, 0.3);
}

.article-content {
    line-height: 1.9;
    font-size: 1.1rem;
    position: relative;
}

.article-content p {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1rem;
}

.article-content p::before {
    content: '✦';
    position: absolute;
    left: -0.5rem;
    color: var(--nebula-pink);
    font-size: 0.8rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* 分页导航 - 星际跳跃按钮 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination a {
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    background: rgba(67, 97, 238, 0.2);
    border: 1px solid var(--galaxy-blue);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.pagination a:hover {
    background: var(--galaxy-blue);
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.5);
    transform: translateY(-2px);
}

/* 友情链接 - 星云网络 */
.friend-links {
    background: rgba(26, 3, 71, 0.6);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
    border: 1px solid rgba(224, 170, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.friend-links::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(224, 170, 255, 0.05) 0%, transparent 70%);
    animation: rotate 40s linear infinite reverse;
    z-index: -1;
}

.friend-links h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px var(--text-glow);
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.friend-links-container a {
    padding: 0.6rem 1.2rem;
    background: rgba(58, 12, 163, 0.4);
    border-radius: 2rem;
    font-size: 0.85rem;
    border: 1px solid rgba(224, 170, 255, 0.2);
    transition: all 0.3s ease;
}

.friend-links-container a:hover {
    background: var(--nebula-pink);
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.5);
    transform: translateY(-2px);
}

/* 页脚 - 星际边界 */
footer {
    background: linear-gradient(to top, rgba(16, 0, 43, 0.9), transparent);
    padding: 3rem 0 2rem;
    text-align: center;
    margin-top: 5rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(224, 170, 255, 0.5), transparent);
}

.copyright {
    font-size: 0.9rem;
    color: var(--star-light);
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-meta {
        gap: 1rem;
    }
    
    .main-content {
        margin-top: 6rem;
        padding: 1.5rem;
    }
}