/* style.css */

/* --- 全局和基本样式 --- */

/* 定义颜色变量 */
:root {
    --primary-blue: #007bff; /* 主蓝色 */
    --secondary-orange: #fd7e14; /* 次要橙色 */
    --light-text: #ffffff; /* 亮色文字 (白色) */
    --dark-text: #333333; /* 暗色文字 (深灰) */
    --background-light: #f8f9fa; /* 浅背景色 */
    --border-color: #dee2e6; /* 边框颜色 */
    --cartoon-font: 'Luckiest Guy', cursive; /* 卡通字体 */
    --body-font: sans-serif; /* 正文字体 (备用) */
}

/* 重置默认边距和内边距 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 设置基础 HTML 和 Body 样式 */
html {
    scroll-behavior: smooth; /* 平滑滚动效果 */
}

body {
    font-family: var(--body-font); /* 默认使用备用字体 */
    line-height: 1.6; /* 设置行高 */
    color: var(--dark-text); /* 默认文字颜色 */
    /* background-color: var(--background-light); */ /* 旧的纯色背景 */
    background-color: var(--background-light); /* 设置浅色背景作为渐变不支持时的后备 */
    background-image: linear-gradient(to bottom, #a8d8ff, var(--background-light)); /* 添加从上到下（深浅蓝到浅背景色）的渐变 */
    display: flex; /* 使用 Flexbox 布局 */
    flex-direction: column; /* 主轴方向为垂直 */
    min-height: 100vh; /* 最小高度为视口高度 */
}

/* 主要内容区域占据剩余空间 */
main {
    flex-grow: 1; /* 占据父容器剩余空间 */
    width: 100%; /* 宽度100% */
    max-width: 1200px; /* 最大宽度限制，保持内容居中 */
    margin: 0 auto; /* 左右自动边距，实现居中 */
    padding: 20px; /* 内边距 */
}

/* --- 头部样式 --- */
.site-header {
    background-color: var(--primary-blue); /* 头部背景色 */
    color: var(--light-text); /* 头部文字颜色 */
    padding: 15px 30px; /* 内边距 */
    display: flex; /* 使用 Flexbox 布局 */
    justify-content: space-between; /* 两端对齐 */
    align-items: center; /* 垂直居中 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}

/* Logo 样式 */
.logo {
    font-family: var(--cartoon-font); /* 使用卡通字体 */
    font-size: 2.5rem; /* 字体大小 */
    margin: 0; /* 移除外边距 */
    color: var(--light-text); /* Logo 颜色 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* 添加文字阴影 */
}

/* 语言切换器样式 */
.language-switcher button {
    font-family: var(--body-font); /* 按钮字体 */
    background-color: transparent; /* 透明背景 */
    border: 1px solid var(--light-text); /* 白色边框 */
    color: var(--light-text); /* 白色文字 */
    padding: 5px 10px; /* 内边距 */
    margin-left: 5px; /* 左外边距 */
    cursor: pointer; /* 鼠标指针样式 */
    border-radius: 4px; /* 圆角 */
    transition: background-color 0.3s, color 0.3s; /* 过渡效果 */
}

/* 语言切换器按钮悬停效果 */
.language-switcher button:hover {
    background-color: var(--light-text); /* 背景变白 */
    color: var(--primary-blue); /* 文字变蓝 */
}

/* 激活状态的语言按钮 */
.language-switcher button.active {
    background-color: var(--secondary-orange); /* 橙色背景 */
    border-color: var(--secondary-orange); /* 橙色边框 */
    color: var(--light-text); /* 白色文字 */
    font-weight: bold; /* 字体加粗 */
}

/* --- 游戏区域样式 --- */
.game-container {
    position: relative; /* 相对定位，用于定位全屏按钮 */
    margin-bottom: 30px; /* 底部外边距 */
    background-color: #000; /* 黑色背景衬托游戏 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    border-radius: 8px; /* 圆角 */
    overflow: hidden; /* 隐藏溢出内容 */
}

/* iframe 样式 */
#game-iframe {
    display: block; /* 块级元素，消除下方空隙 */
    border: none; /* 移除边框 */
    width: 100%; /* 宽度 100% */
    /* height 由 HTML 设置 */
}

/* 全屏按钮样式 */
.fullscreen-btn {
    position: absolute; /* 绝对定位 */
    bottom: 15px; /* 距离底部 */
    right: 15px; /* 距离右侧 */
    background-color: var(--secondary-orange); /* 橙色背景 */
    color: var(--light-text); /* 白色文字 */
    border: none; /* 无边框 */
    padding: 10px 15px; /* 内边距 */
    border-radius: 5px; /* 圆角 */
    cursor: pointer; /* 鼠标指针 */
    font-family: var(--body-font); /* 字体 */
    font-weight: bold; /* 加粗 */
    z-index: 10; /* 确保在 iframe 上方 */
    transition: background-color 0.3s; /* 过渡效果 */
}

.fullscreen-btn:hover {
    background-color: #e66900; /* 悬停时深橙色 */
}

/* --- 内容区域样式 --- */
.content-area {
    padding: 0 10px; /* 左右留白 */
}

/* 内容块样式 */
.content-block {
    background-color: var(--light-text); /* 白色背景 */
    padding: 25px; /* 内边距 */
    margin-bottom: 25px; /* 底部外边距 */
    border-radius: 8px; /* 圆角 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* 轻微阴影 */
}

/* 内容区域标题样式 (h2) */
.content-block h2 {
    font-family: var(--cartoon-font); /* 卡通字体 */
    color: var(--primary-blue); /* 蓝色标题 */
    font-size: 1.8rem; /* 字体大小 */
    margin-bottom: 15px; /* 底部外边距 */
    border-bottom: 2px solid var(--secondary-orange); /* 橙色下划线 */
    padding-bottom: 5px; /* 下划线与文字间距 */
}

/* 内容区域副标题样式 (h3) */
.content-block h3 {
    font-family: var(--cartoon-font); /* 卡通字体 */
    color: var(--secondary-orange); /* 橙色标题 */
    font-size: 1.4rem; /* 字体大小 */
    margin-top: 20px; /* 顶部外边距 */
    margin-bottom: 10px; /* 底部外边距 */
}

/* 内容区域段落样式 */
.content-block p {
    margin-bottom: 15px; /* 段落间距 */
    color: #555; /* 稍深的灰色文字 */
}

/* SEO 内容中加粗的关键词 */
.seo-content strong {
    color: var(--primary-blue); /* 蓝色强调 */
    font-weight: normal; /* 移除加粗效果，依赖颜色区分 */
}

/* 截图画廊 */
.screenshots-gallery {
    display: grid; /* 使用 Grid 布局 */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* 自动适配列数，最小宽度150px，最大平分剩余空间 */
    gap: 15px; /* 图片之间的间隙 */
}

/* 截图画廊中的图片 */
.screenshots-gallery img {
    width: 100%; /* 图片宽度填满网格单元 */
    height: 150px; /* 设置统一的固定高度 */
    object-fit: cover; /* 保持图片纵横比，裁剪多余部分以填充容器 */
    border-radius: 5px; /* 轻微圆角 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加细微阴影 */
    display: block; /* 确保图片是块级元素 */
}

/* 评论区样式 */
.reviews blockquote {
    border-left: 4px solid var(--secondary-orange); /* 橙色左边框 */
    margin-bottom: 20px; /* 底部外边距 */
    padding-left: 15px; /* 左内边距 */
    font-style: italic; /* 斜体 */
    color: #666; /* 灰色文字 */
}

.reviews blockquote footer {
    margin-top: 5px; /* 顶部外边距 */
    font-style: normal; /* 恢复正常字体 */
    font-size: 0.9em; /* 稍小字号 */
    color: #888; /* 更浅的灰色 */
    text-align: right; /* 右对齐 */
}

/* --- 页脚样式 --- */
.site-footer {
    background-color: var(--dark-text); /* 深灰色背景 */
    color: var(--light-text); /* 白色文字 */
    text-align: center; /* 文本居中 */
    padding: 20px; /* 内边距 */
    margin-top: 30px; /* 顶部外边距 */
    font-size: 0.9em; /* 稍小字号 */
}

.site-footer p {
    margin-bottom: 5px; /* 段落间距 */
}

.site-footer a {
    color: var(--secondary-orange); /* 橙色链接 */
    text-decoration: none; /* 去除下划线 */
}

.site-footer a:hover {
    text-decoration: underline; /* 悬停时显示下划线 */
}

/* --- 响应式设计 --- */

/* 中等屏幕 (平板) */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column; /* 头部改为垂直排列 */
        padding: 15px; /* 调整内边距 */
    }

    .logo {
        margin-bottom: 10px; /* Logo下方增加间距 */
        font-size: 2rem; /* 调整Logo大小 */
    }

    .language-switcher {
        margin-top: 10px; /* 语言切换器上方增加间距 */
    }

    main {
        padding: 15px; /* 调整主内容区内边距 */
    }

    .content-block h2 {
        font-size: 1.6rem; /* 调整 H2 大小 */
    }

    .content-block h3 {
        font-size: 1.2rem; /* 调整 H3 大小 */
    }

    #game-iframe {
        height: 450px; /* 调整游戏高度 */
    }
}

/* 小型屏幕 (手机) */
@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem; /* 进一步缩小 Logo */
    }

    .language-switcher button {
        padding: 4px 8px; /* 调整按钮内边距 */
        font-size: 0.9em; /* 调整按钮字体大小 */
    }

    main {
        padding: 10px; /* 进一步减少内边距 */
    }

    .content-block {
        padding: 15px; /* 调整内容块内边距 */
    }

    .content-block h2 {
        font-size: 1.4rem; /* 进一步缩小 H2 */
    }

     .content-block h3 {
        font-size: 1.1rem; /* 进一步缩小 H3 */
    }

    #game-iframe {
        height: 350px; /* 进一步调整游戏高度 */
    }

    .fullscreen-btn {
        padding: 8px 12px; /* 调整全屏按钮大小 */
        font-size: 0.9em;
        bottom: 10px;
        right: 10px;
    }

    .site-footer {
        font-size: 0.8em; /* 调整页脚字体大小 */
    }
} 