body {
    background-color: #202225;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
}

/* 三欄式排版 */
.game-layout {
    display: flex;
    max-width: 1000px;
    width: 95%;
    gap: 20px;
    margin-top: 30px;
    align-items: flex-start;
}

/* 側邊欄共通樣式 */
.sidebar {
    flex: 1;
    background: #2f3136;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 1px solid #444;
}

/* 中間主區域 */
.main-content {
    flex: 2;
    background: #36393f;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* 血條樣式 */
.hp-bar-container {
    background-color: #111;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 5px 0;
}

.hp-fill {
    height: 100%;
    background-color: #2ecc71;
    transition: width 0.3s ease;
}

.monster-fill { background-color: #e74c3c; }
.exp-fill { background-color: #9b59b6; }

/* 商店樣式 */
.shop-item {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
}

.shop-item button {
    background: #e67e22;
    padding: 2px 8px;
}

/* 字體強調 */
.highlight {
    color: #f1c40f;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
}

/* 圖片與容器 */
#monster-img-container {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

#monster-img {
    height: 150px;
    image-rendering: pixelated; /* 讓像素圖保持銳利 */
}

/* 按鈕美化 */
button {
    cursor: pointer;
    border: none;
    border-radius: 5px;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    transition: 0.2s;
}

button:hover { filter: brightness(1.2); }

.btn-main { background: #7289da; width: 100%; font-size: 1.2em; }
.btn-attack { background: #e74c3c; margin-right: 10px; }
.btn-skill { background: #3498db; }
.btn-danger { background: #333; font-size: 0.8em; }
.btn-skill {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.btn-skill:disabled {
    background-color: #7f8c8d !important; /* 冷卻中變成灰色 */
    cursor: not-allowed;
}

/* 日誌樣式 */
#log {
    background: #202225;
    height: 150px;
    overflow-y: auto;
    padding: 10px;
    margin-top: 20px;
    text-align: left;
    font-size: 0.9em;
    border-radius: 5px;
}

/* 手機適應 */
@media (max-width: 800px) {
    .game-layout { flex-direction: column; }
    .sidebar, .main-content { width: 100%; box-sizing: border-box; }
}
/* 系統按鈕區塊微調 */
.system-btns {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px; /* 讓兩個小按鈕中間有空隙 */
}

/* 給重置按鈕一個專屬顏色 */
#reset-btn {
    background-color: #95a5a6; /* 沉穩的灰藍色 */
    font-size: 0.8em;
}

#reset-btn:hover {
    background-color: #7f8c8d;
}

#inventory-container {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #34495e;
    margin-bottom: 5px;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.inventory-item button {
    padding: 2px 8px;
    font-size: 0.8em;
    cursor: pointer;
}
/* --- 背包按鈕美化 --- */

/* 裝備按鈕 (綠色系) */
.btn-equip {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s; /* 滑鼠移過去的漸變動畫時間 */
}

/* 滑鼠碰到裝備按鈕時變深色 */
.btn-equip:hover {
    background-color: #27ae60;
}

/* 分解按鈕 (紅色系) */
.btn-dismantle {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 5px;
    transition: 0.2s;
}

/* 滑鼠碰到分解按鈕時變深色 */
.btn-dismantle:hover {
    background-color: #c0392b;
}