/* 链接状态优化（遵循LVHA顺序）[5](@ref) */
a {
    text-decoration: none;
    color: inherit;
}

a:link,
a:visited {
    color: inherit;
}

a:hover {
    color: #D1FE17;
}

a:active {
    color: #b8e000;
}

body,
h1,
h2,
h5,
h3,
h4,
li,
ol,
p,
ul {
    margin: 0;
    padding: 0;
}

/* 基础变量和重置 */
:root {
    --base-unit: 8px;
    --primary-color: #638331;
    --accent-color: #D1FE17;
    --text-color: #F9FAFF;
}

@font-face {
    font-family: 'lunsisdemo';
    src: url('../fonts/luneisdemo-1jxlz.ttf') format('opentype');
    font-style: normal;
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #638331;
    font-family: 'Nunito', 'Nunito Fallback', sans-serif;
    font-style: normal;
    color: #F9FAFF;
    line-height: 1.6;
}

.detail-banner-ad {
    text-align: center;
    margin: 10px 0;
    font-size: 12px;
}

/* 主容器响应式设计 */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 游戏列表网格布局优化 */
.game-list {
    background: #c0cdaa;
    margin: 20px 0;
    width: 100%;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    padding: 16px;
    box-sizing: border-box;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .game-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 7px;
        margin: 10px;
        width: calc(100% - 20px);
    }
}

/* 平板端优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .game-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

/* PC端大屏幕优化 */
@media (min-width: 1025px) {
    .game-list {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 20px;
        padding: 24px;
    }
}

/* Logo容器样式 */
.header {
    background: #638331 top right repeat-x;
    background-image: url("../img/tempa/hbg2.svg"), url("../img/tempa/hbg3.svg"), url("../img/tempa/hbg4.svg");
    background-size: auto 100%;
    z-index: 500;
    background-position-x: 115%;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    /* 增加高度适应PC端 */
    display: flex;
    align-items: center;
    position: relative;
}

/* Logo文字样式 */
.logo {
    font-family: 'lunsisdemo';
    font-size: 2rem;
    font-weight: 700;
    color: #F9FAFF;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.logo:hover {
    color: #D1FE17;
    transform: scale(1.05);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

/* 移动端Logo调整 */
@media (max-width: 768px) {
    .header {
        height: 60px;
    }

    .logo {
        font-size: 1.5rem;
        padding: 6px 12px;
    }
}

/* 游戏卡片响应式设计 */
.game-card {
    position: relative;
    min-width: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 图片容器优化 */
.game-card a {
    display: block;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.game-icon {
    width: 100%;
    height: 160px;
    /* 固定高度适应PC端 */
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

/* 标题样式优化 */
.game-title {
    background: #ffffff;
    color: #000000;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    padding: 12px;
    box-sizing: border-box;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

/* 移动端游戏卡片调整 */
@media (max-width: 768px) {
    .game-icon {
        height: 120px;
    }

    .game-title {
        font-size: 14px;
        padding: 8px;
    }
}

/* 主内容区域优化 */
.main {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* 广告区域响应式 */
.banner-ad {}

/* 加载更多按钮优化 */
.more-games-btn {
    background-color: #59b164;
    color: white;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
}

.more-games-btn:hover {
    background-color: #4a9a54;
    transform: translateY(-2px);
}

/* 页脚响应式设计 */
.footer_main {
    width: 100%;
    font-size: 1rem;
    color: #e6f1ff;
    margin-top: 40px;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.1);
}

.footer_content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.foot_pd {
    padding: 0.8rem 1rem;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.foot_pd:hover {
    color: #D1FE17;
}

/* 移动端页脚调整 */
@media (max-width: 768px) {
    .footer_content {
        gap: 10px;
    }

    .foot_pd {
        padding: 0.4rem 0.8rem;
    }
}

.play_game {
    width: 100%;
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    background-color: #cccccc;
    z-index: 9999;
}

.left_back {
    width: 65px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.3);
    position: fixed;
    border-radius: 0 50% 50% 0;
    top: 80px;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
}

.left_back_image {
    width: 50px;
    height: 50px;
    margin-right: -20%;
    border-radius: 50%;
}