/* --- 全局和基础样式 --- */
:root {
    /* 定义颜色变量 */
    --primary-yellow: #f4d03f; /* 主要黄色 (像阳光/麦田) */
    --secondary-green: #a3d9a5; /* 次要绿色 (像草地) */
    --accent-blue: #87ceeb; /* 点缀蓝色 (像天空) */
    --text-dark: #333; /* 深色文字 */
    --text-light: #fff; /* 浅色文字 */
    --container-bg: #fff; /* 内容容器背景 */
    --button-bg: #f4a261; /* 按钮背景 (橙色) */
    --button-hover-bg: #e76f51; /* 按钮悬停背景 (深橙色) */
}

* {
    /* 基础重置: 移除默认内外边距，设置盒子模型 */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* 设置页面字体、背景和文字颜色 */
    font-family: 'Roboto', sans-serif; /* 主体使用 Roboto 字体 */
    line-height: 1.6; /* 设置行高 */
    background-color: var(--accent-blue); /* 天蓝色背景 */
    background-image: linear-gradient(to bottom, var(--accent-blue), var(--primary-yellow)); /* 从蓝到黄的渐变背景 */
    color: var(--text-dark);
    display: flex; /* 使用 Flexbox 布局 */
    flex-direction: column; /* 垂直排列子元素 */
    min-height: 100vh; /* 最小高度为视口高度 */
}

img {
    /* 图片基础样式 */
    max-width: 100%; /* 最大宽度为 100% */
    height: auto; /* 高度自动 */
    display: block; /* 防止图片下方出现空隙 */
}

a {
    /* 链接样式 */
    color: var(--button-hover-bg); /* 链接颜色 */
    text-decoration: none; /* 去除下划线 */
}

a:hover {
    /* 链接悬停样式 */
    text-decoration: underline; /* 添加下划线 */
}

main {
    /* 主要内容区域占据剩余空间 */
    flex-grow: 1;
}

/* --- 头部样式 --- */
header {
    /* 头部容器样式 */
    background-color: rgba(255, 255, 255, 0.8); /* 半透明白色背景 */
    padding: 15px 5%; /* 内边距 */
    display: flex; /* 使用 Flexbox 布局 */
    justify-content: space-between; /* 两端对齐 */
    align-items: center; /* 垂直居中 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    position: sticky; /* 固定头部 */
    top: 0;
    z-index: 1000; /* 确保在顶层 */
}

.logo {
    /* Logo 样式 */
    font-family: 'Pacifico', cursive; /* 使用 Pacifico 字体 */
    font-size: 2.5em; /* 较大的字体大小 */
    color: var(--button-hover-bg); /* Logo 颜色 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* 添加文字阴影使其夸张 */
    transform: rotate(-3deg); /* 轻微旋转增加趣味性 */
}

/* --- 语言切换器样式 --- */
.language-switcher button {
    /* 语言按钮样式 */
    background-color: var(--button-bg);
    color: var(--text-light);
    border: none;
    padding: 8px 12px;
    margin-left: 5px;
    border-radius: 5px; /* 圆角 */
    cursor: pointer; /* 鼠标指针样式 */
    font-weight: bold;
    transition: background-color 0.3s ease; /* 背景色过渡效果 */
}

.language-switcher button:hover,
.language-switcher button.active {
    /* 按钮悬停和激活状态 */
    background-color: var(--button-hover-bg);
}

/* --- 游戏容器样式 --- */
.game-container {
    /* 游戏区域容器 */
    padding: 20px 5%; /* 内边距 */
    text-align: center; /* 居中按钮 */
}

.iframe-wrapper {
    /* iframe 包裹层，用于控制宽高比 */
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 宽高比 */
    background-color: #000; /* 加载时的黑色背景 */
    border-radius: 10px; /* 圆角 */
    overflow: hidden; /* 隐藏溢出内容 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* 阴影 */
}

.game-container iframe {
    /* iframe 样式 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* 移除边框 */
}

#fullscreen-button {
    /* 全屏按钮样式 */
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--button-bg);
    color: var(--text-light);
    border: none;
    border-radius: 20px; /* 更圆的角 */
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease; /* 过渡效果 */
}

#fullscreen-button:hover {
    /* 全屏按钮悬停 */
    background-color: var(--button-hover-bg);
    transform: scale(1.05); /* 轻微放大 */
}

/* --- 内容区域样式 --- */
.content-area {
    /* 下方内容区域 */
    max-width: 900px; /* 最大宽度 */
    margin: 30px auto; /* 上下外边距，左右自动居中 */
    padding: 30px;
    background-color: var(--container-bg); /* 白色背景 */
    border-radius: 15px; /* 圆角 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* 阴影 */
}

.content-area h1,
.content-area h2,
.content-area h3 {
    /* 标题通用样式 */
    color: var(--button-hover-bg); /* 标题颜色 */
    margin-top: 20px;
    margin-bottom: 15px;
    font-family: 'Pacifico', cursive; /* 标题也用趣味字体 */
}

.content-area h1 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 25px;
}

.content-area h2 {
    font-size: 1.8em;
    border-bottom: 2px dashed var(--primary-yellow); /* 虚线底部边框 */
    padding-bottom: 5px;
}

.content-area h3 {
    font-size: 1.5em;
}

.content-area p {
    /* 段落样式 */
    margin-bottom: 15px;
    color: #555; /* 稍浅的文字颜色 */
}

.content-area ul,
.content-area ol {
    /* 列表样式 */
    margin-left: 20px; /* 左缩进 */
    margin-bottom: 15px;
    padding-left: 20px;
}

.content-area li {
    /* 列表项样式 */
    margin-bottom: 8px;
}

/* --- 特定区域样式 --- */
.screenshots-gallery {
    /* 截图画廊 */
    display: grid; /* 使用 Grid 布局 */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 响应式列 */
    gap: 15px; /* 间距 */
    margin-bottom: 20px;
}

.screenshots-gallery img {
    /* 截图图片 */
    border-radius: 8px; /* 圆角 */
    border: 3px solid var(--secondary-green); /* 绿色边框 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.screenshots-gallery p {
    /* 截图说明文字 */
    grid-column: 1 / -1; /* 跨越所有列 */
    text-align: center;
    font-style: italic;
    color: #777;
}

.user-reviews .review {
    /* 用户评论 */
    background-color: #f9f9f9; /* 浅灰色背景 */
    border-left: 5px solid var(--secondary-green); /* 左侧绿色边框 */
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0; /* 圆角 */
}

.user-reviews .review p {
    margin-bottom: 5px;
    font-style: italic;
}

.user-reviews .review p::after {
    /* 评论者署名样式 */
    content: attr(data-author); /* 如果需要，可以添加 data-author 属性 */
    display: block;
    text-align: right;
    font-style: normal;
    font-weight: bold;
    color: var(--button-bg);
}

/* --- 页脚样式 --- */
footer {
    /* 页脚容器 */
    background-color: #333; /* 深灰色背景 */
    color: var(--text-light); /* 浅色文字 */
    text-align: center; /* 居中 */
    padding: 20px 5%; /* 内边距 */
    margin-top: 30px; /* 与上方内容间距 */
}

footer p {
    /* 页脚段落 */
    margin-bottom: 5px;
    font-size: 0.9em;
}

footer a {
    /* 页脚链接 */
    color: var(--primary-yellow); /* 黄色链接 */
}

footer a:hover {
    /* 页脚链接悬停 */
    color: var(--text-light);
}

/* --- 响应式设计 --- */
@media (max-width: 768px) {
    /* 屏幕宽度小于 768px 时应用 */
    header {
        /* 头部调整为垂直排列 */
        flex-direction: column;
        padding: 15px;
    }

    .logo {
        /* Logo 字体缩小 */
        font-size: 2em;
        margin-bottom: 10px; /* 增加下方间距 */
        transform: rotate(0); /* 移动端取消旋转 */
    }

    .language-switcher {
        /* 语言切换器 */
        margin-top: 10px;
    }

    .language-switcher button {
        /* 语言按钮缩小 */
        padding: 6px 10px;
        font-size: 0.9em;
    }

    .content-area {
        /* 内容区域减小内边距 */
        padding: 20px;
        margin: 20px 5%; /* 调整外边距 */
        max-width: none; /* 取消最大宽度 */
    }

    .content-area h1 {
        font-size: 1.8em;
    }

    .content-area h2 {
        font-size: 1.5em;
    }

    .content-area h3 {
        font-size: 1.3em;
    }

    .screenshots-gallery {
        /* 截图画廊调整 */
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* 调整最小宽度 */
        gap: 10px;
    }
}

@media (max-width: 480px) {
    /* 屏幕宽度小于 480px 时应用 */
    .logo {
        font-size: 1.8em;
    }

    #fullscreen-button {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .language-switcher {
        /* 允许按钮换行 */
        white-space: normal;
        text-align: center;
    }
    .language-switcher button {
        margin-bottom: 5px;
    }

    .content-area {
        padding: 15px;
    }
} 