/* css/style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-color: #40c4ff;
    --secondary-color: #2a9eff;
    --dark-bg: #0a0e17;
    --light-bg: #1a1f2e;
    --text-color: #e0f0ff;
    --text-light: #a0c0e0;
    --border-color: rgba(64, 156, 255, 0.2);
    --card-bg: rgba(16, 25, 40, 0.7);
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background-color: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo i {
    margin-right: 10px;
    font-size: 2rem;
}

.logo span {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 30px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}

nav a:hover {
    color: var(--primary-color);
    background-color: rgba(64, 196, 255, 0.1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* 英雄区域 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(10, 14, 23, 0.85), rgba(10, 14, 23, 0.9)), 
                url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-light);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cta-button {
    display: inline-block;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(64, 196, 255, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(64, 196, 255, 0.4);
}

/* 内容区域 */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--primary-color);
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
}

.section-subtitle .blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.section-subtitle .blog-link:hover {
    text-decoration: underline;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(64, 196, 255, 0.1);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 20, 40, 0.6);
    border-color: rgba(64, 196, 255, 0.3);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
}

/* 最新航天文章区域 */
.latest-articles-section {
    background: linear-gradient(rgba(12, 18, 30, 0.9), rgba(12, 18, 30, 0.95)), 
                url('../assets/images/articles-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.articles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.loading-spinner {
    text-align: center;
    padding: 60px;
    color: var(--primary-color);
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner span {
    font-size: 1.2rem;
}

.error-message {
    text-align: center;
    padding: 60px;
    color: #ff6b6b;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.error-message p {
    margin-bottom: 10px;
}

.error-message a {
    color: var(--primary-color);
    text-decoration: none;
}

.error-message a:hover {
    text-decoration: underline;
}

.no-articles {
    text-align: center;
    padding: 60px;
    color: var(--text-light);
    font-size: 1.2rem;
}

/* 文章卡片样式 */
.article-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 20, 40, 0.4);
    border-color: rgba(64, 196, 255, 0.3);
}

.article-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-categories {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.category-tag {
    background-color: rgba(64, 196, 255, 0.9);
    color: var(--dark-bg);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-content {
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.article-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    background-color: rgba(64, 196, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s;
    align-self: flex-start;
}

.read-more:hover {
    background-color: rgba(64, 196, 255, 0.2);
    transform: translateX(5px);
}

.read-more i {
    margin-left: 8px;
    transition: transform 0.3s;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* 科幻故事区域 */
.sci-fi-stories {
    background: linear-gradient(rgba(12, 18, 30, 0.9), rgba(12, 18, 30, 0.95)), 
                url('../assets/images/stories-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.story-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 20, 40, 0.4);
    border-color: var(--primary-color);
}

.story-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.story-content {
    padding: 25px;
}

.story-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.story-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* 页脚样式 */
footer {
    background-color: #080c14;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.footer-section h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    bottom: 0;
    left: 0;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.footer-links i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    color: var(--text-light);
    margin-right: 15px;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: #8090b0;
    font-size: 0.9rem;
}

.copyright a {
    color: var(--primary-color);
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

/* 备案信息 */
.icp-info {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(10, 20, 40, 0.5);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.icp-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.icp-info a:hover {
    text-decoration: underline;
}

/* 星空背景效果 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .nav-container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    nav li {
        margin: 0 15px;
    }
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .section {
        padding: 70px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .article-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .article-image {
        height: 150px;
    }
    
    .article-title {
        font-size: 1.3rem;
    }
    
    .footer-section {
        min-width: 100%;
        margin-bottom: 40px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(10, 14, 23, 0.95);
        flex-direction: column;
        padding: 20px 0;
        text-align: center;
        backdrop-filter: blur(10px);
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav li {
        margin: 10px 0;
    }
    
    .latest-articles-section,
    .sci-fi-stories {
        background-attachment: scroll;
    }
}