/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS变量定义 */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --accent-color: #f39c12;
    --text-color: #333;
    --text-light: #777;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: var(--dark-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.navbar-brand a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
}

.navbar-nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

.navbar-nav a:hover {
    color: var(--accent-color);
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* 通用章节样式 */
section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

/* 关于游戏部分 */
.about {
    background-color: white;
}

.about-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.about-image {
    flex: 1;
}

.game-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-text ul {
    list-style: none;
    padding-left: 1.5rem;
}

.about-text ul li {
    position: relative;
    margin-bottom: 0.8rem;
}

.about-text ul li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: -1.5rem;
}

/* 版本下载区域 */
.download {
    background-color: var(--light-color);
}

.version-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
    background-color: #f8f8f8;
}

.version-content {
    display: none;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.version-content.active {
    display: block;
}

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

.download-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--dark-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h4 {
    font-size: 1.2rem;
    margin: 0;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge.windows {
    background-color: var(--secondary-color);
}

.badge.linux {
    background-color: var(--accent-color);
}

.card-body {
    padding: 1.5rem;
}

.card-body p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.card-body ul {
    list-style: none;
    padding-left: 0;
}

.card-body ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.card-body ul li::before {
    content: "📁";
    position: absolute;
    left: 0;
}

.download-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.download-link:hover {
    text-decoration: underline;
}

/* 平台支持说明 */
.platforms {
    background-color: white;
}

.platforms-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.platform-card {
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.platform-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.windows-icon {
    background-color: var(--secondary-color);
    color: white;
}

.linux-icon {
    background-color: var(--accent-color);
    color: white;
}

.platform-card ul {
    list-style: none;
    padding-left: 0;
    text-align: left;
}

.platform-card ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.platform-card ul li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 游戏特性 */
.features {
    background-color: var(--light-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card ul {
    list-style: none;
    padding-left: 0;
}

.feature-card ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.feature-card ul li::before {
    content: "→";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 项目链接 */
.repository {
    background-color: white;
    text-align: center;
}

.repository-content {
    max-width: 600px;
    margin: 0 auto;
}

.repository-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.repo-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .version-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .download-cards,
    .platforms-content,
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 下载按钮悬停效果 */
.download-link {
    position: relative;
}

.download-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.download-link:hover::after {
    width: 100%;
}
