* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #91ADC8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: linear-gradient(45deg, #647FBC 25%, #91ADC8 25%, #91ADC8 50%, #647FBC 50%, #647FBC 75%, #91ADC8 75%, #91ADC8 100%);
    background-size: 56.57px 56.57px;
}

.game-container {
    width: 95vw;
    height: 90vh;
    position: relative;
    overflow: hidden;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 182, 193, 0.5);
}

/* .scene using sky image as background */
.scene {
    width: 100%;
    height: 70%;
    position: relative;
    overflow: hidden;

    /* Layer an optional soft gradient (for readability) over the image */
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.0)),
        url('background.jpg'); /* <-- change to your relative path */

    background-repeat: no-repeat;
    background-position: center top; /* try 'center center' or 'center bottom' if needed */
    background-size: cover;          /* cover fills the area responsively */
    will-change: background-position;
    transition: background-position 0.3s ease;
}


/* ...existing code... */

.character {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 400px;
    background-image: url('student.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    transition: opacity 0.3s ease;
}

/* Add these new classes for character transitions */
.character.hidden {
    opacity: 0;
}

.character.visible {
    opacity: 1;
}

/* Add this if you want to support multiple characters */
.character[data-character="character1"] {
    background-image: url('student.png');
}

.character[data-character="character2"] {
    background-image: url('character2.png');
}
/* ...existing code... */

.dialog-box {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30%;
    background-color: #ebedd9a2;
    padding: 20px;
    color: #4a4a4a;
    border-top: 3px solid rgba(182, 206, 255, 0.42);
    backdrop-filter: blur(5px);
}

.speaker {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 12px;
    color: #365db9;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.text-content {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #000000;
    text-shadow: 0.5px 0.5px 1px rgba(255, 255, 255, 0.8);
}

.choices {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.choice-btn {
    padding: 12px 24px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #3396D3;
    color: #3396D3;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 25px;
    font-size: 1em;
    min-width: 200px;
    box-shadow: 0 3px 6px rgba(255, 105, 180, 0.2);
}

.choice-btn:hover {
    background-color: #3396D3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(255, 105, 180, 0.3);
}
/* 下一句箭頭動畫 */
.text-content + div {
    text-align: right;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}
