/* --- 全局 & 基础样式 --- */
*, *::before, *::after {
    box-sizing: border-box; 
}
body, html { 
    margin: 0; 
    padding: 0; 
    font-family: 'Helvetica Neue', Arial, sans-serif; 
    background-color: #000; 
    color: #ffffff; 
}
a { 
    text-decoration: none; 
}

/* --- 核心布局容器 --- */
.page-wrapper { 
    max-width: 600px; 
    margin: 0 auto; 
    background-color: #111111; 
    padding-top: 55px; /* 为固定header留出空间 */
    padding-bottom: 65px; /* 为固定footer留出空间 */
    box-shadow: 0 0 25px rgba(247, 142, 33, 0.1); 
    position: relative;
    overflow-x: hidden; /* 防止页面横向滚动 */
}
.container { 
    padding: 0 15px; 
}

/* --- 顶部导航栏样式 --- */
.top-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 8px 15px; 
    background-color: #0D131C; 
    border-bottom: 1px solid #333; 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    z-index: 1030; 
    max-width: 600px; 
    margin: 0 auto; 
}
.top-header .top-menu img, 
.top-header .lang-btn img { 
    width: 28px; 
}
.top-header .top-logo { 
    position: absolute; 
    left: 50%; 
    transform: translateX(-50%); 
}
.top-header .top-logo img { 
    height: 35px; 
}
.top-header .qr-code a { 
    color: #fff; 
    font-size: 20px; 
}
.dropdown-menu { 
    background-color: #222; 
    border: 1px solid #444; 
}
.dropdown-item { 
    color: #fff; 
}
.dropdown-item:hover { 
    background-color: #F78E21; 
    color: #111; 
}

/* --- Swiper轮播图样式 --- */
.swiper-container { 
    width: 100%; 
    position: relative; 
}
.swiper-slide { 
    width: 100%;
}
.swiper-slide img { 
    display: block; 
    width: 100%; 
    height: auto;
}
.swiper-pagination { 
    position: absolute; 
    bottom: 10px !important; 
    left: 50% !important; 
    transform: translateX(-50%) !important; 
    width: auto !important; 
}
.swiper-pagination-bullet { 
    background: #fff !important; 
    opacity: 0.7; 
}
.swiper-pagination-bullet-active { 
    background: #F78E21 !important; 
    opacity: 1; 
}

/* --- Index-Box & 公告栏样式 --- */
.index-box { 
    background-color: #111; 
}
.announce-wrap { 
    display: flex; 
    align-items: center; 
    background-color: #2A2A2A; 
    padding: 8px 15px; 
    border-top: 1px solid #444; 
    border-bottom: 1px solid #444; 
}
.ann-icon { 
    margin-right: 10px; 
    color: #CCCCCC; 
    font-size: 18px; 
}
.ann-bar { 
    flex-grow: 1; 
    overflow: hidden; 
}
.ann-bar marquee { 
    color: #CCCCCC; 
    font-size: 13px; 
}
.index-btm-box { 
    padding: 10px 5px; 
}
.index-login-btn { 
    display: block; 
    width: 100%; 
    text-align: center; 
    padding: 12px; 
    font-size: 18px; 
    font-weight: bold; 
    color: #fff; 
    background: linear-gradient(45deg, #FFB800, #F78E21); 
    border-radius: 8px; 
    margin-bottom: 10px; 
}
.index-link { 
    display: flex; 
    justify-content: space-around; 
    text-align: center; 
}
.index-link a { 
    color: #ddd; 
}
.index-link a img { 
    width: 45px; 
    margin-bottom: 5px; 
}
.index-link a span { 
    font-size: 13px; 
}

/* --- Menu-Tab 模块样式 --- */
.content-section { 
    padding: 20px 0; 
}
.menu-tab { 
    display: flex; 
    align-items: flex-start; 
    gap: 13px; 
}
.menu-list { 
    flex: 0 0 80px; /* 固定左侧菜单宽度 */
    display: flex; 
    flex-direction: column; 
    background-color: #1a1a1a; 
    border-radius: 10px; 
    padding: 10px 0; 
}
.nav-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    color: #aaa; 
    padding: 12px 5px; 
    transition: all 0.3s ease; 
    cursor: pointer; 
    border-left: 3px solid transparent; 
}
.nav-item img { 
    width: 28px; 
    height: 28px; 
    margin-bottom: 6px; 
    filter: grayscale(80%); 
}
.nav-item span { 
    font-size: 11px; 
    line-height: 1.2; 
}
.nav-item:hover { 
    background-color: #222; 
}
.nav-item.active { 
    background-color: #252525; 
    border-left-color: #F78E21; 
}
.nav-item.active img { 
    filter: grayscale(0%); 
}
.nav-item.active span { 
    color: #F78E21; 
    font-weight: bold; 
}
.menu-content { 
    flex-grow: 1; /* 让内容区域填充剩余空间 */
}

/* START: 调整后的 .game-grid 和 .menu-prod 样式以匹配图片 */
.game-grid { 
    display: grid; 
    /* 强制4列布局，每列宽度相等 */
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; /* 图标之间的间距 */
    align-items: start; /* 确保网格项顶部对齐 */
}
.menu-prod { 
    background-color: #222; 
    border-radius: 10px; 
    transition: all 0.3s ease; 
    border: 1px solid #333; 
    overflow: hidden; 
    position: relative; 
    
    /* 关键：设置固定的宽高比，匹配图片中的卡片形状（估算为3宽比4高） */
    aspect-ratio: 3 / 4; 
}
.menu-prod:hover { 
    transform: translateY(-5px); 
    border-color: #F78E21; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.4); 
}
.menu-prod a { 
    display: block; 
    width: 100%; /* 确保链接完全填充 menu-prod 的空间 */
    height: 100%; /* 确保链接完全填充 menu-prod 的空间 */
    padding: 0; /* 移除内边距，让图片紧贴边框 */
}
.menu-prod img { 
    width: 100%; /* 图片宽度填充父容器 (a 标签) */
    height: 100%; /* 图片高度填充父容器 (a 标签) */
    object-fit: cover; /* 裁剪图片以填充，保持纵横比，避免留白 */
    display: block;
    border-radius: 8px; /* 图片的圆角与容器一致 */
}
/* END: 调整后的 .game-grid 和 .menu-prod 样式 */


/* --- 底部固定菜单 --- */
.menu-btm { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background-color: #0D131C; 
    border-top: 1px solid #444; 
    z-index: 1020; 
    padding: 5px 0; 
    max-width: 600px; 
    margin: 0 auto; 
}
.menu-wrapper { 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
}
.menu-wrapper a { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    color: #999; 
    text-align: center; 
    font-size: 11px; 
    padding: 0 5px; 
}
.menu-wrapper a img { 
    width: 26px; 
    height: 26px; 
    margin-bottom: 4px; 
}

/* --- 页脚样式 --- */
footer { 
    background-color: #111; 
    padding: 40px 15px 20px 15px; 
    text-align: center; 
    border-top: 1px solid #222; 
}
.footer-section h3 { 
    font-size: 16px; 
    color: #888; 
    margin-bottom: 20px; 
    text-transform: uppercase; 
}
.footer-logos { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: center; 
}
.footer-logos img { 
    height: 25px; 
    margin: 5px 8px; 
    opacity: 0.7; 
}
.footer-disclaimer {
    margin-top: 30px;
}
.footer-disclaimer p {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* 响应式调整：在非常小的屏幕上切换到3列 */
@media (max-width: 420px) { /* 当屏幕宽度小于420px时应用 */
    .game-grid {
        grid-template-columns: repeat(3, 1fr); /* 切换到3列 */
        gap: 8px; /* 适当减小间距 */
    }
    .menu-prod {
        /* 在3列布局下，卡片可能需要略微调整宽高比以保持视觉平衡 */
        aspect-ratio: 4 / 5; /* 略微调整为4宽比5高，使其在较窄的列中不至于太扁 */
    }
}