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

:root {
    /* 绚丽多彩配色方案 (Vibrant Colorful Scheme) */
    --theme-primary: #00BFFF;        /* 主要亮蓝色 (Deep Sky Blue) - 动态且吸引 */
    --theme-secondary: #FF1493;      /* 辅助亮粉色 (Deep Pink) - 充满活力 */
    --theme-accent: #FFD700;         /* 强调金色 (Gold) - 温暖高亮 */
    --theme-highlight: #32CD32;      /* 点缀石灰绿 (Lime Green) - 清新醒目 */
    
    /* 背景颜色 */
    --theme-bg-main-dark: #1a1a2e;    /* 深海军蓝/暗紫色背景 (Dark Indigo/Purple) - 适合粒子效果 */
    --theme-bg-card: #2a2a3e;        /* 卡片背景 (Slightly lighter Indigo/Purple) - 与主背景区分 */
    --theme-bg-hover: #3f3f5e;       /* 悬停背景 (Lighter Indigo/Purple for hover) */
    
    /* 文本颜色 */
    --theme-text-primary-on-dark: #E0E0E0; /* 主要文本 (浅灰色) - 在深色背景上清晰 */
    --theme-text-secondary-on-dark: #A0A0B0;/* 次要文本 (中灰色) - 在深色背景上 */
    --theme-text-on-accent: #1a1a2e;   /* 在强调色背景上的文本 (用深色确保对比) */
    --theme-text-link: #00BFFF;       /* 链接颜色 (同主要亮蓝色) */
    --theme-text-link-hover: #FF1493; /* 链接悬停颜色 (同辅助亮粉色) */

    /* 边框和阴影 */
    --theme-border: #4a4a6e;          /* 边框颜色 (配合深色主题) */
    --theme-shadow: rgba(0, 0, 0, 0.3); /* 阴影颜色 (在深色主题上更明显) */

    /* 映射旧变量到新主题 (确保兼容性，有些可能不再直接使用或语义改变) */
    --bg-main-yellow: var(--theme-bg-main-dark);       /* 原浅色背景改为深色 */
    --bg-section-green: var(--theme-bg-card);        /* 原卡片白色改为深色卡片 */
    --text-dark-on-light: var(--theme-text-primary-on-dark); /* 假设现在背景是暗的 */
    --text-light-on-dark: var(--theme-text-primary-on-dark); /* 保持一致 */
    --accent-bright-yellow: var(--theme-accent);     /* 强调色用金色 */
    --accent-vibrant-green: var(--theme-highlight);  /* 点缀色用石灰绿 */
    --border-color-soft: var(--theme-border);
    --shadow-color-general: var(--theme-shadow);

    /* 旧主题变量中未直接映射的，可以根据新主题的需要调整其用途或弃用 */
    /* 例如: --theme-red (原红色点缀) 可根据设计决定是否保留或用新强调色代替 */
    /* --theme-bg-light (原浅色背景) 被 --theme-bg-main-dark 替换 */
    /* --theme-text-light (原浅色文本) 主要由 --theme-text-primary-on-dark 替代 */

    /* 全局变量定义 - 使用蓝绿色主题 */
    --primary-color: #00B4D8; /* 明亮的蓝绿色 */
    --primary-dark: #0077B6; /* 深蓝绿色 */
    --primary-light: #90E0EF; /* 浅蓝绿色 */
    
    /* 背景色 */
    --bg-color: #F0F8FF; /* 淡蓝色背景 */
    --bg-section: #E0F7FF; /* 浅蓝绿色背景 */
    --bg-section-green: #CAF0F8; /* 更浅的蓝绿色背景 */
    
    /* 文字颜色 */
    --text-color-dark: #023E8A; /* 深蓝色文字 */
    --text-color-light: #0077B6; /* 中蓝色文字 */
    
    /* 强调色 */
    --accent-color: #00B4D8; /* 蓝绿色强调 */
    --accent-hover: #0077B6; /* 深蓝绿色悬停效果 */
    
    /* 阴影颜色 */
    --shadow-color-general: rgba(0, 180, 216, 0.2); /* 蓝绿色阴影 */
    --shadow-color-hover: rgba(0, 119, 182, 0.3); /* 深蓝绿色悬停阴影 */
}

body {
    font-family: 'Roboto', 'Arial', sans-serif; /* 更现代的字体 */
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--bg-color);
    /* 移除了原有的SVG background-image 和 background-repeat */
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: var(--theme-text-light);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px var(--shadow-color-general);
}

.logo-container {
    display: flex;
    align-items: center;
}

.retro-logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px var(--shadow-color-general);
    letter-spacing: 2px;
}

/* 语言选择器样式 */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background-color: transparent;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-btn.active {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Main Content Layout */
main {
    display: block !important;
    padding: 1.5rem;
    max-width: 100%;
    min-height: calc(100vh - 70px - 2rem);
    margin: 0 auto;
    background: none;
}

/* 游戏区域容器样式 */
.games-area-container {
    display: grid;
    grid-template-columns: 1fr 4fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background-color: var(--theme-bg-light);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 顶部游戏列表样式升级 */
.top-games {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--theme-bg-card);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--theme-shadow);
    margin-bottom: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-primary) var(--theme-bg-light);
}

.top-games::-webkit-scrollbar {
    height: 8px;
}

.top-games::-webkit-scrollbar-track {
    background: var(--theme-bg-light);
    border-radius: 4px;
}

.top-games::-webkit-scrollbar-thumb {
    background-color: var(--theme-primary);
    border-radius: 4px;
}

/* 左右侧游戏列表 - 移除固定高度和滚动条 */
.left-games, .right-games {
    background-color: var(--theme-bg-card);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--theme-shadow);
    /* height: 600px; 移除固定高度 */
    /* overflow-y: auto; 移除滚动条 */
    scrollbar-width: thin; /* 如果仍希望保留细滚动条样式，可以保留此行和下面的webkit部分 */
    scrollbar-color: var(--theme-primary) var(--theme-bg-light);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.left-games::-webkit-scrollbar, .right-games::-webkit-scrollbar {
    width: 8px;
}

.left-games::-webkit-scrollbar-track, .right-games::-webkit-scrollbar-track {
    background: var(--theme-bg-light);
    border-radius: 4px;
}

.left-games::-webkit-scrollbar-thumb, .right-games::-webkit-scrollbar-thumb {
    background-color: var(--theme-primary);
    border-radius: 4px;
}

/* Main Game Section */
.main-game {
    grid-area: unset;
    width: 100%;
    background-color: var(--theme-bg-card);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--theme-shadow);
    overflow: hidden;
    border: none;
    display: flex;
    flex-direction: column;
}

.game-container {
    position: relative;
    width: 100%;
    height: 600px;
    background-color: var(--bg-section);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--primary-light);
    box-shadow: 0 4px 15px var(--shadow-color-general);
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.fullscreen-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.fullscreen-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

/* 游戏信息全宽区域 */
.game-info-fullwidth {
    width: 100%;
    background-color: var(--bg-section-green);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--theme-shadow);
    margin-top: 1.5rem;
    border: 1px solid var(--primary-light);
}

/* 游戏卡片样式升级 */
.mini-game {
    position: relative;
    width: 100%;
    height: 170px; /* 设置固定高度替代aspect-ratio */
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--bg-section);
    border: 1px solid var(--primary-light);
    font-weight: bold;
}

.mini-game:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px var(--shadow-color-hover);
}

.game-cover {
    position: relative;
    width: 100%;
    height: 100%; /* 让cover占满整个mini-game */
    overflow: hidden;
    border-radius: 10px;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保图片覆盖整个区域而不变形 */
    transition: transform 0.4s ease;
}

.mini-game:hover .game-cover img {
    transform: scale(1.1);
}

.game-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--text-color-dark);
    padding: 10px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.mini-game:hover .game-title {
    background: linear-gradient(transparent, rgba(108, 92, 231, 0.9));
    padding-bottom: 15px;
}

/* Game Information Section */
.game-info {
    padding: 1rem;
    background-color: var(--bg-section-green);
    border: 1px solid var(--primary-light);
}

.game-info h2 {
    color: var(--theme-primary);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--theme-primary);
    padding-bottom: 0.8rem;
    font-size: 2rem;
    text-align: center;
}

.game-screenshots {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-primary) var(--theme-bg-light);
}

.game-screenshots::-webkit-scrollbar {
    height: 8px;
}

.game-screenshots::-webkit-scrollbar-track {
    background: var(--theme-bg-light);
    border-radius: 4px;
}

.game-screenshots::-webkit-scrollbar-thumb {
    background-color: var(--theme-primary);
    border-radius: 4px;
}

.game-screenshots img {
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--theme-shadow);
    transition: transform 0.3s;
    max-height: 250px;
    object-fit: cover;
}

.game-screenshots img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px var(--theme-shadow);
}

/* 游戏特点部分 */
.game-features, 
.game-description, 
.how-to-play, 
.game-tips, 
.player-reviews, 
.game-updates, 
.faq {
    background-color: var(--bg-section);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--primary-light);
}

.game-features h3, 
.game-description h3, 
.how-to-play h3, 
.game-tips h3, 
.player-reviews h3, 
.game-updates h3, 
.faq h3 {
    color: var(--theme-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    position: relative;
    padding-left: 1rem;
}

.game-features h3::before, 
.game-description h3::before, 
.how-to-play h3::before, 
.game-tips h3::before, 
.player-reviews h3::before, 
.game-updates h3::before, 
.faq h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--theme-primary);
    border-radius: 2px;
}

.game-features ul, 
.how-to-play ul, 
.game-tips ul,
.game-updates ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.game-features li, 
.how-to-play li, 
.game-tips li,
.game-updates li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
    color: var(--text-color-dark);
    border-left: 3px solid var(--primary-color);
}

.game-description p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--theme-text-secondary);
}

/* 玩家评论样式 */
.review {
    background-color: var(--bg-section-green);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
}

.review p {
    font-style: italic;
    margin-bottom: 0.5rem;
    color: var(--theme-text-primary);
}

.review span {
    display: block;
    text-align: right;
    color: var(--theme-text-secondary);
    font-weight: 500;
}

/* 为什么选择我们部分 */
.why-section {
    margin-bottom: 2rem;
}

.why-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.why-item {
    background-color: var(--theme-bg-light);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border-top: 4px solid var(--theme-primary);
}

.why-item:nth-child(2) {
    border-top-color: var(--theme-secondary);
}

.why-item:nth-child(3) {
    border-top-color: var(--theme-accent);
}

.why-item:nth-child(4) {
    border-top-color: var(--theme-red);
}

.why-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.why-item h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--theme-text-primary);
}

.why-item p {
    color: var(--theme-text-secondary);
    line-height: 1.7;
}

/* FAQ部分 */
.faq-item {
    border-bottom: 1px solid var(--theme-border);
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
    background-color: var(--bg-section);
    border: 1px solid var(--primary-light);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.faq-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--theme-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.faq-item h4::before {
    content: '▸';
    margin-right: 0.5rem;
    color: var(--theme-primary);
    transition: transform 0.3s;
}

.faq-item.active h4::before {
    transform: rotate(90deg);
}

.faq-item p {
    color: var(--theme-text-secondary);
    line-height: 1.7;
    padding-left: 1.5rem;
}

/* Footer Styles */
footer {
    background-color: var(--primary-color);
    color: #FFFFFF;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.copyright {
    margin-top: 1rem;
}

/* 添加邮箱样式 */
.contact-email {
    color: #FFFFFF;
    font-size: 1rem;
    margin-top: 0.5rem;
    text-align: center;
}

.copyright a {
    color: var(--theme-text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.copyright a:hover {
    color: var(--theme-accent);
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .games-area-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .left-games, .right-games {
        height: 300px;
        overflow-y: auto;
    }
    
    .game-container {
        height: 400px;
    }
    
    .why-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .retro-logo {
        font-size: 1.8rem;
    }
    
    .game-info h2 {
        font-size: 1.6rem;
    }
    
    .game-screenshots img {
        max-height: 180px;
    }
    
    .game-info-fullwidth {
        padding: 1.2rem;
    }
    
    .language-selector {
        padding: 0.3rem;
        gap: 0.3rem;
    }
    
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    main {
        padding: 0.8rem;
    }
    
    .game-container {
        height: 300px;
    }
    
    .retro-logo {
        font-size: 1.4rem;
    }
    
    .language-selector {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .lang-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .fullscreen-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .game-features, 
    .game-description, 
    .how-to-play, 
    .game-tips, 
    .player-reviews, 
    .game-updates, 
    .faq {
        padding: 1rem;
    }
}

/* 添加游戏卡下方的播放按钮 */
.play-button-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 10px;
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.mini-game:hover .play-button-container {
    transform: translateY(0);
}

.play-button {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.play-button:hover {
    background-color: var(--primary-dark);
}

.play-button::before {
    content: "▶";
    font-size: 0.8em;
}

/* 链接样式 */
a {
    color: var(--primary-dark);
}

a:hover {
    color: var(--primary-color);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color-dark);
}

/* 按钮通用样式 */
button {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--primary-dark);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-section);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
} 