body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Microsoft JhengHei', sans-serif;
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.background {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    z-index: -1;
}

.hidden {
    display: none;
}

/* 標題畫面樣式 */
#title-screen {
    background-color: #000;
    background-image: url('title-bg.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
}
.title-content {
    color: white;
    text-shadow: 2px 2px 4px #000;
}
#start-btn {
    padding: 10px 20px;
    font-size: 1.5em;
    cursor: pointer;
    background-color: #f0f0f0;
    border: none;
    border-radius: 5px;
    margin-top: 20px;
}

/* 對話框畫面樣式 */
#dialogue-background {
    background-image: url('dialogue-bg.jpg');
}
.dialogue-box {
    position: absolute;
    bottom: 5%;
    width: 80%;
    min-height: 150px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#dialogue-text {
    margin-bottom: 20px;
    font-size: 1.2em;
    text-align: center;
}
.next-indicator {
    position: absolute;
    bottom: 5px;
    right: 15px;
    cursor: pointer;
    font-size: 0.9em;
    color: #ccc;
    animation: blink 1s infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* 文字選項畫面樣式 */
#selection-screen {
    background-image: url('selection-bg.jpg');
    background-color: #000;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
}
.selection-content {
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-shadow: 2px 2px 4px #000;
}
#selection-title {
    font-size: 1.5em;
    font-weight: bold;
}
#selection-box {
    width: 300px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}
#option-display {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0;
}
#play-btn {
    padding: 10px 20px;
    font-size: 1.2em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    margin-top: 20px;
    background-image: linear-gradient(to right, #f7d34b, #90be6d);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-position 0.3s ease;
}
#play-btn:hover {
    background-position: right center;
}
#play-btn:disabled {
    background-image: linear-gradient(to right, #e0e0e0, #a0a0a0);
    cursor: not-allowed;
}

/* 結局畫面樣式 */
#ending-background {
    background-image: url('ending-bg.jpg');
}
.ending-box {
    position: absolute;
    bottom: 5%;
    width: 80%;
    min-height: 150px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#ending-text {
    font-size: 1.2em;
    margin: 0;
    text-align: center;
}
#restart-btn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1.2em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-image: linear-gradient(to right, #f7d34b, #90be6d);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-position 0.3s ease;
}
#restart-btn:hover {
    background-position: right center;
}