/* 太空科技主题 - 创新风格 */
:root {
    --space-dark: #0a0e17;
    --space-light: #1a2138;
    --neon-blue: #00f0ff;
    --neon-purple: #b400ff;
    --star-yellow: #ffe600;
    --text-glow: rgba(0, 240, 255, 0.7);
    --astronaut-orange: #ff6d00;
    --alien-green: #00ff88;
}

@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 {
    background-color: var(--space-dark);
    color: white;
    font-family: 'Orbitron', sans-serif;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 240, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 30%, rgba(180, 0, 255, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(255, 230, 0, 0.1) 0%, transparent 30%);
    overflow-x: hidden;
}

/* 动态星空背景 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    animation: twinkle var(--duration) infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* 3D倾斜布局容器 */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 未来主义头部设计 */
header {
    background-color: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(10px);
    padding: 25px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px var(--text-glow);
    letter-spacing: 2px;
}

/* 导航菜单 - 全息投影效果 */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    position: relative;
    padding: 10px 20px;
    font-size: 18px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    transition: width 0.3s ease;
}

nav ul li a:hover::before {
    width: 100%;
}

/* 主要内容区域 - 悬浮面板 */
.main-content {
    background: rgba(26, 33, 56, 0.6);
    border-radius: 15px;
    padding: 40px;
    margin: 40px 0;
    backdrop-filter: blur(5px);
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
    transform: rotateY(-5deg);
    transition: transform 0.5s ease;
}

.main-content:hover {
    transform: rotateY(0deg);
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    position: relative;
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--text-glow);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), transparent);
}

/* 六边形网格布局 */
.hex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    clip-path: polygon(
        0 10%, 5% 0, 15% 0, 20% 10%, 
        80% 10%, 85% 0, 95% 0, 100% 10%, 
        100% 90%, 95% 100%, 85% 100%, 
        80% 90%, 20% 90%, 15% 100%, 
        5% 100%, 0 90%
    );
}

.hex-item {
    position: relative;
    height: 300px;
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid var(--neon-purple);
    overflow: hidden;
    transition: all 0.5s ease;
}

.hex-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 10px 30px rgba(180, 0, 255, 0.3);
}

.hex-image {
    width: 100%;
    height: 60%;
    object-fit: cover;
    filter: grayscale(30%) contrast(120%);
    transition: filter 0.5s ease;
}

.hex-item:hover .hex-image {
    filter: grayscale(0%) contrast(100%);
}

.hex-info {
    padding: 20px;
}

.hex-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 0 5px var(--text-glow);
}

.hex-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--alien-green);
    margin-top: 15px;
}

/* 分类标签 - 全息徽章效果 */
.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 15px;
    background: linear-gradient(45deg, var(--neon-purple), var(--astronaut-orange));
    color: white;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(180, 0, 255, 0.5);
}

/* 文章详情页 - 控制台风格 */
.article-detail {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid var(--neon-blue);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.2);
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.article-title {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--text-glow);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--alien-green);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid var(--neon-purple);
    box-shadow: 0 0 20px rgba(180, 0, 255, 0.3);
}

.article-content {
    line-height: 1.8;
    font-size: 18px;
    position: relative;
}

.article-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--neon-blue), var(--neon-purple));
    border-radius: 3px;
}

.article-content p {
    margin-bottom: 25px;
    position: relative;
    padding-left: 20px;
}

/* 分页导航 - 太空舱按钮 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.pagination a {
    padding: 12px 25px;
    border-radius: 30px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: white;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pagination a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.4), transparent);
    transition: all 0.5s ease;
}

.pagination a:hover::before {
    left: 100%;
}

.pagination a:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 15px var(--text-glow);
}

/* 友情链接 - 卫星轨道效果 */
.friend-links {
    background: rgba(10, 14, 23, 0.7);
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
    border: 1px solid var(--neon-purple);
    position: relative;
    overflow: hidden;
}

.friend-links::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, transparent 60%, rgba(180, 0, 255, 0.1) 100%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.friend-links h3 {
    margin-bottom: 25px;
    color: var(--neon-blue);
    font-size: 24px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 5px var(--text-glow);
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.friend-links-container a {
    padding: 10px 20px;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 30px;
    font-size: 14px;
    border: 1px solid var(--neon-blue);
    transition: all 0.3s ease;
}

.friend-links-container a:hover {
    background: rgba(0, 240, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 240, 255, 0.2);
}

/* 页脚 - 太空船底部 */
footer {
    background-color: rgba(10, 14, 23, 0.9);
    padding: 40px 0;
    text-align: center;
    margin-top: 80px;
    border-top: 1px solid var(--neon-blue);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple), var(--astronaut-orange));
}

.copyright {
    font-size: 16px;
    color: var(--alien-green);
    letter-spacing: 1px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .hex-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .hex-grid {
        grid-template-columns: 1fr;
        clip-path: none;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .main-content {
        transform: none;
        padding: 30px;
    }
}

/* 动态星空JS生成 */
document.addEventListener('DOMContentLoaded', function() {
    const starsContainer = document.createElement('div');
    starsContainer.className = 'stars';
    document.body.prepend(starsContainer);
    
    for (let i = 0; i < 200; i++) {
        const star = document.createElement('div');
        star.className = 'star';
        
        const size = Math.random() * 3;
        const duration = 2 + Math.random() * 3;
        const delay = Math.random() * 5;
        
        star.style.width = `${size}px`;
        star.style.height = `${size}px`;
        star.style.left = `${Math.random() * 100}%`;
        star.style.top = `${Math.random() * 100}%`;
        star.style.setProperty('--duration', `${duration}s`);
        star.style.animationDelay = `${delay}s`;
        
        starsContainer.appendChild(star);
    }
});