/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* -- Dark Theme with Colorful Accents -- */
    /* 基本颜色定义 */
    --colorful-bg-main: #121212;          /* 主背景: 柔和的黑色 */
    --colorful-bg-section: #1A1A1A;      /* 区块背景: 比主背景稍亮的深灰色 */
    --colorful-text-dark: #EAEAEA;       /* 主要文字颜色: 浅灰色/米白色，用于深色背景 */
    --colorful-text-light: #FFFFFF;      /* 浅色文字: 纯白色，用于彩色强调背景或特别需要高对比度的地方 */

    /* 多彩强调色系列 - 五颜六色 (这些保持不变，作为点缀) */
    --colorful-accent-red: #E74C3C;       /* 强调色1: 红色 (Pomegranate) */
    --colorful-accent-orange: #F39C12;    /* 强调色2: 橙色 (Orange) */
    --colorful-accent-yellow: #F1C40F;    /* 强调色3: 黄色 (Sun Flower) */
    --colorful-accent-green: #2ECC71;     /* 强调色4: 绿色 (Emerald) */
    --colorful-accent-blue: #3498DB;      /* 强调色5: 蓝色 (Peter River) */
    --colorful-accent-purple: #9B59B6;    /* 强调色6: 紫色 (Amethyst) */

    /* 边框和阴影 */
    --colorful-border: #2A3B4D;          /* 边框: 深色主题的微妙边框 */
    --colorful-shadow: rgba(200, 220, 255, 0.05);/* 阴影: 深色主题下的微妙光晕效果 */

    /* -- Mapping existing theme variables to the new dark theme with colorful accents -- */
    /* Backgrounds */
    --theme-black: var(--colorful-bg-main);       /* 主背景替换原来的黑色 */
    --theme-dark-blue: var(--colorful-bg-section); /* 区块背景替换原来的深蓝色 */

    /* Text */
    --theme-text-on-dark: var(--colorful-text-dark);    /* 在浅色背景上的深色文字 (原变量名有点误导，现在修正其用途) */
    /* --theme-text-on-light: var(--colorful-text-light); /* 如果有专门在深色组件上用浅色文字的变量，则用这个 */
    /* For now, assuming most text will be dark on light backgrounds */

    /* Accents - We will map the primary ones and others can be used directly or cycled */
    --theme-accent-blue: var(--colorful-accent-blue);         /* 主要强调色 - 使用新的彩色蓝 */
    --theme-accent-blue-hover: var(--colorful-accent-orange); /* 主要强调色的悬停 - 使用新的彩色橙 */

    /* Borders */
    --theme-border-dark: var(--colorful-border);         /* 边框颜色 */

    /* Shadows */
    --theme-shadow-dark: var(--colorful-shadow); /* 阴影颜色 */

    /* -- Mapping old direct variable usage (these were from the old theme) -- */
    /* It's better to update components to use the new --colorful-accent-* directly where possible */
    --bg-main-yellow: var(--theme-black); /* Re-map to new main background */
    --bg-section-green: var(--theme-dark-blue); /* Re-map to new section background */

    --text-dark-on-light: var(--theme-text-on-dark); /* Default text color */
    --text-light-on-dark: var(--theme-text-on-dark); /* Text on components that might have had dark bg; now they have light bg, so text is dark */

    --accent-bright-yellow: var(--colorful-accent-yellow); /* Example: map to colorful yellow */
    --accent-vibrant-green: var(--colorful-accent-green);  /* Example: map to colorful green */

    --border-color-soft: var(--theme-border-dark);
    --shadow-color-general: var(--theme-shadow-dark);

    --primary-purple: var(--colorful-accent-purple); /* Example: map to colorful purple */
    --secondary-purple: var(--colorful-accent-red);  /* Example: map to colorful red for variety */
    --primary-black: var(--colorful-text-dark); /* Was text, now should be text color */
    --secondary-black: var(--colorful-text-dark); /* Was text, now should be text color */
    --highlight-purple: var(--primary-purple); /* Alias */
    --text-light: var(--colorful-text-light); /* Text for use on colorful/darker accents */
    --text-dark: var(--colorful-text-dark);   /* Default dark text */
    --background-dark: var(--colorful-bg-section); /* Old dark bg var, map to new section bg */
    --background-deep: var(--colorful-bg-section); /* Old deeper bg var, map to new section bg */
}

header, #main-header {
    position: fixed; /* 悬浮在页面顶部 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000; /* 确保header在遮罩层之上 */
    /* 保持原有样式 */
}

body {
    /* 移除为header预留的padding-top，让header紧贴页面最顶部 */
    font-family: 'Arial', sans-serif; /* 字体：Arial 或无衬线字体 */
    line-height: 1.6; /*行高 */
    color: var(--text-dark-on-light); /* 文字颜色：将使用新的 --theme-text-on-dark */
    
    /* 新的背景样式 */
    background-clip: border-box;
    background-color: rgb(131, 255, 231);
    background-image: url('../images/bg-diamante.svg');
    background-origin: padding-box;
    background-position: 50% 50%;
    background-repeat: repeat;
    background-size: max(624px, 100%);
}

/* Header Styles */
/* 头部样式 */
header {
    background: #6971d5; /* 指定的背景颜色 */
    border-bottom: 1px solid rgba(131, 255, 231, 0.2); /* 与背景同色系的边框 */
    color: rgba(255, 255, 255, 0.95); /* 高对比度白色文字 */
    padding: 1rem; /* 内边距 */
    display: flex; /* 使用flex布局 */
    justify-content: space-between; /* 两端对齐 */
    align-items: center; /* 垂直居中 */
    box-shadow: 0 2px 10px var(--shadow-color-general); /* 阴影效果 */
}

.logo-container {
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中 */
}

.retro-logo {
    font-family: 'Press Start 2P', cursive; /* Logo字体 */
    font-size: 2rem; /* Logo字号 */
    color: var(--colorful-accent-yellow); /* Logo用一个明亮的强调色 */
    text-shadow: 1px 1px 0 rgba(0,0,0,0.7); /* 黑色文字阴影 */
    letter-spacing: 2px; /* 字间距 */
}

.language-selector {
    display: flex; /* 使用flex布局 */
    gap: 0.5rem; /* 元素间距 */
}

.lang-btn {
    background-color: var(--colorful-accent-blue); /* 按钮背景用彩色强调色 */
    color: var(--colorful-text-light); /* 按钮文字用纯白色 */
    border: 1px solid var(--colorful-accent-blue); /* 边框颜色与背景一致，或用 --colorful-border */
    padding: 0.5rem 1rem; /* 内边距 */
    border-radius: 4px; /* 圆角 */
    cursor: pointer; /* 鼠标指针：手型 */
    transition: all 0.3s; /* 过渡效果 */
}

.lang-btn:hover, .lang-btn.active {
    background-color: var(--colorful-accent-orange); /* 悬停/激活背景用另一种彩色 */
    color: var(--colorful-text-light); /* 文字保持纯白色 */
    border-color: var(--colorful-accent-orange);
    transform: translateY(-2px); /* 轻微上移 */
}

/* Main Content Layout */
/* 主内容布局 */
main {
    /* 解决header悬浮遮挡内容问题，给main加上与header高度一致的上外边距 */
    margin-top: 120px; /* 70px为header大致高度，如有调整请同步修改 */
    display: grid; /* 使用Grid布局 */
    /* 定义网格区域的名称，方便布局 */
    grid-template-areas:
        "top top top"
        "left main-content right"
        "bottom bottom bottom";
    /* 定义列宽：两侧区域显著更宽(各8fr)，中间区域更窄(1fr) */
    grid-template-columns: 1fr 4fr 1fr !important;
    /* 定义行高：顶部和底部高度自动，中间区域占据剩余空间 */
    grid-template-rows: auto 1fr auto; 
    gap: 1rem !important;
    padding: 1rem; /* 内边距 */
    max-width: 100%; /* 最大宽度占满父容器 */
    min-height: calc(100vh - 70px - 2rem); /* 最小高度，大约为视口高度减去header高度和padding (假设header约70px) */
    margin: 70px auto 0 auto; /* 水平居中 */
    background: none; /* 无背景色（由body控制） */
}

/* Left Sidebar - Game Links */
/* 左侧边栏 - 游戏链接 */
.game-links {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(131, 255, 231, 0.3);
    padding: 1rem; /* 内边距 */
    border-radius: 12px; /* 增大圆角 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px var(--shadow-color-general); /* 阴影 */
    border: 1px solid var(--colorful-border);
    font-family: 'Poppins', Arial, sans-serif; /* 字体 */
    font-size: 1rem; /* 字号 */
}

.game-links h2 {
    color: var(--colorful-accent-purple);
    margin-bottom: 1rem; /* 下外边距 */
    font-size: 1.2rem; /* 标题字号 */
    border-bottom: 2px solid var(--colorful-accent-purple);
    padding-bottom: 0.5rem; /* 下内边距 */
}

.game-links ul {
    list-style: none; /* 无列表样式 */
    padding-left: 0; /* 左内边距 */
}

.game-links li {
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中 */
    margin-bottom: 0.3rem; /* 下外边距 */
}

.game-links a {
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中 */
    gap: 0.7em; /* 图标与文字间距 */
    font-size: 1.05rem; /* 字号 */
    font-weight: 500; /* 字重 */
    padding: 0.45rem 0.7rem; /* 内边距 */
    border-radius: 6px; /* 圆角 */
    transition: background 0.2s, color 0.2s, transform 0.2s; /* 过渡效果 */
    letter-spacing: 0.01em; /* 字间距 */
    color: var(--colorful-text-dark); /* 链接文字颜色为浅色 */
    text-decoration: none; /* 无下划线 */
}

.game-links a:hover {
    background-color: var(--colorful-accent-green);
    color: var(--colorful-text-light);
    transform: translateX(6px) scale(1.04); /* 悬停效果：右移并放大 */
}

.game-links hr {
    border: 0; /* 无边框 */
    border-top: 1.5px solid var(--colorful-border); /* 顶部边框：柔和的灰色边框 */
    margin: 0.7rem 0; /* 上下外边距 */
}

.game-links a {
    font-family: 'Poppins', 'Segoe UI Emoji', 'Segoe UI Symbol', Arial, sans-serif; /* 链接字体 */
}

/* Main Game Section */
/* 主游戏区域 */
.main-game {
    grid-area: main-content; /* 指定该元素在网格中的位置为 'main-content' */
    background-color: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    border: 1px solid rgba(131, 255, 231, 0.3); /* 与背景同色系的边框 */
    border-radius: 12px; /* 增大圆角 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); /* 柔和阴影 */
    overflow: hidden; /* 隐藏溢出内容 */
    border: 1px solid var(--colorful-border); /* 边框 */
    display: flex; /* 使用flex布局，使其子元素（game-container, game-info）能更好控制 */
    flex-direction: column; /* flex子元素垂直排列 */
}

.game-container {
    position: relative; /* 相对定位 */
    width: 100%; /* 宽度100% */
    height: 600px; /* 高度600px */
    z-index: 1; /* 设置较低的z-index，确保下拉框能在其上方 */
}

.game-container iframe {
    width: 100%; /* 宽度100% */
    height: 100%; /* 高度100% */
    border: none; /* 无边框 */
}

.fullscreen-btn {
    position: absolute; /* 绝对定位 */
    bottom: 1rem; /* 距底部1rem */
    right: 1rem; /* 距右侧1rem */
    background-color: var(--colorful-accent-red);
    color: var(--colorful-text-light);
    border: 1px solid var(--colorful-accent-red);
    padding: 0.5rem 1rem; /* 内边距 */
    border-radius: 4px; /* 圆角 */
    cursor: pointer; /* 鼠标指针：手型 */
    transition: all 0.3s; /* 过渡效果 */
}

.fullscreen-btn:hover {
    background-color: var(--colorful-accent-orange);
    color: var(--colorful-text-light);
    border-color: var(--colorful-accent-orange);
    transform: translateY(-2px); /* 轻微上移 */
}

/* Game Information Section */
/* 游戏信息区域 */

/* 首屏专用区域：只在首屏时显示 */
.homepage-only {
    display: block;
}

/* 非首屏状态：隐藏首屏专用区域 */
.game-specific .homepage-only {
    display: none;
}

.game-info {
    padding: 1rem; /* 内边距 */
}

.game-info h2 {
    color: var(--colorful-accent-blue);
    margin-bottom: 1rem; /* 下外边距 */
    border-bottom: 2px solid var(--colorful-accent-blue);
    padding-bottom: 0.5rem; /* 下内边距 */
}


/* 针对 .game-features, .how-to-play 等内容区块的统一样式调整将在此文件下方进行 */
/* 旧的 .game-features, .how-to-play 等区块样式会被下方更具体的规则覆盖 */

.review {
    /* 样式将在下方 "自动检测背景色并适配文字颜色" 部分（已重构）中定义 */
    margin-bottom: 1rem; /* 评论区下外边距 */
}

.review p {
    font-style: italic; /* 斜体 */
    margin-bottom: 0.5rem; /* 段落下外边距 */
}

.review span {
    /* 颜色将在下方定义 */
    font-size: 0.9rem; /* 评论者名称字号 */
}

.faq-item {
    /* 样式将在下方 "自动检测背景色并适配文字颜色" 部分（已重构）中定义 */
    margin-bottom: 1rem; /* FAQ项下外边距 */
}

.faq-item h4 {
    /* 颜色将在下方定义 */
    margin-bottom: 0.5rem; /* FAQ问题下外边距 */
}


/* Right Sidebar - Mini Games */
/* 右侧边栏 - 小游戏列表 */
.mini-games {
    background-color: rgba(255, 255, 255, 0.85); /* 半透明白色背景 */
    backdrop-filter: blur(8px);
    border: 1px solid rgba(131, 255, 231, 0.3);
    padding: 1rem; /* 内边距 */
    border-radius: 12px; /* 增大圆角 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px var(--shadow-color-general); /* 阴影 */
    border: 1px solid var(--colorful-border); /* 边框 */
}

.mini-games h2 {
    font-size: 1.5em; /* 标题字号 */
    margin-bottom: 15px; /* 下外边距 */
    color: var(--colorful-accent-purple); /* 标题颜色：彩色 */
    text-align: center; /* 文本居中 */
}

.mini-game-grid {
    display: grid; /* 使用Grid布局 */
    grid-template-columns: 1fr; /* 单列 */
    gap: 10px; /* 网格间距 */
}

/* General style for each small game item */
.mini-game {
    border-radius: 20px; /* 容器的圆角，8px看起来不错 */
    overflow: hidden; /* 这很关键，确保图片和标题覆盖层都遵守容器的圆角 */
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: rgba(255, 255, 255, 0.9); /* 小游戏半透明白色背景 */
    backdrop-filter: blur(6px);
    border: 1px solid rgba(131, 255, 231, 0.2);
    position: relative; /* 必须为relative，以便标题可以绝对定位于其内部 */
    aspect-ratio: 1 / 1; /* 默认使整个游戏项成为正方形 */
    display: flex; /* 使用flex确保内容结构 */
    flex-direction: column; /* 列方向排列（虽然标题是绝对定位的） */
    box-shadow: 0 2px 5px var(--colorful-shadow); /* 统一阴影 */
}

.mini-game:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow-color-general); /* 使用主题阴影变量 */
}

/* Game cover area within each mini-game */
.mini-game .game-cover {
    width: 100%;
    height: 100%; /* 新增/修改：使封面区域完全填充父容器（现在是正方形的.mini-game）*/
    position: relative; /* 确保图片在标题下方 */
    overflow: hidden; /* 再次确保图片被裁剪 */
}

/* General style for the image within the game cover */
.mini-game .game-cover img {
    display: block;
    width: 100%;
    height: 100%; /* 图片完全填充 .game-cover 区域 */
    object-fit: cover; /* 保持图片宽高比，覆盖并裁剪以填充容器 */
}

/* General style for the game title, styled as an overlay */
.mini-game .game-title {
    position: absolute; /* 绝对定位，覆盖在图片底部 */
    bottom: 0;
    left: 0;
    right: 0; /* 横向铺满父容器 (.mini-game) */
    color: #FFFFFF; /* 标题文字强制白色 */
    padding: 6px 10px; /* 调整内边距使文字更舒适 */
    text-align: center;
    font-size: 0.85em; /* 轻微调整字体大小 */
    font-weight: bold; /* 中等字重 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: none; /* 移除原有的上边框 */
    z-index: 1; /* 确保标题在图片之上 */
}

.mini-game iframe {
    position: absolute; /* 绝对定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0; /* 默认透明 */
    transition: opacity 0.3s ease; /* 透明度过渡 */
    z-index: 2; /* 层级 */
}

.mini-game.active .game-cover {
    opacity: 0; /* 激活时封面透明 */
}

.mini-game.active iframe {
    opacity: 1; /* 激活时iframe不透明 */
}

/* Footer Styles */
/* 页脚样式 */
footer {
    background: rgba(105, 113, 213, 0.8); /* #6971d5半透明背景 */
    border-top: 1px solid rgba(131, 255, 231, 0.2); /* 与背景同色系的边框 */
    color: rgba(255, 255, 255, 0.9); /* 高对比度白色文字 */
    padding: 2rem; /* 内边距 */
    margin-top: 2rem; /* 上外边距 */
}

.footer-content {
    max-width: 1200px; /* 最大宽度 */
    margin: 0 auto; /* 水平居中 */
    display: flex; /* 使用flex布局 */
    align-items: flex-start; /* 顶部对齐 */
    gap: 2rem; /* 减少间距防止溢出 */
    text-align: left; /* 默认左对齐 */
    flex-wrap: wrap; /* 允许换行 */
}

.copyright {
    font-size: 0.9rem; /* 字号 */
}

.copyright a {
    color: var(--colorful-accent-yellow);
    text-decoration: none; /* 无下划线 */
    transition: all 0.3s; /* 过渡 */
}

.copyright a:hover {
    color: var(--colorful-accent-orange);
    text-decoration: underline; /* 悬停显示下划线 */
}

/* ========== Footer 介绍区域样式 ========== */
.footer-intro {
    flex: 1 1 200px; /* 弹性增长和收缩，基础宽度300px */
    max-width: 100%; /* 在小屏幕下可以占满宽度 */
    min-width: 280px; /* 最小宽度 */
}

.footer-intro h3 {
    font-size: 1.3rem;
    color: var(--colorful-accent-yellow); /* 使用醒目的黄色 */
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.footer-intro p {
    font-size: 1rem;
    color: var(--colorful-text-dark);
    line-height: 1.6;
    text-align: left;
}

/* ========== Footer 支持与服务区域样式 ========== */
.footer-links-section {
    display: flex; /* 横向排列两组栏目 */
    justify-content: flex-start; /* 改为左对齐，防止溢出 */
    gap: 1.5rem; /* 进一步减少间距 */
    flex-wrap: wrap; /* 小屏时自动换行 */
    flex: 1 1 300px; /* 弹性增长和收缩，基础宽度400px */
    max-width: 100%; /* 允许占满剩余空间 */
    min-width: 300px; /* 最小宽度确保内容可读 */
}
.footer-links-group {
    min-width: 120px; /* 每组最小宽度 */
    max-width: 250px; /* 减少最大宽度，为左侧介绍区域让出空间 */
    flex: 1; /* 平均分配剩余空间 */
    text-align: left; /* 列内内容左对齐 */
}
.footer-links-group p {
    font-size: 1.1rem;
    color: var(--colorful-accent-orange); /* 标题用主题色 */
    margin-bottom: 0.7rem;
    word-wrap: break-word; /* 长标题自动换行 */
    line-height: 1.3; /* 调整行高适应换行 */
}
.footer-links-group ul {
    list-style: none; /* 去除默认列表样式 */
    padding: 0;
    margin: 0;
}
.footer-links-group li {
    margin-bottom: 0.5rem;
}
.footer-links-group a {
    color: var(--colorful-text-dark); /* 链接颜色 */
    text-decoration: underline;
    font-size: 1rem;
    transition: color 0.2s;
    word-wrap: break-word; /* 长链接文本自动换行 */
    line-height: 1.4; /* 适应多行文本的行高 */
    display: inline-block; /* 确保换行样式正确应用 */
}
.footer-links-group a:hover {
    color: var(--colorful-accent-orange); /* 悬停高亮 */
}

/* 新增：中等屏幕时的响应式布局 - 介绍区域在上，链接区域在下 */
@media (max-width: 900px) {
    .footer-content {
        flex-direction: column; /* 改为竖向排列 */
        gap: 2rem;
        align-items: stretch; /* 拉伸填满宽度 */
    }
    
    .footer-intro {
        max-width: 100%;
        min-width: auto;
        text-align: center;
        order: 1; /* 介绍区域在第一行 */
        height: 150px; /* 在响应式状态下限制高度为150px */
        overflow: hidden; /* 如果内容超出高度则隐藏 */
        display: flex;
        flex-direction: column;
        justify-content: center; /* 垂直居中内容 */
    }
    
    .footer-links-section {
        justify-content: center; /* 居中对齐 */
        max-width: 100%;
        min-width: auto;
        order: 2; /* 链接区域在第二行 */
        gap: 2rem;
    }
}

/* 适应长文本的中等屏幕布局优化 */
@media (max-width: 768px) {
    .footer-intro h3 {
        font-size: 1.2rem;
    }
    
    .footer-intro p {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .footer-links-section {
        gap: 1.8rem; /* 进一步减少间距 */
        justify-content: center; /* 居中对齐 */
    }
    .footer-links-group {
        max-width: 240px; /* 减少最大宽度 */
    }
    .footer-links-group p {
        font-size: 1rem; /* 稍微减小标题字体 */
    }
    .footer-links-group a {
        font-size: 0.95rem; /* 稍微减小链接字体 */
    }
}

/* 在580px以下时，调整footer两列布局的间距和对齐方式，但仍保持两列 */
@media (max-width: 580px) {
    .footer-intro h3 {
        font-size: 1.1rem;
    }
    
    .footer-intro p {
        font-size: 0.9rem;
    }
    
    .footer-links-section {
        gap: 1.5rem; /* 减少间距 */
        justify-content: center; /* 居中对齐 */
    }
    .footer-links-group {
        min-width: 100px; /* 减少最小宽度 */
        max-width: 200px; /* 进一步限制最大宽度 */
        text-align: left; /* 保持左对齐 */
    }
    .footer-links-group p {
        font-size: 0.95rem; /* 稍微减小字体 */
    }
    .footer-links-group a {
        font-size: 0.9rem; /* 稍微减小字体 */
    }
}

/* 移动端自适应：footer栏目在非常小的屏幕上才变为一列并居中 */
@media (max-width: 400px) {
    .footer-intro h3 {
        font-size: 1rem;
    }
    
    .footer-intro p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .footer-links-section {
        flex-direction: column; /* 竖向排列 */
        gap: 1.5rem;
        align-items: center; /* 居中对齐 */
    }
    .footer-links-group {
        min-width: 0;
        max-width: 100%; /* 单列时可以使用全部宽度 */
        text-align: center; /* 移动端内容居中 */
    }
}
/* ========== END ========== */

/* Responsive Design */
/* 响应式设计 */
@media (max-width: 1200px) {
    main {
        grid-template-columns: 150px 1fr 250px; /* 中等屏幕布局调整 */
    }
}

@media (max-width: 992px) {
    main {
        grid-template-columns: 1fr; /* 较小屏幕布局调整：单列 */
    }
    
    .game-links, .mini-games {
        display: none; /* 隐藏侧边栏 */
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column; /* 头部元素垂直排列 */
        text-align: center; /* 文本居中 */
    }
    
    .language-selector {
        margin-top: 1rem; /* 语言选择器上外边距 */
    }
    
    .game-container {
        height: 400px; /* 游戏容器高度调整 */
    }
    
    
    .why-content {
        grid-template-columns: 1fr; /* "Why Choose Us"部分单列布局 */
    }
    
    /* .game-links, .mini-games 的背景色已在各自规则中用新变量定义 */
    
    .game-links {
        font-size: 0.95rem; /* 左侧边栏字号调整 */
    }
    
    .game-links a {
        font-size: 1rem; /* 链接字号调整 */
        padding: 0.4rem 0.5rem; /* 链接内边距调整 */
    }
}

/* Game Description Section */
.game-description {
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
}

.game-description p {
    line-height: 1.8;
}

/* Game Tips Section */
.game-tips {
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
}

.game-tips ul {
    list-style-type: none; /* 无列表样式 */
    padding-left: 0;
}

.game-tips li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative; /* 相对定位，用于图标 */
}

.game-tips li:before {
    content: "💡"; /* 图标 */
    position: absolute;
    left: 0;
    color: var(--colorful-accent-yellow); /* 图标颜色：黄色 */
}

/* Game Updates Section */
.game-updates {
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
}

.game-updates ul {
    list-style-type: none; /* 无列表样式 */
    padding-left: 0;
}

.game-updates li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative; /* 相对定位，用于图标 */
}

.game-updates li:before {
    content: "🔄"; /* 图标 */
    position: absolute;
    left: 0;
    color: var(--colorful-accent-green); /* 图标颜色：绿色 */
}

/* Enhanced How to Play Section */
.how-to-play ul {
    list-style-type: none; /* 无列表样式 */
    padding-left: 0;
    margin-top: 1rem;
}

.how-to-play li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative; /* 相对定位，用于图标 */
}

.how-to-play li:before {
    content: "🎮"; /* 图标 */
    position: absolute;
    left: 0;
    color: var(--colorful-accent-blue); /* 图标颜色：蓝色 */
}

/* Enhanced FAQ Section */
.faq-item {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.faq-item h4 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.faq-item h4:before {
    content: "❓"; /* 图标 */
    margin-right: 0.5rem;
    color: var(--colorful-accent-purple); /* 图标颜色：紫色 */
}

.faq-item p {
    line-height: 1.6;
}

/* Why Section Styles */
.why-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
}

.why-section h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
}

.why-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 两列布局 */
    gap: 1.5rem; /* 间距 */
}

.why-item {
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color-general); /* 恢复阴影 */
    transition: all 0.3s ease; /* 过渡 */
    background-color: rgba(255, 255, 255, 0.8); /* 恢复半透明背景 */
    border: 1px solid rgba(131, 255, 231, 0.3); /* 恢复边框 */
}

.why-item:hover {
    transform: translateY(-5px); /* 悬停上移 */
    border-color: var(--colorful-accent-green); /* 悬停边框颜色：绿色 (如果边框未被!important移除) */
}

.why-item h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.why-item p {
    line-height: 1.6;
}

/* Game Container Loading State */
/* 游戏容器加载状态 */

.game-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 使用一个固定的彩色强调色作为加载动画的颜色，背景调整为深色主题的半透明 */
    background: rgba(0, 0, 0, 0.7) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="50" cy="50" fill="none" stroke="%233498DB" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138"><animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"/></circle></svg>') center center no-repeat;
    background-size: 50px; /* 加载动画大小 */
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-container.loading::after {
    opacity: 1; /* 加载时显示动画 */
}

/* Mini Game Active State */
/* 小游戏激活状态 */
.mini-game.active {
    border: 2px solid var(--colorful-accent-green); /* 激活边框：用彩色绿 */
    box-shadow: 0 0 10px var(--colorful-accent-green); /* 激活阴影：用彩色绿 */
}

.mini-game.active .game-cover {
    opacity: 0; /* 激活时封面透明 */
}

.mini-game.active iframe {
    opacity: 1; /* 激活时iframe不透明 */
}

/* Game Title Transition */
/* 游戏标题过渡 */
.game-info h2 {
    transition: opacity 0.3s ease; /* 透明度过渡 */
}

.game-info h2.updating {
    opacity: 0; /* 更新时透明 */
}

/* 导航栏新字体和图标样式 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&display=swap');

/* --- 重构后的内容区块样式 --- */
/* Re-evaluate these for the dark theme */

/* 区块组1 - 设置为透明背景，去掉边框 */
.game-features,
.how-to-play,
.player-reviews, 
.faq, 
.why-section {
    color: #333 !important; 
    background-color: transparent !important;
    backdrop-filter: none !important;
    padding: 1rem; 
    border-radius: 12px !important; 
    margin-bottom: 1.5rem; 
    border: none !important;
    box-shadow: none !important;
}

/* 区块组2 - 设置为透明背景，去掉边框 */
.game-description,
.game-tips,
.game-updates,
.faq-item { 
    color: #333 !important; 
    background-color: transparent !important;
    backdrop-filter: none !important;
    padding: 1rem; 
    border-radius: 10px; 
    margin-bottom: 1rem; 
    border: none !important;
    box-shadow: none !important;
}

/* Content block titles (h3, h4) */
.game-features h3,
.how-to-play h3,
.player-reviews h3, 
.faq h3, 
.why-section h3,
.game-description h3,
.game-tips h3,
.game-updates h3,
.faq-item h4, 
.why-item h4 {
    color: var(--colorful-accent-blue) !important; /* Titles use accent blue */
    margin-bottom: 0.75rem; 
}

/* Reviews and Why-items - 设置为透明背景，去掉边框 */
.review { 
    background-color: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    border-radius: 8px;
    padding: 1rem; 
    box-shadow: none !important;
}
.review p, .review span {
    color: #333 !important;
}

.why-item { 
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(131, 255, 231, 0.3) !important;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}
.why-item p {
    color: #333 !important; 
}


/* New styles for the game lists in the new layout */
.game-list {
    background-color: transparent; /* 透明背景，展示body背景 */
    backdrop-filter: none; /* 移除毛玻璃效果 */
    padding: 1rem;
    border-radius: 12px; /* 增大圆角 */
    border: none; /* 移除边框 */
    box-shadow: none; /* 移除阴影 */
    overflow-y: auto;
}

.game-list h2 { /* Titles inside game lists, if they are uncommented */
    color: var(--colorful-text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--colorful-border);
    padding-bottom: 0.3rem;
}

/* Central mini games section (if ever uncommented) */
.central-mini-games-section {
    padding: 20px 0; 
    margin-bottom: 20px; 
}

.central-mini-games-section h2 {
    font-size: 1.8em; 
    color: var(--colorful-accent-purple); /* Use colorful purple for these titles */
    text-align: center; 
    margin-bottom: 20px; 
    font-family: 'Press Start 2P', cursive; 
}

/* 中间小游戏网格布局 */
.sub-mini-game-grid {
    display: grid; /* Grid布局 */
    grid-template-columns: repeat(5, 1fr); /* 5列等宽 */
    grid-template-rows: repeat(3, auto); /* 3行，高度自动 */
    gap: 15px; /* 网格间距 */
    padding: 0 10px; /* 左右内边距 */
}

/* 响应式调整：在中等屏幕上改为3列 */
@media (max-width: 1024px) {
    .sub-mini-game-grid {
        grid-template-columns: repeat(3, 1fr); /* 3列 */
    }
}

/* 响应式调整：在小屏幕上改为2列 */
@media (max-width: 600px) {
    .sub-mini-game-grid {
        grid-template-columns: repeat(2, 1fr); /* 2列 */
    }
    .central-mini-games-section h2 {
        font-size: 1.5em; /* 减小标题字号 */
    }
}

.top-games {
    grid-area: top; /* 顶部游戏列表，对应网格区域 'top' */
    min-height: 100px; /* 顶部游戏列表最小高度，根据内容调整 */
    display: grid; /* 让内部游戏项可以横向排列 */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* 横向自动填充，每个最小120px */
    gap: 0.5rem; /* 游戏项间距 */
}

/* 主页面左侧边栏的网格区域分配 */
main > .game-list.left-games {
    grid-area: left; /* 这是页面主布局的左侧边栏 */
    /* General .game-list styles (background, padding) should apply. */
    /* The layout of its .mini-game children is handled by the rule below. */
}

/* 所有使用 .left-games 类的游戏列表容器 */
/* 将其内部 .mini-game 项目设置为两列布局 */
div.game-list.left-games {
    display: grid; /* 启用网格布局以排列内部游戏项 */
    grid-template-columns: repeat(2, 1fr); /* 创建两列等宽 */
    gap: 0.3rem; /* 列和行之间的间隙 */
    align-content: start; /* 网格内容从顶部开始对齐 */
}

.right-games { /* For main layout */
    grid-area: right; /* 右侧游戏列表，对应网格区域 'right' */
}

/* Specific style for mini-games within the right sidebar to be rectangular */
/* 右侧边栏内的游戏块使用长方形样式 */
.right-games .mini-game {
    aspect-ratio: 16 / 9; /* 设置为16:9的长方形宽高比 */
}


.bottom-games {
    grid-area: bottom; /* 分配到 'bottom' 网格区域 */
    min-height: 100px; /* 底部游戏列表最小高度，根据内容调整 */
    display: grid; /* 让内部游戏项可以横向排列 */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* 横向自动填充 */
    gap: 0.5rem; /* 游戏项间距 */
}

/* 导航栏样式 */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background-color: var(--colorful-accent-blue);
    color: var(--colorful-text-light);
    transform: translateY(-2px);
}

/* 搜索框样式 */
.search-container {
    display: flex;
    margin: 0 1rem;
}

.search-input {
    padding: 0.5rem;
    border: 1px solid rgba(131, 255, 231, 0.4);
    border-radius: 4px 0 0 4px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: #333;
    transition: all 0.3s ease;
    width: 180px;
    outline: none;
}

.search-input:focus {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(131, 255, 231, 0.6);
    box-shadow: 0 0 0 3px rgba(131, 255, 231, 0.2);
}

.search-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.search-btn {
    background: linear-gradient(135deg, rgba(0, 150, 200, 0.9), rgba(0, 120, 180, 0.9));
    backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(131, 255, 231, 0.4);
    border-radius: 0 4px 4px 0;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background-color: var(--colorful-accent-orange);
    border-color: var(--colorful-accent-orange);
}

/* 下拉式多语言选择器样式 */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown-btn {
    background-color: var(--colorful-accent-blue);
    color: var(--colorful-text-light);
    border: 1px solid var(--colorful-accent-blue);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.language-dropdown-btn:hover {
    background-color: var(--colorful-accent-orange);
    border-color: var(--colorful-accent-orange);
}

.language-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(131, 255, 231, 0.3);
    min-width: 120px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 4px;
    padding: 0.5rem;
}

.language-dropdown-content .lang-btn {
    display: block;
    width: 100%;
    text-align: left;
    margin: 0.3rem 0;
    background-color: transparent;
    color: #333333; /* 深灰色，在白色背景上有更好的对比度 */
    border: none;
}

.language-dropdown-content .lang-btn:hover,
.language-dropdown-content .lang-btn.active {
    background-color: var(--colorful-accent-blue);
    color: var(--colorful-text-light);
}

.language-dropdown:hover .language-dropdown-content {
    display: block;
}

/* 增强多语言下拉框选项的字体颜色对比度 */
.language-dropdown-content .lang-btn {
    color: #333333 !important; /* 深灰色，在白色背景上有更好的对比度 */
}

/* 确保这是CSS文件的最后一行，不要在此后添加任何样式 */ 

/* ========== 响应式Header隐藏与移动端菜单按钮样式 ========== */
.mobile-menu-btn {
    display: none; /* 默认隐藏，防止大屏显示 */
}
@media (max-width: 990px) {
    #main-header > *:not(.mobile-menu-btn),
    #main-header > *:not(.mobile-menu-btns) {
        display: none !important; /* 隐藏header下所有内容，除了菜单按钮 */
    }
    #main-header {
        position: fixed !important; /* 强制悬浮在页面顶部，防止被relative覆盖 */
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1100;
        min-height: 3.2rem;
        background: linear-gradient(135deg, var(--colorful-bg-section), var(--colorful-bg-main));
    }
    .mobile-menu-btn {
        display: inline-block !important;
        position: absolute;
        top: 0.6rem;
        left: 1rem;
        z-index: 1200;
        background: var(--colorful-accent-blue);
        color: var(--colorful-text-light);
        border: none;
        border-radius: 6px;
        font-size: 1.6rem;
        padding: 0.3rem 0.9rem;
        margin-right: 0.5rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        cursor: pointer;
        transition: background 0.2s;
    }
    .mobile-menu-btn:hover {
        background: var(--colorful-accent-orange);
    }
    .mobile-menu-btn[style*="left: 4rem"] {
        left: 4rem !important;
    }
    /* header弹窗悬浮窗样式 */
    #header-float-menu {
        display: block;
        position: fixed;
        top: 1.2rem;
        left: 50%;
        transform: translateX(-50%);
        width: 92vw;
        max-width: 420px;
        background: #6971d5; /* 指定的背景颜色 */
        z-index: 2000;
        box-shadow: 0 12px 32px rgba(0,0,0,0.25);
        border-radius: 18px;
        padding: 1.5rem 1.2rem 1.2rem 1.2rem;
        animation: headerFloatDrop 0.22s cubic-bezier(.4,1.3,.6,1) both;
        /* 默认布局：保持原有的水平排列 */
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem;
    }
    @keyframes headerFloatDrop {
        0% { opacity: 0; transform: translate(-50%,-40px); }
        100% { opacity: 1; transform: translate(-50%,0); }
    }
    /* 遮罩层样式 */
    #header-float-mask {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.18);
        z-index: 1999;
        animation: headerMaskFadeIn 0.18s;
    }
    @keyframes headerMaskFadeIn {
        0% { opacity: 0; }
        100% { opacity: 1; }
    }
}
/* ========== END ========== */ 

/* 修复移动端菜单按钮在小屏下不显示的问题 */
@media (max-width: 990px) {
    #main-header .mobile-menu-btn {
        display: inline-block !important;
    }
} 

/* ===================== 移动端菜单按钮样式修复 ===================== */
@media (max-width: 990px) {
    .mobile-menu-btn {
        background: var(--colorful-accent-blue) !important; /* 确保按钮有可见的背景色 */
        color: var(--colorful-text-light) !important; /* 确保文字颜色对比度 */
        border: 2px solid rgba(255, 255, 255, 0.3) !important; /* 添加边框增加可见性 */
        font-size: 1.6rem !important;
        padding: 0.3rem 0.9rem !important;
    }
    
    .mobile-menu-btn:hover {
        background: var(--colorful-accent-orange) !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
    }
}
/* ===================== END ===================== */ 

/* ===================== 移动端菜单按钮高度与header一致 ===================== */
.mobile-menu-btn {
    height: 100%; /* 高度占满父容器header */
    max-height: 51.2px; /* 最小高度与header的min-height一致，防止过小 */
    /* 保留原有的圆角、字体、边框等样式 */
    box-sizing: border-box; /* 采用标准盒模型，防止撑出header */
}
#main-header {
    position: fixed !important; /* 全局也加上!important，防止被覆盖 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
}

/* ===================== 移动端菜单按钮顶部贴合页面顶部 ===================== */
.mobile-menu-btn {
    top: 0 !important; /* 按钮顶部与header顶部完全贴合，无任何间距 */
}
/* ===================== END ===================== */ 

/* ========== 分类下拉框样式（与多语言下拉框风格一致） ========== */
.categories-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 320px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(131, 255, 231, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    z-index: 1150;
    border-radius: 4px;
    padding: 0.5rem;
    border: none;
    font-family: 'Poppins', 'Arial', sans-serif;
    font-size: 1rem;
    transition: box-shadow 0.2s, background 0.2s;
    animation: fadeInDropdown 0.18s;
    pointer-events: auto;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}
.categories-dropdown .category-item {
    display: block;
    float: left;
    width: 50%;
    text-align: left;
    margin: 0.3rem 0;
    background-color: transparent;
    color: #333333; /* 深灰色，在白色背景上有更好的对比度 */
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    letter-spacing: 0.02em;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    pointer-events: auto;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.categories-dropdown .category-item:hover,
.categories-dropdown .category-item:focus {
    background-color: var(--colorful-accent-blue);
    color: var(--colorful-text-light);
    transform: translateX(4px) scale(1.03);
}
.categories-dropdown .category-item:active {
    background: var(--colorful-accent-orange);
    color: var(--colorful-text-light);
}
@media (max-width: 600px) {
    .categories-dropdown {
        min-width: 120px;
        font-size: 0.95rem;
        left: 50%;
        transform: translateX(-50%);
    }
    .categories-dropdown .category-item {
        padding: 0.5rem 0.8rem;
    }
}
/* ========== END ========== */ 

/* ========== 分类下拉框样式修正 ========== */
.categories-dropdown {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(131, 255, 231, 0.3) !important;
    z-index: 10001 !important; /* 确保在header和遮罩层之上 */
    pointer-events: auto !important;
    /* 增强触控支持 */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
}
.categories-dropdown .category-item {
    color: #333333 !important; /* 深灰色，在白色背景上有更好的对比度 */
    /* 增强触控响应 */
    cursor: pointer !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;  
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
    touch-action: manipulation !important;
    /* 增加触控区域 */
    padding: 0.8rem 1rem !important;
    min-height: 44px !important; /* 确保触控区域足够大 */
    display: flex !important;
    align-items: center !important;
}
/* 添加触控状态样式 */
.categories-dropdown .category-item:active {
    background-color: var(--colorful-accent-orange) !important;
    color: var(--colorful-text-light) !important;
    transform: scale(0.98) !important;
}
/* ========== END ========== */ 

/* ========== 首页分类下拉框专用样式 ========== */
/* 只针对首页的分类下拉框，确保其显示在遮罩层之上 */
body:not(.blog-page):not(.game-page) .categories-dropdown {
    z-index: 15000 !important; /* 超高z-index，确保在所有元素之上 */
    position: absolute !important;
}

/* 也可以通过页面标识符更精确地定位首页 */
.main-nav .categories-dropdown {
    z-index: 15000 !important;
    position: absolute !important;
}

/* 确保分类按钮的父元素也有正确的层级 */
.main-nav li[style*="position:relative"] {
    z-index: 14999 !important;
}

/* 首页分类下拉框中的项目也要确保正确的层级 */
.main-nav .categories-dropdown .category-item {
    z-index: 15001 !important;
    position: relative !important;
}
/* ========== END ========== */

/* ========== 分类下拉框遮罩层 ========== */
.categories-dropdown-overlay {
    position: fixed;
    top: 70px; /* 从header下方开始，避免覆盖header */
    left: 0;
    width: 100%;
    height: calc(100% - 70px); /* 高度减去header高度 */
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 10; /* 低于header和下拉框，但高于游戏内容 */
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    /* 确保遮罩层能响应触控事件 */
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.categories-dropdown-overlay.active {
    display: block;
    opacity: 1;
}
/* ========== END ========== */ 