/* CSS Reset - 基础重置 */
*,
*::before,
*::after {
    box-sizing: border-box; /* 盒子模型设置为 border-box */
    margin: 0; /* 清除外边距 */
    padding: 0; /* 清除内边距 */
}

/* HTML and Body - 页面基础样式 */
html {
    scroll-behavior: smooth; /* 平滑滚动效果 */
    font-size: 16px; /* 根字体大小 (可根据需要调整) */
}

body {
    font-family: 'Arial', sans-serif; /* 默认字体 (稍后替换为卡通字体) */
    line-height: 1.6; /* 行高 */
    color: #333; /* 默认文字颜色 */
    /* background-color: #ffffff; /* 页面背景色 (白色) */
    background-color: #fff0f5; /* Fallback background color (淡粉色) */
    background-image: linear-gradient(to bottom, #fff0f5, #ffffff); /* 从淡粉色到白色的渐变 */
    display: flex; /* 使用 Flexbox 布局 */
    flex-direction: column; /* 主轴方向为垂直 */
    min-height: 100vh; /* 最小高度为视口高度 */
}

/* Theme Colors - 主题颜色变量 */
:root {
    --color-primary: #ff69b4; /* 主要颜色 (粉色) */
    --color-secondary: #9370db; /* 次要颜色 (紫色) */
    --color-text: #333333; /* 主要文字颜色 */
    --color-light-text: #ffffff; /* 浅色文字颜色 (用于深色背景) */
    --color-background: #ffffff; /* 背景色 */
    --color-border: #dddddd; /* 边框颜色 */
}

/* Container - 页面内容容器 */
.site-header,
.site-main,
.site-footer {
    /* width: 100%; /* 宽度占满 */
    width: 80%; /* 设置宽度为视口宽度的 80% */
    max-width: 1200px; /* 最大宽度限制 */
    margin-left: auto; /* 水平居中 */
    margin-right: auto; /* 水平居中 */
    padding: 1rem 1.5rem; /* 内边距 */
}

/* Header - 页面头部样式 */
.site-header {
    display: flex; /* 使用 Flexbox 布局 */
    justify-content: space-between; /* 两端对齐 */
    align-items: center; /* 垂直居中 */
    background-color: var(--color-secondary); /* 头部背景色 (紫色) */
    padding: 0.5rem 1.5rem; /* 调整内边距 */
    color: var(--color-light-text); /* 文字颜色 */
}

.logo {
    font-size: 1.8rem; /* Logo 字体大小 */
    font-weight: bold; /* 字体加粗 */
    /* TODO: 添加卡通字体样式 */
    color: var(--color-primary); /* Logo 颜色 (粉色) */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* 轻微文字阴影 */
}

.language-switcher button {
    background-color: var(--color-primary); /* 按钮背景色 (粉色) */
    color: var(--color-light-text); /* 按钮文字颜色 */
    border: none; /* 无边框 */
    padding: 0.5em 1em; /* 内边距 */
    margin-left: 0.5em; /* 左外边距 */
    border-radius: 5px; /* 圆角 */
    cursor: pointer; /* 鼠标指针样式 */
    transition: background-color 0.3s ease; /* 背景色过渡效果 */
}

.language-switcher button:hover,
.language-switcher button.active {
    background-color: #ff85c1; /* 鼠标悬停或激活时的背景色 (浅粉色) */
}

/* Main Content Area - 主要内容区域 */
.site-main {
    flex-grow: 1; /* 占据剩余空间 */
}

/* Game Section - 游戏区域 */
.game-container {
    margin-bottom: 2rem; /* 底部外边距 */
    text-align: center; /* 内部元素居中 */
}

#iframe-wrapper {
    position: relative; /* 相对定位，用于全屏 */
    width: 100%; /* 宽度占满 */
    padding-top: 56.25%; /* 16:9 宽高比 (高度/宽度 * 100%) */
    /* height: 600px; /* 或者固定高度 */
    margin-bottom: 1rem; /* 底部外边距 */
    background-color: #f0f0f0; /* Iframe 加载前的背景色 */
}

#game-iframe {
    position: absolute; /* 绝对定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* 移除 iframe 边框 */
}

#fullscreen-button {
    background-color: var(--color-secondary); /* 背景色 (紫色) */
    color: var(--color-light-text); /* 文字颜色 */
    border: none; /* 无边框 */
    padding: 0.8em 1.5em; /* 内边距 */
    border-radius: 5px; /* 圆角 */
    cursor: pointer; /* 鼠标指针样式 */
    font-size: 1rem; /* 字体大小 */
    transition: background-color 0.3s ease; /* 过渡效果 */
}

#fullscreen-button:hover {
    background-color: #a380e4; /* 鼠标悬停背景色 (浅紫色) */
}

/* Content Area - 文本内容区域 */
.content-area {
    padding: 1rem 0; /* 上下内边距 */
}

.content-area h1,
.content-area h2,
.content-area h3 {
    color: var(--color-secondary); /* 标题颜色 (紫色) */
    margin-top: 1.5em; /* 上外边距 */
    margin-bottom: 0.8em; /* 下外边距 */
    /* TODO: 可能也应用卡通字体 */
}

.content-area h1 {
    font-size: 2.5rem; /* H1 字体大小 */
    text-align: center; /* 居中 */
    color: var(--color-primary); /* H1 颜色 (粉色) */
    margin-top: 0;
}

.content-area h2 {
    font-size: 1.8rem; /* H2 字体大小 */
    border-bottom: 2px solid var(--color-primary); /* 底部边框 (粉色) */
    padding-bottom: 0.3em; /* 边框与文字间距 */
}

.content-area h3 {
    font-size: 1.4rem; /* H3 字体大小 */
    color: var(--color-primary); /* H3 颜色 (粉色) */
}

.content-area p,
.content-area ul,
.content-area li {
    margin-bottom: 1em; /* 元素间下外边距 */
    color: var(--color-text); /* 文本颜色 */
}

.content-area ul {
    padding-left: 20px; /* 列表左内边距 */
}

.content-area a {
    color: var(--color-primary); /* 链接颜色 (粉色) */
    text-decoration: none; /* 去除下划线 */
}

.content-area a:hover {
    text-decoration: underline; /* 鼠标悬停显示下划线 */
}

/* Screenshot Gallery - 截图画廊 */
.screenshot-gallery {
    display: grid; /* 使用 Grid 布局 */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 响应式列 */
    gap: 1rem; /* 网格间距 */
}

.screenshot-gallery img {
    width: 100%; /* 图片宽度占满 */
    height: auto; /* 高度自适应 */
    border: 1px solid var(--color-border); /* 图片边框 */
    border-radius: 5px; /* 圆角 */
}

/* Reviews - 评论区 */
.review {
    background-color: #f9f9f9; /* 评论背景色 */
    border-left: 4px solid var(--color-primary); /* 左边框 (粉色) */
    padding: 1em; /* 内边距 */
    margin-bottom: 1em; /* 下外边距 */
    border-radius: 0 5px 5px 0; /* 圆角 */
}

.review p {
    font-style: italic; /* 斜体 */
    margin-bottom: 0; /* 移除段落底部外边距 */
}

/* Footer - 页面尾部样式 */
.site-footer {
    background-color: #f1f1f1; /* 页脚背景色 */
    text-align: center; /* 文字居中 */
    padding: 1.5rem; /* 内边距 */
    margin-top: 2rem; /* 顶部外边距 */
    font-size: 0.9rem; /* 字体大小 */
    color: #666; /* 文字颜色 */
}

.site-footer p {
    margin-bottom: 0.5em; /* 段落下外边距 */
}

.site-footer a {
    color: var(--color-secondary); /* 链接颜色 (紫色) */
}

/* Responsive Design - 响应式设计 */
/* TODO: 添加媒体查询以适应不同屏幕尺寸 */
@media (max-width: 768px) {
    /* 针对平板及以下设备的样式 */
    .site-header {
        flex-direction: column; /* 垂直排列 */
        padding: 1rem; /* 调整内边距 */
    }

    .logo {
        margin-bottom: 0.5rem; /* Logo 底部外边距 */
    }

    .language-switcher {
        margin-top: 0.5rem; /* 语言切换器顶部外边距 */
    }

    .language-switcher button {
        margin: 0.2em; /* 按钮外边距 */
    }

    .content-area h1 {
        font-size: 2rem; /* 调整 H1 字体大小 */
    }

    .content-area h2 {
        font-size: 1.5rem; /* 调整 H2 字体大小 */
    }

    #iframe-wrapper {
         padding-top: 75%; /* 在较窄屏幕上可能需要调整宽高比，例如 4:3 */
         /* 或者根据实际游戏调整 */
    }
}

@media (max-width: 480px) {
    /* 针对手机设备的样式 */
    html {
        font-size: 14px; /* 调整根字体大小 */
    }

    .site-header,
    .site-main,
    .site-footer {
        padding: 1rem; /* 调整整体内边距 */
    }

    .language-switcher button {
        padding: 0.4em 0.8em; /* 调整按钮内边距 */
        font-size: 0.9rem; /* 调整按钮字体大小 */
    }
} 