/* CSS变量定义 */
:root {
    --primary-color: #985745;
    --secondary-color: #2b100f;
    --accent-color: #d29e8b;
    --dark-accent: #3d1312;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #343a40;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-dark: linear-gradient(135deg, var(--secondary-color), var(--dark-accent));
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
    --font-family: 'Noto Sans SC', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* 头部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-weight: 500;
    color: var(--dark-gray);
    transition: var(--transition);
}

.nav-menu a:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* 英雄区 */
.hero {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 100px 0 60px;
    text-align: center;
}

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

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 400;
}

.hero-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.9;
}

.hero-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.meta-item {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    padding: 6px 12px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 15px 30px;
    border-radius: var(--border-radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(152, 87, 69, 0.3);
    transition: var(--transition);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(152, 87, 69, 0.4);
}

/* 通用区块样式 */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: var(--primary-color);
}

/* 最新动态 */
.news {
    padding: 80px 0;
    background: var(--light-gray);
}

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

.news-item {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-dark);
}

.news-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.news-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.news-item p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 20px;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.news-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* 游戏截图 */
.gallery {
    padding: 80px 0;
}

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

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* 用户评价 */
.reviews {
    padding: 80px 0;
    background: var(--light-gray);
}

.reviews-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.rating-overview {
    text-align: center;
}

.rating-score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.rating-stars {
    font-size: 1.5rem;
    color: #ffc107;
    margin-bottom: 10px;
}

.rating-count {
    color: var(--gray);
    font-size: 0.9rem;
}

.rating-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.review-tag {
    background: var(--white);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--primary-color);
}

.reviews-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.review-item {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px var(--shadow);
    text-align: center;
    display: none;
}

.review-item.active {
    display: block;
}

.review-stars {
    font-size: 1.2rem;
    color: #ffc107;
    margin-bottom: 20px;
}

.review-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 20px;
    font-style: italic;
}

.review-author {
    font-weight: 600;
    color: var(--primary-color);
}

/* 版本历史 */
.versions {
    padding: 80px 0;
}

.versions-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.version-item {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
}

.version-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.version-info {
    padding: 30px;
}

.version-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.version-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.version-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.version-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--light-gray);
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.version-stats i {
    color: var(--primary-color);
}

.version-features {
    margin-bottom: 25px;
}

.version-features li {
    padding: 5px 0;
    color: var(--gray);
    position: relative;
    padding-left: 20px;
}

.version-features li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.version-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.version-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(152, 87, 69, 0.3);
}

/* 常见问题 */
.faq {
    padding: 80px 0;
    background: var(--light-gray);
}

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

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--light-gray);
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.faq-question i {
    color: var(--primary-color);
    transition: var(--transition);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 30px 25px;
    color: var(--gray);
    line-height: 1.7;
}

/* 底部信息 */
.footer {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

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

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

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

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(152, 87, 69, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(152, 87, 69, 0.4);
}

/* 图片模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--border-radius);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.modal-prev,
.modal-next {
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    pointer-events: all;
}

.modal-prev:hover,
.modal-next:hover {
    background: var(--primary-color);
}

.modal-prev {
    margin-left: -25px;
}

.modal-next {
    margin-right: -25px;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: var(--transition);
        box-shadow: 0 4px 20px var(--shadow);
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero {
        padding: 80px 0 50px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-meta {
        gap: 10px;
    }

    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

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

    .reviews-stats {
        flex-direction: column;
        gap: 30px;
    }

    .rating-tags {
        justify-content: center;
    }

    .version-stats {
        flex-direction: column;
        gap: 10px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .modal-nav {
        display: none;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 70px 0 40px;
    }

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

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-meta {
        justify-content: center;
        gap: 8px;
    }

    .meta-item {
        flex: 0 0 calc(50% - 4px);
        text-align: center;
    }

    .news-item,
    .review-item,
    .version-info {
        padding: 20px;
    }

    .faq-question {
        padding: 20px;
    }

    .faq-answer p {
        padding: 0 20px 20px;
    }
}

/* 打印样式 */
@media print {
    .header,
    .nav-toggle,
    .back-to-top,
    .modal {
        display: none !important;
    }

    .hero {
        padding: 20px 0;
        background: var(--white) !important;
        color: var(--dark-gray) !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --shadow: rgba(0, 0, 0, 0.3);
        --shadow-dark: rgba(0, 0, 0, 0.5);
    }

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

    .tag,
    .download-btn,
    .version-download {
        border: 2px solid var(--white);
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
