:root {
    --primary-color: #8B0000; /* 深红色 */
    --secondary-color: #1a1a1a; /* 深灰近黑色 */
    --text-color: #ffffff;
    --hover-color: #ff3333;
}

.header {
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px; /* 固定header高度 */
}

/* 调整logo区域样式 */
.header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header__logo-img {
    height: 40px;
    width: auto;
}

.header__logo-text {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.header__nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.header__nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.header__nav-link:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {

    
    .header__nav-list {
        flex-direction: column;
        text-align: center;
    }
}

.game-section {
    padding-top: 80px; /* 为固定的header留出空间 */
    background-color: var(--secondary-color);
    min-height: 100vh;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.game-wrapper {
    position: relative;
    width: 100%;
    /* 16:9 宽高比 */
    padding-bottom: 62%;
    background-color: #000;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    clip-path: inset(0 0 50px 0);
}

.game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;

}

.game-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary-color);
    color: var(--text-color);
    z-index: 1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-color);
    border-top: 5px solid var(--text-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.game-controls {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0;
    gap: 1rem;
}

.control-btn {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.control-btn:hover {
    background-color: var(--hover-color);
}

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


.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    padding: 120px 0 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__content {
    color: var(--text-color);
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    background: linear-gradient(to right, #ffffff, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #e0e0e0;
    max-width: 500px;
}

.hero__cta-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.2);
}

.hero__cta-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.3);
}

.hero__cta-icon {
    transition: transform 0.3s ease;
}

.hero__cta-button:hover .hero__cta-icon {
    transform: translateX(5px);
}

.hero__image-wrapper {
    position: relative;
}

.hero__image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.hero__image:hover {
    transform: translateY(-10px);
}

/* 响应式设计 */
@media (max-width: 968px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__content {
        order: 2;
    }

    .hero__image-wrapper {
        order: 1;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        margin: 0 auto 2rem;
    }

    .hero__cta-button {
        margin: 0 auto;
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 100px 0 60px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }
}

.main-content {
    background: var(--secondary-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

h3 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: #ff6b6b;
}

h4 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.5rem;
    color: #e0e0e0;
}

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

.feature-list li {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

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

.step {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

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

.overview-features {
    list-style: none;
    padding: 0;
}

.overview-features li {
    margin: 1rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.overview-features li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}
.faq-section {
    background: var(--secondary-color);
    padding: 4rem 0;
}

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

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.faq-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.faq-item p {
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .faq-item {
        padding: 1rem;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
    }
}

/* ... existing code ... */

/* 游戏区域的移动端优化 */
@media (max-width: 768px) {
    .game-section {
        padding-top: 60px;
        background-color: #000; /* 确保黑色背景 */
    }

    .game-container {
        padding: 0; /* 移除内边距让游戏区域占满宽度 */
    }

    .game-wrapper {
        padding-bottom: 177.78%; /* 16:9 的反比例，确保竖屏时游戏区域足够高 */
        margin: 0; /* 移除边距 */
        border-radius: 0;
        box-shadow: none;
        position: relative;
        overflow: hidden;
    }

    .game-iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

    .game-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.5);
        padding: 0.5rem;
        display: flex;
        justify-content: center;
        gap: 1rem;
        z-index: 100;
    }

    .fullscreen-btn {
        background-color: #8B0000; /* 深红色按钮 */
        color: white;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
        min-height: 44px; /* 确保触摸区域足够大 */
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .game-wrapper {
        padding-bottom: 56.25%; /* 恢复16:9比例 */
        max-height: 100vh;
        width: 100%;
        margin: 0;
    }

    .game-controls {
        position: absolute; /* 改为绝对定位 */
        bottom: 0;
    }
}

/* 针对iPhone刘海屏的安全区域适配 */
@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .game-controls {
            padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
        }
    }
}

/* 优化触摸体验 */
@media (hover: none) and (pointer: coarse) {
    .fullscreen-btn {
        -webkit-tap-highlight-color: transparent;
    }

    .fullscreen-btn:active {
        opacity: 0.8;
    }
}

/* About Section Images */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.image-grid {
    display: grid;
    gap: 1.5rem;
}

.about-image, .gameplay-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.about-image:hover, .gameplay-image:hover {
    transform: translateY(-5px);
}

/* How to Play Section Images */
.gameplay-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .about-content, .gameplay-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .image-grid {
        gap: 1rem;
        grid-template-columns: 1fr 1fr; /* 在中等屏幕上并排显示图片 */
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr; /* 在小屏幕上单列显示图片 */
    }

    .about-image, .gameplay-image {
        margin-bottom: 1rem;
    }
}

/* 图片加载动画 */
.about-image, .gameplay-image {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

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

/* 图片加载优化 */
.about-image, .gameplay-image {
    loading: lazy;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
}

/* 游戏导航样式 */
.game-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.game-nav-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.game-nav-btn.active {
    background: linear-gradient(135deg, #8B0000, #ff3333);
    color: white;
}

.game-nav-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .game-nav {
        padding: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    .game-nav::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .game-nav-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .game-nav-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}


.header__menu-toggle {
    position: fixed; /* 固定定位 */
    top: 10px; /* 距离顶部距离 */
    right: 10px; /* 距离右侧距离 */
    z-index: 1001;
    width: 44px; /* 增加触摸区域 */
    height: 44px;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5); /* 半透明背景 */
    border-radius: 50%; /* 圆形按钮 */
    backdrop-filter: blur(5px); /* 毛玻璃效果 */
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    left: 0;
    transition: all 0.3s ease;
}

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

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

/* 汉堡菜单激活状态 */
.header__menu-toggle.active .hamburger {
    background: transparent;
}

.header__menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.header__menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .header__container {
        padding: 0 60px 0 1rem; /* 为右侧汉堡按钮留出空间 */
    }

    .header__menu-toggle {
        display: flex; /* 显示汉堡按钮 */
    }

    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--secondary-color);
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .header__nav.active {
        right: 0;
        padding-top: 80px;
    }

    .header__nav-list {
        flex-direction: column;
        gap: 1.5rem;
    }

    .header__nav-link {
        display: block;
        padding: 0.8rem 0;
        font-size: 1.1rem;
    }
}

/* 添加遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

@media (hover: none) and (pointer: coarse) {
    .header__menu-toggle {
        -webkit-tap-highlight-color: transparent;
    }

    .header__menu-toggle:active {
        opacity: 0.8;
    }
}

/* 游戏推荐区域样式 */
.game-recommendations {
    background: var(--secondary-color);
    padding: 2rem 0;
}

.recommendations-title {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.game-card__image {
    position: relative;
    padding-top: 56.25%; /* 16:9 比例 */
    overflow: hidden;
}

.game-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-card__image img {
    transform: scale(1.05);
}

.game-card__title {
    color: var(--text-color);
    padding: 1rem;
    font-size: 1rem;
    text-align: center;
    font-weight: 500;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .game-recommendations {
        padding: 1.5rem 0;
    }

    .game-cards {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
    }

    .recommendations-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

/* 加载动画 */
.game-card {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

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

/* 图片加载优化 */
.game-card__image img {
    loading: lazy;
}