/* --- 全局和重置样式 --- */
* {
    /* 移除默认的内外边距，使用border-box模型 */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* 字体: 设置一个基础的、灵动的无衬线字体栈 */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* 行高: 设置舒适的阅读行高 */
    line-height: 1.6;
    /* 背景: 设置一个代表田野的黄色调 */
    background-color: #f4e9a4; /* 淡黄色 */
    /* 颜色: 设置基础文字颜色 */
    color: #333; /* 深灰色文字 */
}

/* --- 辅助类 --- */
.visually-hidden {
    /* 视觉隐藏类: 用于屏幕阅读器可访问但视觉上隐藏的元素 */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- 链接样式 --- */
a {
    /* 链接颜色: 设置与主题协调的颜色 */
    color: #8b4513; /* 棕色，像泥土 */
    text-decoration: none; /* 移除下划线 */
}
a:hover {
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
}

/* --- 容器和主要布局 --- */
header,
main,
footer {
    /* 内容最大宽度: 限制内容宽度，使其在大屏幕上更易读 */
    max-width: 1200px;
    /* 居中: 使内容块在页面中水平居中 */
    margin: 0 auto;
    /* 内边距: 在内容周围添加一些空间 */
    padding: 20px;
}

/* --- 头部样式 --- */
header {
    /* 布局: 使用Flexbox对齐Logo和语言切换器 */
    display: flex;
    justify-content: space-between; /* Logo居左，切换器居右 */
    align-items: center; /* 垂直居中对齐 */
    padding-bottom: 10px;
    border-bottom: 2px solid #8b4513; /* 添加底部边框 */
    margin-bottom: 20px;
}

.logo {
    /* Logo字体大小: 使其突出 */
    font-size: 2.5em; /* 较大的字体 */
    /* Logo字体粗细: 增加视觉冲击力 */
    font-weight: bold;
    /* Logo颜色: 使用醒目的颜色 */
    color: #d2691e; /* 巧克力色 */
    /* Logo文本阴影: 添加一点立体效果（夸张风格） */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    /* 移除H1的默认边距 */
    margin: 0;
}

.language-switcher button {
    /* 按钮样式: 基础样式 */
    padding: 5px 10px;
    margin-left: 5px;
    background-color: #d2691e; /* 按钮背景色 */
    color: #fff; /* 按钮文字颜色 */
    border: none;
    border-radius: 4px;
    cursor: pointer; /* 鼠标指针改为手型 */
    font-size: 0.9em;
}

.language-switcher button:hover,
.language-switcher button.active {
    /* 悬停和激活状态: 改变背景色 */
    background-color: #a0522d; /* 深一点的棕色 */
}

/* --- 主要内容区域 --- */
main {
    /* 布局: 可根据需要添加，目前由内部section管理 */
}

/* --- 游戏嵌入区域 --- */
#game {
    margin-bottom: 30px; /* 与下方内容隔开距离 */
}

.iframe-container {
    /* 定位上下文: 为全屏按钮定位提供基础 */
    position: relative;
    /* 宽度: 撑满父容器 */
    width: 100%;
    /* 高度: 通过padding-top技巧保持16:9的宽高比 */
    padding-top: 56.25%; /* 16:9 Aspect Ratio (9 / 16 = 0.5625) */
    /* 移除max-height，让padding-top控制高度 */
    /* max-height: 70vh; */
    overflow: hidden; /* 隐藏超出部分 */
    background-color: #000; /* Iframe加载时的背景 */
}

.iframe-container iframe {
    /* 定位: 绝对定位以填充容器 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* 移除iframe边框 */
}

/* 全屏按钮样式 */
#fullscreen-button {
    /* 定位: 绝对定位在容器右下角 */
    position: absolute;
    bottom: 10px;
    right: 10px;
    /* 样式: 与语言切换按钮类似 */
    padding: 8px 15px;
    background-color: rgba(40, 40, 40, 0.7); /* 半透明背景 */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 10; /* 确保在iframe之上 */
    font-size: 1em;
    opacity: 0.7;
    transition: opacity 0.3s ease; /* 过渡效果 */
}

#fullscreen-button:hover {
    opacity: 1; /* 悬停时不透明 */
}

/* --- 内容区域样式 --- */
#content {
    /* 布局: 添加内边距 */
    padding: 20px;
    background-color: #fffadf; /* 比主背景稍浅的黄色 */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 添加轻微阴影 */
}

#content section {
    /* 内容块间距: 为每个内容部分添加下边距 */
    margin-bottom: 30px;
}

#content h2 {
    /* H2标题样式 */
    font-size: 1.8em;
    color: #d2691e; /* 巧克力色 */
    margin-bottom: 15px;
    border-bottom: 1px solid #e0cda7;
    padding-bottom: 5px;
}

#content h3 {
    /* H3标题样式 */
    font-size: 1.4em;
    color: #8b4513; /* 棕色 */
    margin-bottom: 10px;
}

#content p,
#content article {
    /* 段落和文章间距 */
    margin-bottom: 15px;
}

/* 游戏截图画廊 */
.screenshot-gallery {
    /* 布局: 使用Flexbox */
    display: flex;
    /* 换行: 允许图片换行 */
    flex-wrap: wrap;
    /* 间距: 图片之间的空隙 */
    gap: 10px;
    /* 对齐: (可选) 水平居中图片 */
    /* justify-content: center; */
    margin-bottom: 15px; /* 与下方文字的间距 */
}

.screenshot-gallery img {
    /* 尺寸: 控制图片大小，允许伸缩 */
    flex: 1 1 calc(33.333% - 10px); /* 基础为3列，减去gap */
    max-width: calc(33.333% - 10px); /* 防止图片过大 */
    /* 最小宽度: (可选) 防止图片在小容器内变得过小 */
    min-width: 120px;
    /* 高度: 自动调整以保持宽高比 */
    height: auto;
    /* 边框/样式: (可选) 添加边框或阴影 */
    border: 1px solid #ccc;
    border-radius: 4px;
    object-fit: cover; /* 确保图片填充区域，可能裁剪 */
}

/* 用户评论样式 */
.comment {
    border-left: 4px solid #e0cda7; /* 左侧边框 */
    padding-left: 15px;
    margin-bottom: 20px;
    font-style: italic; /* 斜体 */
}

.comment cite {
    display: block; /* 引用来源独占一行 */
    margin-top: 5px;
    font-style: normal; /* 恢复正常字体 */
    font-size: 0.9em;
    color: #555;
}

/* 评论中的评分 */
.comment .rating {
    font-weight: bold; /* 加粗 */
    margin-top: -10px; /* 向上移动一点，靠近评论文本 */
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #666; /* 比引用文字稍深的灰色 */
}

/* --- 尾部样式 --- */
footer {
    /* 页脚样式 */
    text-align: center; /* 文字居中 */
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0cda7; /* 添加顶部边框 */
    font-size: 0.9em;
    color: #555; /* 较浅的文字颜色 */
}

footer p {
    margin-bottom: 5px; /* 段落间距 */
}

/* --- 响应式设计 --- */

/* 中等屏幕 (平板) */
@media (max-width: 768px) {
    header {
        /* 头部布局: 在小屏幕上允许换行 */
        flex-direction: column;
        align-items: flex-start; /* 左对齐 */
    }

    .logo {
        /* Logo大小: 调整字体大小 */
        font-size: 2em;
        margin-bottom: 10px; /* 与下方元素添加间距 */
    }

    .language-switcher {
        /* 切换器对齐: 让按钮靠左 */
        align-self: flex-start;
    }

    #content h2 {
        font-size: 1.6em;
    }

    #content h3 {
        font-size: 1.3em;
    }

    .iframe-container {
         max-height: 60vh; /* 调整Iframe最大高度 */
    }
}

/* 小型屏幕 (手机) */
@media (max-width: 480px) {
    body {
        font-size: 15px; /* 调整基础字体大小 */
    }

    header,
    main,
    footer {
        /* 内边距: 减少小屏幕上的内边距 */
        padding: 15px;
    }

    .logo {
        /* Logo大小: 进一步缩小 */
        font-size: 1.8em;
    }

     .language-switcher button {
        /* 按钮大小: 调整按钮大小 */
        padding: 4px 8px;
        font-size: 0.8em;
    }

    #content h2 {
        font-size: 1.5em;
    }

    #content h3 {
        font-size: 1.2em;
    }

     .iframe-container {
         max-height: 50vh; /* 进一步调整Iframe最大高度 */
     }

     #fullscreen-button {
         padding: 6px 10px;
         font-size: 0.9em;
     }
} 