body {
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Courier New', Courier, monospace; /* レトロな等幅フォント */
    color: #fff;
}

#game-container {
    width: 600px;
    height: 600px;
    background-color: #000;
    background-size: cover;
    position: relative;
    border: 4px solid #555;
    image-rendering: pixelated; /* ドット絵をくっきり表示 */
    /*transition: background-image 0.3s ease-in-out;  ←背景切り替え時のフェード加工*/
}

#start-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffcc00;
    color: #000;
    border: none;
    padding: 15px 30px;
    font-size: 24px;
    font-family: inherit;
    cursor: pointer;
    z-index: 10;
}

#ui-layer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
}

#dialogue-window {
    background-color: rgba(0, 0, 0, 0.85);
    border: 3px solid #fff;
    padding: 15px;
    min-height: 120px;
    position: relative;
}

#character-name {
    color: #ffcc00;
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 10px;
}

#dialogue-text {
    font-size: 18px;
    line-height: 1.5;
}

#choices-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#choices-container button {
    background-color: #333;
    color: #fff;
    border: 1px solid #fff;
    padding: 8px;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
}

#choices-container button:hover {
    background-color: #ffcc00;
    color: #000;
}

#next-icon {
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: #ffcc00;
    font-size: 24px;
    animation: blink 1s infinite;
    pointer-events: none; /* ★ このアイコン自体はクリック判定を持たないようにする */
}
#next-button {
    /* 親要素（#ui-layer）を基準にして絶対配置にする */
    position: absolute; 
    top: 0;
    left: 0;
    
    /* 幅と高さを親要素（テキストボックス全体）に合わせる */
    width: 100%;
    height: 100%; 
    
    /* 背景と枠線を透明にする */
    background: transparent; 
    border: none; 
    
    /* クリックできることを示すカーソルにする */
    cursor: pointer;
    
    /* テキストや選択肢より手前に来るようにz-indexを設定（必要に応じて調整） */
    z-index: 5; 
    
    /* 最初は隠しておく */
    display: none;
}
    

#end-button {
    position: absolute;
    bottom: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #ffcc22;
    font-size: 24px;
    cursor: pointer;
}


@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
