﻿*
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 优先使用隶书，如果没有则使用系统自带的衬线体 */
    font-family: "LiSu", "隶书", "STLibaiti", "serif";
}

/*:root
{*/
    /* 这里定义默认图片，方便你之后通过 JS 动态修改 --bg-url 等变量 */
    /*--char-a-url: url('image/zaozao.png');
    --char-b-url: url('image/shifu.png');   
}*/

body
{
    /* 1. 设置背景图及基础属性 */
    background-repeat: no-repeat;
    background-position: left center; /* 关键：锁定左侧开始铺开 */
    background-color: #f6f6f6;
    /* 2. 定义动画：3秒完成，平滑过渡 */
    animation: spreadRight 3s ease-out forwards;
    /* 以下为你原有的其他样式 */
    border-radius: 20px;
    margin: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40px);
}

/* 3. 定义铺开的动画帧 */
@keyframes spreadRight
{
    from
    {
        background-size: 0% 100%; /* 初始宽度为0 */
    }

    to
    {
        background-size: 100% 100%; /* 铺满全屏，若想保持比例可用 cover */
    }
}

.game-container
{
    width: 100%;
    max-width: 1000px;
    background: transparent; /*  */
    border: 10px solid #2c3e50; /* 四周的边框颜色 */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 8px 6px #506983; /*阴影颜色*/    
}

.title-bar
{
    text-align: center;
    font-size: 30px;
    /*font-weight: bold;*/
    padding: 5px;
    background-color: rgba(44,62,80, 0.3); /* 半透明标题栏，增加高级感 */
    border-bottom: 0.5px solid #506983;
    color: #2c3e50; /* 标题字的颜色 */
}

.scene-area
{
    width: 100%;
    height: 550px;
    background: transparent; /* 透明，显示body背景 */
    position: relative;
}

.character
{
    width: 20%;
    max-width: 200px;
    min-width: 140px;
    height: auto;
    aspect-ratio: 2/3; /*保持比例不变形*/
    position: absolute;
    bottom: 0;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 9999;
}

.char-a
{
    left: 5%;
    background-image: var(--char-a-url); /* 使用变量 */
}

.char-b
{
    right: 5%;
    background-image: var(--char-b-url); /* 使用变量 */
}

.dialogue-bubble
{
    position: absolute;
    padding: 5px 5px;
    background-color: rgba(44,62,80, 0.2);
    border: 0.5px solid#2c3e50; /*  */
    border-radius: 8px;
    font-size: 20px;
    color: #2c3e50;
    display: none;
}

.dialogue-a
{
    top: 80px;
    left: 150px;
}

.dialogue-b
{
    top: 120px;
    right: 150px;
}

.story-area
{
    padding: 20px;
    font-size: 26px;
    line-height: 1.4;
    background-color: rgba(44,62,80, 0.4); /* 半透明标题栏，增加高级感 */
    border-top: 2px solid #506983;
    min-height: 120px;
    color: #fff;
   /* text-shadow: 2px 2px 8px rgba(0, 0, 0, 1), 0 0 10px rgba(0,0,0,0.5);*/
  /*  font-weight: bold;*/
    text-align: center;
}

.buttons-area
{
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    padding: 10px;
    background-color: #2c3e50;
    min-height: 60px;
}

.choice-btn
{
    flex: 1;
    padding: 5px 25px;
    font-size: 20px;
    cursor: pointer;
    background-color: #2c3e50;
    color: #fff;
    border: 0.5px solid #506983;
    border-radius: 25px;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: inset 0 0 8px 6px #506983; /*阴影颜色*/
}

    .choice-btn:active
    {
        box-shadow: 0 0 0 2px  #2c3e50; /* 按钮效果颜色 */
    }

        .choice-btn:active::after
        {
            content: '';
            position: absolute;
            left: -5px;
            top: -5px;
            background-color: #2c3e50; /* 按钮颜色 */
            border: 0.5px solid #506983;
            box-sizing: border-box;
            opacity: 1;
        }

.nav-btns
{
    margin-top: 10px;
    margin-bottom: 15px;
    display: flex;
    gap: 0px;
}

    .nav-btns button
    {
        flex: 1;
        padding: 5px 5px;
        cursor: pointer;
        background-color: rgba(44,62,80, 0.4); /* 半透明标题栏，增加高级感 */
        border-top: 2px solid #506983;
        color: #041f3a;
        font-size: 18px;
        /* font-weight: bold;*/
    }

        .nav-btns button:hover
        {
            background: #2c3e50; /* 上下页效果颜色 */
            color: #fff;
        }

