/* 全局样式设置 */
body {
    font-family: Arial, sans-serif;
    /* 字体设置 */
    text-align: center;
    /* 文本居中 */
    background-color: #f0f0f0;
    /* 浅灰色背景 */
    margin: 0;
    /* 清除默认外边距 */
    padding: 0;
    /* 清除默认内边距 */
}

/* 标题样式 */
h1 {
    color: #333;
    /* 深灰色文字 */
    margin-top: 20px;
    /* 顶部外边距 */
}

/* 背景容器样式 */
.background {
    position: relative;
    /* 相对定位，作为子元素的定位基准 */
    width: 100%;
    /* 宽度100% */
    height: 500px;
    /* 固定高度 */
    margin: 20px auto;
    /* 上下外边距20px，左右居中 */
    overflow: hidden;
    /* 隐藏超出容器的内容 */
}

/* 背景图片样式 */
.bg-image {
    width: 100%;
    /* 宽度100% */
    height: 100%;
    /* 高度100% */
    object-fit: cover;
    /* 保持比例并覆盖容器 */
    transition: opacity 1s ease;
    /* 透明度变化动画 */
}

/* 角色图片样式 */
.character {
    position: absolute;
    /* 绝对定位 */
    left: 0;
    /* 初始左侧对齐 */
    top: 50%;
    /* 垂直居中 */
    transform: translateY(-50%);
    /* 精确垂直居中 */
    width: 150px;
    /* 固定宽度 */
    height: auto;
    /* 高度自动，保持比例 */
    transition: all 1s ease;
    /* 所有属性变化动画 */
}

/* 操作按钮区域样式 */
.action-box {
    margin: 20px auto;
    /* 上下外边距20px，左右居中 */
    padding: 10px;
    /* 内边距 */
    background-color: #fff;
    /* 白色背景 */
    border: 1px solid #ccc;
    /* 灰色边框 */
    border-radius: 5px;
    /* 圆角边框 */
    width: 300px;
    /* 固定宽度 */
}

/* 按钮样式 */
button {
    margin: 5px;
    /* 外边距 */
    padding: 10px 20px;
    /* 内边距 */
    font-size: 16px;
    /* 字体大小 */
    cursor: pointer;
    /* 鼠标指针样式为手型 */
}

/* 进度条容器样式（与index.html中的样式互补） */
.progress-container {
    width: 100%;
    /* 宽度100% */
    margin: 10px auto;
    /* 上下外边距10px，左右居中 */
    background-color: #e0e0e0;
    /* 浅灰色背景 */
    border-radius: 5px;
    /* 圆角边框 */
    overflow: hidden;
    /* 隐藏超出容器的内容 */
}

/* 进度条样式（与index.html中的样式互补） */
.progress-bar {
    height: 20px;
    /* 高度20px */
    background-color: #4CAF50;
    /* 绿色背景 */
    width: 0%;
    /* 初始宽度0% */
    transition: width 0.5s ease;
    /* 宽度变化动画 */
}