/* 主要样式 */
body, html {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: #0a5e81;
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
.site-header {
    background-color: #0a5e81;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
    margin-right: 20px;
}

.logo {
    font-size: 12px;
    font-weight: bold;
    color: #ffcc00;
    background-color: #0a5e81;
    border-radius: 5px;
}

.main-nav ul {
    display: flex;
    gap: 15px;
}

.nav-item {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item i {
    font-size: 16px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-container {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.search-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    padding: 5px 10px;
    color: white;
    width: 200px;
}

.search-button {
    background-color: #ffcc00;
    color: #0a5e81;
    border-radius: 3px;
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
}

/* 主内容区域 */
.site-content {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    box-sizing: border-box;
}

/* 特色游戏区域 */
.featured-game {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.game-preview {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.game-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    height: auto;
    display: block;
}

.play-button {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    color: #0a5e81;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.play-button:hover {
    background-color: white;
}

.game-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 广告横幅 */
.ad-banner {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 推荐游戏区域 */
.recommended-games {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 15px;
}

.recommended-games h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.games-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    box-sizing: border-box;
}

.games-row {
    gap: 10px;
    padding-bottom: 5px;
    overflow-x: auto;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
}

.ad-banner {
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
}

.game-preview {
    height: 250px;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
}

/* 页脚 */
.site-footer {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    text-align: center;
    font-size: 12px;
}

.footer-links, .footer-info {
    margin: 5px 0;
}

.footer-links a, .footer-info a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover, .footer-info a:hover {
    color: white;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .site-content {
        grid-template-columns: 2fr 1fr;
        grid-template-areas:
            "games featured"
            "banner banner"
            "recommended recommended";
    }

    .games-grid {
        grid-area: games;
    }

    .featured-game {
        grid-area: featured;
    }

    .ad-banner {
        grid-area: banner;
    }

    .recommended-games {
        grid-area: recommended;
    }
}

/* 添加移动端适配 */
@media (max-width: 767px) {
    /* 移动端导航菜单样式 */
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
    
    .main-nav.active {
        display: block;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        background-color: #0a5e81;
        z-index: 100;
        padding: 10px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }
    
    .main-nav.active ul {
        flex-direction: column;
        gap: 10px;
    }
    
    /* 移动端内容区域样式 */
    .site-content {
        grid-template-columns: 1fr;
        grid-template-areas:
            "games"
            "featured"
            "banner"
            "recommended";
        padding: 10px;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .game-preview {
        height: 250px;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .games-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding-bottom: 5px;
        overflow-x: auto;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .search-input {
        width: 150px;
    }
    
    #gamesContainer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

.site-content,
.games-row,
.ad-banner,
.game-preview {
    box-sizing: border-box;
}

.game-preview img,
.recommended-game-image img,
.game-card-image img,
.ad-banner img {
    max-width: 100%;
    height: auto;
    display: block;
}