/* ゲームコンテナのスタイル */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
}

/* 背景画像のスタイル */
#background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    will-change: background-image;
}

/* キャラクター画像のスタイル */
#character {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 540px;
    height: 810px;
    max-width: 80vw;
    max-height: 80vh;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom center;
    z-index: 2;
}

/* スマホ対応 */
/*@media screen and (max-width: 768px) {
    #character {
        width: 300px;
        height: auto;
        max-width: 80vw;
        max-height: 60vh;
    }
} */

/* テキストボックスのスタイル */
#text-box {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border-radius: 20px;
    font-family: sans-serif;
    z-index: 3;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

/* キャラクター名のスタイル */
#character-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #ff7777;
    font-size: 20px;
}

/* テキスト内容のスタイル */
#dialogue {
    line-height: 1.6;
}

/* 選択肢コンテナのスタイル */
#choice-container {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 4;
}

/* 選択肢ボタンのスタイル */
.choice-button {
    padding: 15px;
    background-color: rgba(255, 150, 150, 0.6); /* 薄い赤、強めの透過 */
    color: #fff;
    border: 1px solid rgba(255, 150, 150, 0.8);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    font-family: sans-serif;
    backdrop-filter: blur(5px);
    transition: background-color 0.3s, border 0.3s;
}

/* ホバー時のスタイル */
.choice-button:hover {
    background-color: rgba(255, 150, 150, 0.8);
    border-color: rgba(255, 150, 150, 1);
}

/* ボタンの文字が読みやすいように少し大きめに */
.choice-button {
    font-size: 18px;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
    .choice-button {
        font-size: 16px;
        padding: 10px;
    }

    #text-box {
        padding: 15px 20px;
    }

    #character-name {
        font-size: 18px;
        padding: 8px 12px;
    }
}

/* BGMボタンのスタイル */
#bgm-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 150, 150, 0.8);
    color: #fff;
    border: none;
    border-radius: 30px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    z-index: 5;
    transition: background-color 0.3s;
}

#bgm-button:hover {
    background-color: rgba(255, 150, 150, 1);
}

/* BGMボタンのスタイル */
#bgm-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 150, 150, 0.8);
    color: #fff;
    border: none;
    border-radius: 30px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: background-color 0.3s;
}

/* BGMボタンホバー */
#bgm-button:hover {
    background-color: rgba(255, 150, 150, 1);
}

/* 音量スライダーのスタイル */
#volume-slider {
    position: absolute;
    top: 90px;  /* ボタンの下に配置 */
    right: 30px;
    width: 150px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.6);
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* スライダーのつまみ */
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 150, 150, 0.8);
    cursor: pointer;
    transition: background-color 0.3s;
}

/* つまみホバー */
#volume-slider::-webkit-slider-thumb:hover {
    background-color: rgba(255, 150, 150, 1);
}

/* タイトル画面 */
#title-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    overflow: hidden;
}

/* タイトル背景画像 */
#title-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("assets/bg-def.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* タイトルロゴ */
#title-image {
    width: 80%;
    max-width: 600px;
    margin-bottom: 20px;
    z-index: 1;
}

/* スタートボタン */
#start-button {
    padding: 15px 30px;
    background-color: #ffcc00;
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 1;
    margin-bottom: 20px;
}

#start-button:hover {
    background-color: #ffaa00;
}

/* 注釈 */
#title-note {
    color: #ffffff;
    font-size: 18px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* 終了画面 */
#end-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 20px;
}

#end-screen h2 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 32px;
}

#end-screen button {
    padding: 15px 30px;
    margin: 10px;
    background-color: #ffcc00;
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#end-screen button:hover {
    background-color: #ffaa00;
}