body {
    margin: 0;
    padding: 0;
    background-color: #333;
    color: white;
    font-family: 'Microsoft JhengHei', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden; /* 隱藏捲軸 */
}

#gameCanvas {
    background-color: #000;
    border: 2px solid #fff;
}

#character-selection {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    z-index: 10;
}

#character-selection h1 {
    margin-bottom: 30px;
}

.character-options button {
    padding: 15px 30px;
    font-size: 18px;
    margin: 0 15px;
    cursor: pointer;
    border: 2px solid white;
    background-color: transparent;
    color: white;
    transition: background-color 0.3s, color 0.3s;
}

.character-options button:hover {
    background-color: white;
    color: black;
}

#game-ui {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
}

#game-ui div {
    margin-bottom: 5px;
}

#game-over-screen {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    z-index: 10;
}

#game-over-screen h1 {
    margin-bottom: 20px;
}

#game-over-screen button {
     padding: 10px 20px;
     font-size: 16px;
     cursor: pointer;
}

/* (保留您原有的 CSS) */

/* ... 您原有的 style.css 內容 ... */

/* ===== 新增：永久升級介面樣式 ===== */
#permanent-upgrades-container {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
}

#souls-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700; /* 金色 */
    margin-bottom: 15px;
    text-align: center;
}

#upgrades-list {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.upgrade-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    font-size: 0.9em;
    background-color: #555;
    color: white;
    border: 2px solid #777;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.upgrade-btn:hover:not(:disabled) {
    background-color: #666;
    transform: translateY(-2px);
}

.upgrade-btn .upgrade-name {
    font-weight: bold;
    font-size: 1em;
}

.upgrade-btn small {
    margin-top: 5px;
    font-size: 0.8em;
    color: #ccc;
}

.upgrade-btn .upgrade-cost {
    color: #ffc107;
    font-weight: bold;
}

.upgrade-btn:disabled {
    background-color: #333;
    cursor: not-allowed;
    color: #888;
}

.upgrade-btn:disabled .upgrade-cost {
    color: #888;
}

/* 遊戲結束畫面的樣式 */
#game-over-screen p {
    font-size: 1.2em;
    margin: 5px 0;
}


/* ... 您原有的 style.css 內容 ... */

/* ===== 新增：遊戲說明畫面樣式 ===== */
#instructions-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20; /* 確保在最上層 */
}

.instructions-content {
    background-color: #2c2c2c;
    padding: 30px 50px;
    border-radius: 15px;
    border: 2px solid #fff;
    text-align: center;
    max-width: 500px;
}

.instructions-content h1 {
    color: #ffd700;
    margin-top: 0;
}

.instructions-content ul {
    text-align: left;
    list-style-position: inside;
    padding-left: 0;
}

.instructions-content ul li {
    margin-bottom: 10px;
    line-height: 1.5;
}

#start-game-btn {
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #ffd700;
    background-color: #ffd700;
    color: #333;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
}

#start-game-btn:hover {
    background-color: transparent;
    color: #ffd700;
}

/* 將角色選擇畫面預設隱藏 */
#character-selection {
    display: none;
}