/* 宇宙紫视差滚动主题 */
:root {
    --space-purple: #2a0845;
    --cosmic-purple: #4b2c7a;
    --nebula-pink: #d16dff;
    --star-yellow: #ffeb3b;
    --comet-blue: #00e5ff;
    --dark-matter: #0f0c24;
    --light-speed: #7b2cbf;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', 'Arial', sans-serif;
}

body {
    color: #fff;
    background-color: var(--dark-matter);
    perspective: 1px;
    transform-style: preserve-3d;
    overflow-x: hidden;
    line-height: 1.6;
}

/* 视差层 */
.parallax-layer {
    position: relative;
    height: 100vh;
    transform-style: inherit;
}

.parallax-layer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    transform: translateZ(-1px) scale(2);
}

/* 星空背景 */
.stars-bg::before {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #fff, rgba(0,0,0,0));
    background-color: var(--space-purple);
}

/* 头部样式 - 悬浮太空舱效果 */
header {
    background: rgba(42, 8, 69, 0.9);
    backdrop-filter: blur(8px);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-bottom: 1px solid var(--nebula-pink);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(to right, var(--nebula-pink), var(--comet-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(209, 109, 255, 0.3);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

nav ul li a:hover {
    background: rgba(123, 44, 191, 0.3);
    border-color: var(--nebula-pink);
    text-shadow: 0 0 5px var(--star-yellow);
}

/* 主要内容区域 - 太空舱面板 */
.main-content {
    background: rgba(42, 8, 69, 0.7);
    border-radius: 15px;
    padding: 30px;
    margin: 30px auto;
    max-width: 1200px;
    border: 1px solid var(--light-speed);
    box-shadow: 0 0 30px rgba(123, 44, 191, 0.2);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(123,44,191,0.1) 0%, rgba(42,8,69,0) 70%);
    animation: rotate 60s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.section-title {
    font-size: 26px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-speed);
    color: var(--comet-blue);
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.5);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, var(--nebula-pink), transparent);
}

/* 银河文章网格 */
.galaxy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    perspective: 1000px;
}

.space-card {
    background: rgba(43, 9, 70, 0.5);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.5s ease;
    border: 1px solid rgba(209, 109, 255, 0.3);
    position: relative;
    transform-style: preserve-3d;
}

.space-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 30px rgba(123, 44, 191, 0.4);
    border-color: var(--nebula-pink);
}

.space-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--nebula-pink), var(--comet-blue));
    opacity: 0;
    transition: opacity 0.3s;
}

.space-card:hover::before {
    opacity: 1;
}

.cosmic-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(209, 109, 255, 0.2);
    transition: all 0.5s;
}

.space-card:hover .cosmic-image {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    position: relative;
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    color: #fff;
    transition: all 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.space-card:hover .card-title {
    color: var(--comet-blue);
}

.cosmic-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--nebula-pink);
    margin-top: 15px;
}

/* 分类标签 */
.galaxy-tag {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(123, 44, 191, 0.3);
    color: var(--star-yellow);
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--light-speed);
}

/* 文章详情 - 宇宙视窗 */
.cosmic-detail {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.cosmic-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(123,44,191,0.1) 0%, rgba(42,8,69,0) 50%),
        linear-gradient(45deg, rgba(0,229,255,0.05) 0%, rgba(42,8,69,0) 70%);
    border-radius: 15px;
    z-index: -1;
}

.cosmic-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.cosmic-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--nebula-pink), transparent);
}

.cosmic-title {
    font-size: 36px;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--nebula-pink), var(--comet-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.cosmic-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--star-yellow);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.cosmic-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 0 30px rgba(123, 44, 191, 0.3);
    border: 1px solid var(--light-speed);
}

.cosmic-content {
    line-height: 1.8;
    font-size: 17px;
    position: relative;
}

.cosmic-content p {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cosmic-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

/* 分页导航 - 星际跳跃 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 12px 24px;
    border-radius: 30px;
    background: rgba(123, 44, 191, 0.3);
    border: 1px solid var(--light-speed);
    transition: all 0.3s;
    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,229,255,0.3), transparent);
    transition: all 0.5s;
}

.pagination a:hover {
    background: rgba(123, 44, 191, 0.5);
    box-shadow: 0 0 15px rgba(209, 109, 255, 0.5);
}

.pagination a:hover::before {
    left: 100%;
}

/* 友情链接 - 星际联盟 */
.friend-links {
    background: rgba(42, 8, 69, 0.7);
    border-radius: 12px;
    padding: 25px;
    margin: 30px auto;
    max-width: 1200px;
    border: 1px solid var(--light-speed);
    box-shadow: 0 0 20px rgba(123, 44, 191, 0.2);
    position: relative;
}

.friend-links::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--nebula-pink), var(--comet-blue));
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--comet-blue);
    font-size: 22px;
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.3);
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 16px;
    background: rgba(123, 44, 191, 0.3);
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid var(--light-speed);
    transition: all 0.3s;
}

.friend-links-container a:hover {
    background: rgba(123, 44, 191, 0.5);
    box-shadow: 0 0 10px rgba(209, 109, 255, 0.3);
    transform: translateY(-2px);
}

/* 页脚样式 - 深空基地 */
footer {
    background: linear-gradient(to bottom, var(--space-purple), var(--dark-matter));
    padding: 40px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid var(--light-speed);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--nebula-pink), var(--comet-blue));
}

.copyright {
    font-size: 14px;
    color: var(--star-yellow);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .galaxy-grid {
        grid-template-columns: 1fr;
    }
    
    .cosmic-title {
        font-size: 28px;
    }
    
    .cosmic-meta {
        gap: 15px;
    }
    
    .pagination {
        flex-direction: column;
        align-items: center;
    }
    
    .pagination a {
        width: 100%;
        text-align: center;
    }
}

/* 视差滚动效果 */
.parallax-group {
    position: relative;
    height: 100vh;
    transform-style: preserve-3d;
    z-index: -1;
}

.parallax-layer-back {
    transform: translateZ(-2px) scale(3);
}

.parallax-layer-base {
    transform: translateZ(0);
}