/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "Consolas", sans-serif;
}

/* 容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 通用标题样式 */
.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 50px;
    color: #222;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #ff6b35;
    margin: 15px auto 0;
}

/* 导航栏样式 */
.header {
    background-color: #1a1a2e;
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 个人头像样式 */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ff6b35;
    object-fit: cover;
}

.logo a {
    color: #fff;
    font-size: 28px;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 2px;
}

.logo a:hover {
    color: #ff6b35;
}

.nav ul {
    list-style: none;
    display: flex;
}

.nav ul li {
    margin-left: 30px;
}

.nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.nav ul li a.active,
.nav ul li a:hover {
    color: #ff6b35;
    border-bottom: 2px solid #ff6b35;
}

/* Banner区域样式 */
.banner {
    background: linear-gradient(rgba(26, 26, 46, 0.8), rgba(26, 26, 46, 0.8)), url('../images/banner.jpg');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    color: #fff;
    text-align: center;
}

.banner h1 {
    font-size: 60px;
    margin-bottom: 20px;
    color: #ff6b35;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.banner p {
    font-size: 22px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    background-color: #ff6b35;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #e05a28;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 关于我区域 */
.about {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    text-align: center;
}

.about-content p {
    margin-bottom: 20px;
}

/* 游戏列表区（主页） */
.games {
    padding: 80px 0;
    background-color: #1a1a2e;
    color: #fff;
}

.games .section-title {
    color: #fff;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.game-card {
    background-color: #252540;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.game-img {
    position: relative;
    overflow: hidden;
}

.game-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-card:hover .game-img img {
    transform: scale(1.1);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.game-img:hover .game-overlay {
    opacity: 1;
}

.play-btn {
    background-color: #ff6b35;
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.play-btn:hover {
    background-color: #e05a28;
}

.game-info {
    padding: 20px;
}

.game-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #ff6b35;
}

.game-info p {
    color: #ccc;
    line-height: 1.6;
}

/* 联系我区域 */
.contact {
    padding: 80px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.contact-text {
    font-size: 18px;
    margin-bottom: 30px;
    color: #555;
}

.contact-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.contact-icons a {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s;
}

.contact-icons a i {
    font-size: 24px;
    margin-right: 10px;
    color: #ff6b35;
}

.contact-icons a:hover {
    color: #ff6b35;
}

/* 游戏试玩页核心样式（重构布局） */
.game-play {
    padding: 50px 0;
    background-color: #f5f5f5;
    min-height: calc(100vh - 130px);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.game-header h1 {
    font-size: 36px;
    color: #1a1a2e;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    background-color: #1a1a2e;
    color: #fff;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.back-btn i {
    margin-right: 8px;
}

.back-btn:hover {
    background-color: #ff6b35;
}

/* 游戏运行区域：独占整行，宽度100% */
.game-container {
    width: 100%;
    margin-bottom: 40px; /* 和说明区域拉开间距 */
}

.game-frame {
    width: 100%;
    height: 600px; /* 固定高度，保证游戏完整显示 */
    background-color: #111;
    border-radius: 5px;
    overflow: hidden; /* 防止游戏内容溢出 */
}

.game-frame iframe {
    width: 100%;
    height: 100%;
}

/* 游戏说明区域：单独占一行 */
.game-desc-wrap {
    width: 100%;
    display: grid;
    gap: 30px;
}

.game-desc {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.game-desc h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #1a1a2e;
}

.game-desc h4 {
    font-size: 20px;
    margin: 20px 0 10px;
    color: #ff6b35;
}

.game-desc p {
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
}

.game-desc ul {
    list-style: none;
}

.game-desc ul li {
    padding: 8px 0;
    color: #555;
    border-bottom: 1px dashed #eee;
}

/* 游戏反馈区域 */
.game-feedback {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.game-feedback h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #1a1a2e;
}

.game-feedback p {
    margin-bottom: 20px;
    color: #555;
}

.game-feedback textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-size: 16px;
    margin-bottom: 20px;
}

.submit-btn {
    background-color: #ff6b35;
    color: #fff;
    border: none;
    padding: 10px 30px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #e05a28;
}

/* 页脚样式 */
.footer {
    background-color: #1a1a2e;
    color: #ccc;
    padding: 30px 0;
    text-align: center;
}

.icp-record {
    margin-top: 10px;
    font-size: 14px;
    color: #999;
}

.icp-record a {
    color: #999;
    text-decoration: none;
}

.icp-record a:hover {
    color: #ff6b35;
    text-decoration: underline;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .game-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .banner h1 {
        font-size: 48px;
    }
    
    .banner {
        height: 450px;
    }

    /* 游戏试玩页适配 */
    .game-frame {
        height: 450px; /* 平板端游戏高度适配 */
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }
    
    .nav ul li {
        margin: 0 10px;
        margin-top: 10px;
    }
    
    .banner {
        height: 400px;
        padding: 0 20px;
    }
    
    .banner h1 {
        font-size: 36px;
    }
    
    .banner p {
        font-size: 18px;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-img img {
        height: 180px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .about, .games, .contact {
        padding: 50px 0;
    }
    
    .avatar {
        width: 35px;
        height: 35px;
    }
    
    .logo a {
        font-size: 24px;
    }

    /* 游戏试玩页手机适配 */
    .game-frame {
        height: 350px; /* 手机端游戏高度适配 */
    }
    
    .game-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .banner h1 {
        font-size: 28px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .game-img img {
        height: 160px;
    }
    
    .game-info h3 {
        font-size: 20px;
    }
    
    .game-info p {
        font-size: 14px;
    }

    /* 小手机游戏高度适配 */
    .game-frame {
        height: 280px;
    }
}