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

/* 基础变量定义 */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #ff8fb1;
    --accent-color: #6b8ec6;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f9f9f9;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --font-main: 'Noto Sans SC', sans-serif;
    --font-serif: 'Noto Serif SC', serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
}

/* 全局样式 */
body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* 确保所有元素都不会超出屏幕宽度 */
* {
    max-width: 100%;
    box-sizing: border-box;
}

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

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

/* 段落样式 */
p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-download {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow);
    width: 100%;
    margin-top: 1rem;
}

.btn-download:hover {
    background-color: #ff7aa3;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-right: 1rem;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.brand-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

.navbar-menu {
    display: flex;
    align-items: center;
}

.menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    margin-left: 2rem;
}

.menu-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.menu-link:hover,
.menu-link.active {
    color: var(--primary-color);
}

.menu-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.navbar-toggle {
    display: none;
    cursor: pointer;
}

.toggle-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* 英雄区域样式 */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf1 100%);
    position: relative;
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 300px;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-light);
}

.meta-item i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.hero-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.image-frame {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
}

.image-frame:hover {
    transform: translateY(-5px);
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 通用区块样式 */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* 游戏介绍样式 */
.about {
    background-color: var(--bg-light);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.story-section {
    flex: 1;
    min-width: 300px;
}

.story-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card-description {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.story-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    background-color: rgba(74, 111, 165, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
}

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

.feature-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

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

/* 游戏特色样式 */
.features {
    background-color: var(--bg-color);
}

.features-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.feature-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.feature-section.reverse {
    flex-direction: row-reverse;
}

.feature-image {
    flex: 1;
    min-width: 300px;
}

.section-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.feature-text {
    flex: 1;
    min-width: 300px;
}

.section-heading {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.list-item i {
    color: var(--success-color);
    margin-right: 0.75rem;
}

/* 游戏截图样式 */
.gallery {
    background-color: var(--bg-light);
}

.gallery-content {
    margin-top: 2rem;
}

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

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.image-wrapper {
    position: relative;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .image-overlay {
    transform: translateY(0);
}

.overlay-content h4 {
    color: white;
    margin-bottom: 0.5rem;
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* 下载中心样式 */
.download {
    background-color: var(--bg-color);
}

.download-content {
    margin-top: 2rem;
}

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

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

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.system-requirements {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
}

.system-requirements li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.system-requirements li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.download-notes {
    background-color: rgba(74, 111, 165, 0.1);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.notes-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.note-item {
    margin-bottom: 0.75rem;
    color: var(--text-light);
    display: flex;
    align-items: flex-start;
}

.note-item i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}

/* 常见问题样式 */
.faq {
    background-color: var(--bg-light);
}

.faq-content {
    margin-top: 2rem;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: var(--bg-color);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background-color: var(--bg-color);
    transition: var(--transition);
}

.faq-question:hover {
    background-color: rgba(74, 111, 165, 0.05);
}

.faq-question h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
}

.faq-question i {
    font-size: 1.25rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* 页脚样式 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 30px;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-brand .brand-icon {
    color: var(--secondary-color);
}

.footer-brand .brand-title {
    color: white;
}

.footer-brand .brand-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: white;
}

.footer-section .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.5rem;
}

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-item {
    margin-bottom: 0.75rem;
}

.link-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.link-item a:hover {
    color: var(--secondary-color);
}

.download-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.download-item {
    margin-bottom: 0.75rem;
}

.download-link {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.download-link:hover {
    color: var(--secondary-color);
}

.download-link i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

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

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

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--secondary-color);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    background-color: var(--bg-color);
    margin: 5% auto;
    padding: 20px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary-color);
}

#modal-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.modal-caption {
    text-align: center;
}

#modal-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

#modal-description {
    color: var(--text-light);
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    .container {
        padding: 0 15px;
    }

    .navbar-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .navbar-menu.active {
        left: 0;
    }

    .menu-list {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
    }

    .menu-item {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }

    .menu-link {
        display: block;
        padding: 0.5rem 0;
    }

    .navbar-toggle {
        display: block;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .feature-section,
    .feature-section.reverse {
        flex-direction: column;
    }

    .feature-image,
    .feature-text {
        min-width: 100%;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .download-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* 确保所有列表不会超出屏幕宽度 */
    ul, ol {
        padding-left: 1.2rem;
    }

    /* 确保图片不会超出容器 */
    img {
        max-width: 100%;
        height: auto;
    }

    /* 确保按钮在移动设备上正确显示 */
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .card-icon {
        font-size: 2.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    /* 调整小屏幕上的间距和字体大小 */
    section {
        padding: 60px 0;
    }

    .container {
        padding: 0 10px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    p {
        font-size: 0.9rem;
    }
}

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

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}