/* ✅ 九宮格裝備欄 */
.equip-grid {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 5px;
    justify-content: center;
    margin-bottom: 20px;
}

.equip-slot {
    width: 100px;
    height: 100px;
    background: #ddd;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #aaa;
    font-weight: bold;
}

.equip-slot:hover {
    background: #ccc;
}

/* ✅ 賦予選擇彈出視窗 */
#enchantModal {
    display: none;
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, 0);
    background: white;
    padding: 20px;
    border: 2px solid #000;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    width: 400px;
    z-index: 1000;
}

#enchantModal h3 {
    margin-top: 0;
    text-align: center;
}

/* ✅ 搜尋與選擇 UI */
#headSearch, #tailSearch {
    width: calc(100% - 20px);
    padding: 5px;
    margin-bottom: 5px;
}

.enchant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 5px;
    background: #f8f8f8;
}

/* ✅ 賦予選項按鈕 */
.enchant-option {
    padding: 5px 10px;
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.enchant-option:hover {
    background-color: #ddd;
}

/* ✅ 賦予效果區塊 */
.effect-box {
    background: #f8f8f8;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
    color: #000;
    margin-top: 10px;
}

.effect-box h4 {
    margin: 5px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #aaa;
}

.effect-box ul {
    list-style-type: none;
    padding: 0;
}

.effect-box li {
    font-size: 14px;
    color: blue;
    font-weight: bold;
    margin: 2px 0;
}

/* ✅ 浮動數值輸入框 */
.effect-box input[type="number"] {
    width: 50px;
    padding: 2px;
    margin-left: 5px;
    text-align: center;
}

/* ✅ 確認、清空、取消按鈕 */
button {
    padding: 6px 12px;
    border: 1px solid #000;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    display: inline-block;
}

button:hover {
    background: #ccc;
}

/* ✅ 總賦予效果區塊 */
#totalEffects {
    background: #fff;
    border: 2px solid #000;
    padding: 15px;
    margin-top: 10px;
    font-size: 14px;
}

#totalEffects h3 {
    margin-top: 0;
    text-align: center;
    color: #000;
}

#totalEffects ul {
    list-style-type: none;
    padding: 0;
}

#totalEffects li {
    font-size: 14px;
    font-weight: bold;
    color: darkgreen;
}
