/* =========================================
   1. 全域變數與基礎設定
   ========================================= */
:root {
    --primary-gold: #fbb750;
    --primary-gold-hover: #ffca28;
    --item-orange: #ff9800;

    --text-main: #e0e0e0;
    --text-muted: #888;
    --text-info: #90caf9;
    /* 淡藍色 */
    --text-danger: #ff8a80;
    /* 淡紅色 */
    --text-success: #81c784;
    /* 淡綠色 */

    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-card-hover: #252525;
    --border-color: rgba(255, 255, 255, 0.1);
}

/* 防止 Angular 載入前的閃爍 */
[ng-cloak] {
    display: none !important;
}

.wiki-layout {
    color: var(--text-main);
    font-family: "Microsoft JhengHei", sans-serif;
}

.content-box {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 禁止滾動 (彈窗開啟時用) */
.body-no-scroll {
    overflow: hidden !important;
    height: 100%;
}

/* 輔助類別 */
.text-info {
    color: var(--text-info) !important;
}

.no-data {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

/* =========================================
   2. 搜尋區塊 (Search Section)
   ========================================= */
.search-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;

    /* ✅ 保險：避免任何子元素溢出時把整頁撐出水平捲軸 */
    max-width: 100%;
    overflow-x: hidden;
}

/* 基本排版 */
.search-form {
    display: flex;
    gap: 10px;

    width: 100%;
    max-width: 100%;
    align-items: center;
}

/* ✅ 盒模型統一，避免 padding 把寬度撐爆 */
.search-form,
.search-form * {
    box-sizing: border-box;
}

/* ✅ 關鍵：避免 flex input 撐爆造成水平捲軸 */
.search-form input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;

    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: #fff;

    height: 44px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-form input:focus {
    border-color: var(--primary-gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(251, 183, 80, 0.2);
}

/* ✅ 只套用 submit，避免影響 btn-share-mini */
.search-form button[type="submit"] {
    white-space: nowrap;
    flex: 0 0 auto;

    height: 44px;
    min-width: 44px;
    padding: 0 18px;

    border-radius: 8px;
    border: 1px solid rgba(251, 183, 80, 0.35);
    background: rgba(251, 183, 80, 0.14);
    color: rgba(255, 230, 190, 0.95);

    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-form button[type="submit"]:hover:not(:disabled) {
    background: rgba(251, 183, 80, 0.22);
    border-color: rgba(251, 183, 80, 0.55);
    transform: translateY(-1px);
}

.search-form button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}

.search-form button[type="submit"]:disabled,
.search-form input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(100%);
}

/* ✅ 手機：只顯示 icon（手機/小平板都會生效） */
@media (max-width: 820px) {
    .search-form button[type="submit"] {
        width: 44px;
        padding: 0;
        gap: 0;
        font-size: 0;
        /* 隱藏文字，只留 icon */
    }

    .search-form button[type="submit"] i {
        font-size: 16px;
        line-height: 1;
    }
}

/* ✅ 進一步防溢出：更小螢幕改成「上下」排版（避免任何情況被撐爆） */
@media (max-width: 520px) {
    .search-form {
        flex-wrap: wrap;
    }

    .search-form input {
        flex: 1 0 100%;
        width: 100%;
        order: 1;
    }

    .btn-share-mini {
        order: 2;
    }

    .search-form button[type="submit"] {
        order: 3;
        margin-left: auto;
        /* 讓搜尋按鈕靠右 */
    }
}



/* =========================================
   3. 首頁分頁按鈕 (Main Page Tabs)
   ========================================= */
.tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    margin-top: 5px;
    flex-wrap: wrap;
}

/* ✅ 手機：分頁按鈕一列三個（避免水平溢出） */
@media (max-width: 520px) {
    .tab-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        max-width: 100%;
    }

    .tab-btn {
        min-width: 0;
        /* ✅ 取消原本 100px 限制 */
        width: 100%;
        height: 56px;
        /* ✅ 不要用 5px */
        padding: 8px 10px;
        overflow: hidden;

    }

    .tab-btn .main-title {
        font-size: .9rem;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


.tab-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #aaa;
    padding: 8px 15px;
    min-width: 70px;
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.tab-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-gold);
    color: #fff;
}

.tab-btn.active {
    background: rgba(251, 183, 80, 0.15);
    border-color: var(--primary-gold);
    color: #fff;
    box-shadow: 0 0 15px rgba(251, 183, 80, 0.1);
}

.tab-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(100%);
}

.main-title {
    font-size: 0.95rem;
    font-weight: bold;
}

/* =========================================
   4. 卡片網格 (Grid System)
   ========================================= */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

@media (max-width: 480px) {
    .item-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   5. 列表小卡樣式 (Mini Card)
   ========================================= */
.item-mini-card {
    display: flex;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.item-mini-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    border-color: var(--primary-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.disabled-card {
    opacity: 0.5;
    pointer-events: none;
    cursor: wait;
}

/* 小卡圖片 */
/* 小卡資訊 */
.item-mini-info {
    flex: 1;
    min-width: 0;
}

.item-mini-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   6. 通用屬性樣式 (Stat Grid & Badges)
   ========================================= */
/* 屬性網格 (列表小卡用) */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    margin: 8px 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.stat-item {
    display: flex;
    align-items: center;
    color: var(--text-info);
}

.stat-icon {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    opacity: 0.8;
}

.stat-val {
    margin-left: auto;
    padding-left: 6px;
    color: #fff;
    font-weight: 500;
}

.stat-val.positive {
    color: var(--text-success);
}

.stat-val.negative {
    color: var(--text-danger);
}

/* 底部標籤 Badge */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.item-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.item-badge.info {
    background: rgba(33, 150, 243, 0.15);
    color: var(--text-info);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.item-badge.danger {
    background: rgba(255, 82, 82, 0.15);
    color: var(--text-danger);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

/* 列表小卡專用的魔法傷害行 */
.magic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(124, 77, 255, 0.15);
    border: 1px solid rgba(124, 77, 255, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.magic-val {
    color: #b388ff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.magic-prob {
    color: #e0e0e0;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* =========================================
   7. 彈跳視窗 (Modal) 結構
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-container {
    background: #1e1e1e;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    /* 限制高度 */
    border-radius: 12px;
    border: 1px solid var(--primary-gold);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    background: rgba(251, 183, 80, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--primary-gold);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    /* 內容太長時捲動 */
    padding: 20px;
}

/* =========================================
   8. 彈跳視窗 - 單頁式內容樣式
   ========================================= */
/* 區塊通用設定 */
/* 區塊標題 */
.section-title {
    font-size: 1.1rem;
    color: var(--primary-gold);
    border-left: 4px solid var(--primary-gold);
    padding-left: 12px;
    margin-bottom: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, rgba(251, 183, 80, 0.1) 0%, transparent 100%);
    padding-top: 6px;
    padding-bottom: 6px;
    border-radius: 0 4px 4px 0;
}

/* 彈窗內的屬性項目卡片化 (覆蓋通用樣式) */
.modal-body .stat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 1 auto;
    min-width: 160px;
    margin-bottom: 0;
}

/* 讓「基本 | 類型...」那一行變成長條狀且移除背景 */
.modal-body .stat-item[style*="grid-column: 1 / -1"] {
    width: 100% !important;
    justify-content: flex-start;
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-left: 0;
}

/* 掉落/商城 資料列表 */
.data-list-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

.data-list-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* =========================================
   9. 物品成長區塊 (Upgrade Section)
   ========================================= */
.upgrade-list-container {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
}

.upgrade-header {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
}

.upgrade-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.col-mat {
    flex: 2;
    font-size: 0.9em;
    color: #ccc;
}

.col-bonus {
    flex: 2;
    text-align: right;
    color: #ff8a80;
}

.col-path {
    flex: 1.5;
    font-weight: bold;
}

/* 新版路徑欄位 */
/* 手機版 RWD */
@media (max-width: 768px) {
    .upgrade-header {
        display: none;
    }

    .upgrade-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .col-path {
        flex: 0 0 60%;
        order: 1;
        font-size: 1.1em;
        margin-bottom: 5px;
    }

    .col-bonus {
        flex: 0 0 40%;
        order: 2;
        text-align: right;
        margin-bottom: 5px;
    }

    .col-mat {
        flex: 0 0 100%;
        order: 3;
        margin-top: 5px;
        padding-top: 5px;
        border-top: 1px dashed rgba(255, 255, 255, 0.1);
        color: #aaa;
    }
}

/* =========================================
   10. 特效相簿區塊 (Gallery)
   ========================================= */
.info-footer-gallery {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.gallery-header {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
}

.gallery-title-text {
    background: #1e1e1e;
    padding: 0 15px;
    color: var(--primary-gold);
    font-weight: bold;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.gallery-row {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
}

.gallery-item .img-box {
    width: 120px;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.gallery-item:hover .img-box {
    border-color: var(--primary-gold);
    box-shadow: 0 0 15px rgba(251, 183, 80, 0.2);
    transform: translateY(-5px);
}

.gallery-item img {
    max-width: 90%;
    max-height: 90%;
}

.gallery-item .lv-tag {
    font-size: 0.8rem;
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 10px;
    border-radius: 12px;
}

/* =========================================
   11. 現代感捲軸優化 (Scrollbar)
   ========================================= */
.modal-body::-webkit-scrollbar,
.drop-list-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.modal-body::-webkit-scrollbar-track,
.drop-list-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb,
.drop-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-body::-webkit-scrollbar-thumb:hover,
.drop-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.modal-body::-webkit-scrollbar-thumb:active,
.drop-list-container::-webkit-scrollbar-thumb:active {
    background: var(--primary-gold);
}

/* Firefox */
.modal-body,
.drop-list-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* 掉落清單容器 (限制高度 + 捲軸) */
.drop-list-container {
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
}

/* =========================================
   手機版 RWD 優化 - 屬性單欄顯示
   ========================================= */
@media (max-width: 768px) {

    /* 將屬性網格改為單欄 (一列一個) */
    .stat-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
        /* 稍微加大間距讓手指好點選或閱讀 */
    }

    /* 確保卡片內容寬度自動填滿 */
    .modal-body .stat-item {
        min-width: auto;
        /* 移除最小寬度限制 */
        width: 100%;
        /* 佔滿整行 */
    }
}

/* =========================================
   商店列表通用樣式 (Shop List Components)
   適用於：武器、防具、道具...等所有商店顯示
   ========================================= */
/* 每一行的額外設定 (繼承原本 data-list-row) */
.shop-row {
    align-items: center;
    /* 垂直置中 */
}

/* --- 左側：NPC 區塊 --- */
.shop-npc-info {
    color: #ffd700;
    /* 金色 */
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-npc-info i {
    font-size: 0.9em;
    opacity: 0.8;
}

.shop-count {
    font-size: 0.8em;
    color: #888;
    font-weight: normal;
}

/* --- 右側：價格區塊 --- */
.shop-price-info {
    text-align: right;
    font-size: 0.9em;
}

/* 單行價格容器 */
.price-line {
    display: flex;
    align-items: center;
    /* 讓文字跟標籤垂直對齊 */
    justify-content: flex-end;
    /* 靠右對齊 */
    margin-bottom: 2px;
}

/* 標籤文字 (購入/回收/售價) */
.p-label {
    color: #aaa;
    margin-right: 4px;
}

/* 單位文字 (金幣) */
/* --- 數值顏色定義 --- */
.p-val-buy {
    color: #fff;
    font-weight: bold;
}

.p-val-sell {
    color: #81c784;
    /* 綠色 */
    font-weight: bold;
}

.p-val-special {
    color: #ff8a80;
    /* 紅色 */
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 5px;
}

/* --- 特殊貨幣標籤 (紫色框) --- */
.currency-badge {
    color: #b388ff;
    border: 1px solid rgba(179, 136, 255, 0.3);
    background: rgba(179, 136, 255, 0.1);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    /* 防止換行 */
}

.currency-badge img {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

/* --- 強化等級標籤 (+7 樣式) --- */
.shop-enchant {
    color: #64b5f6;
    /* 亮藍色文字 */
    border: 1px solid rgba(100, 181, 246, 0.4);
    /* 藍色細框 */
    background: rgba(33, 150, 243, 0.1);
    /* 淡淡的藍底 */
    border-radius: 3px;
    padding: 0 4px;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: 6px;
    /* 與 NPC 名稱的距離 */
    display: inline-block;
}

.detail-block {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.text-danger {
    color: var(--text-danger) !important;
}

/* === Set card visual upgrade === */
.set-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .18));
    box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}

/* 左圖容器：不要純黑，給暗紋/光暈 */
.set-media {
    width: 200px;
    min-width: 200px;
    height: 200px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .10);
    background:
        radial-gradient(circle at 50% 60%, rgba(255, 215, 0, .10), transparent 55%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .06), transparent 60%),
        rgba(0, 0, 0, .35);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* GIF：置中、放大、不要裁切 */
.set-gif {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.25);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55));
}

/* 右側內容：靠上對齊 */
.set-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2px;
}

/* 標題：更像主標 */
.set-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .5px;
    color: #fff;
    margin-bottom: 10px;
}

/* chip 容器：間距更舒服 */
.set-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* chip：更像質感膠囊 */
.stat-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    color: #eaeaea;
    font-size: 12.5px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* 可選：負數 chip 變紅（你有扣能力套裝會很直覺） */
.stat-chip.negative {
    border-color: rgba(255, 90, 90, .25);
    background: rgba(255, 90, 90, .08);
    color: #ffb3b3;
}

/* 手機：上下排、縮圖、chip 變緊湊 */
@media (max-width:640px) {
    .set-card {
        flex-direction: column;
        align-items: center;
    }

    .set-media {
        width: 150px;
        min-width: 150px;
        height: 150px;
    }

    .set-gif {
        transform: scale(1.15);
    }

    .set-title {
        font-size: 16px;
    }

    .set-stats {
        gap: 8px;
    }

    .stat-chip {
        padding: 6px 10px;
        font-size: 12px;
    }
}

.power-chain {
    margin-top: 12px;
}

.power-chain-title {
    color: #ddd;
    font-weight: 800;
    margin: 8px 0 10px;
    opacity: .9;
}

.power-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.power-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .22);
}

.power-item-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
}

.power-item-card.next {
    border-color: rgba(255, 215, 0, .20);
    background: rgba(255, 215, 0, .06);
}

.power-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .10);
}

.power-item-name {
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    line-height: 1.2;
}

.power-mid {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 260px;
}

.power-arrow {
    color: rgba(255, 255, 255, .45);
    font-size: 18px;
    min-width: 18px;
    text-align: center;
}

.power-need-card {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
}

.power-need-title {
    color: #ddd;
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 8px;
    opacity: .9;
}

.power-need-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.power-need-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .25);
}

.power-need-name {
    color: #fff;
    font-weight: 800;
    font-size: 13px;
}

.power-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    color: #eaeaea;
    font-size: 12px;
}

.chip.final {
    border-color: rgba(255, 215, 0, .30);
    background: rgba(255, 215, 0, .08);
    color: #ffd87a;
}

.power-final {
    margin-left: auto;
}

/* 手機：改成直向堆疊 */
@media (max-width: 640px) {
    .power-step {
        flex-direction: column;
        align-items: stretch;
    }

    .power-item-card {
        min-width: auto;
        width: 100%;
    }

    .power-mid {
        flex-direction: column;
        align-items: stretch;
        min-width: auto;
        width: 100%;
    }

    .power-arrow {
        display: none;
    }

    .power-final {
        margin-left: 0;
    }
}

/* 當前階段：金色描邊 + 發光 */
.power-item-card.is-current {
    border-color: rgba(255, 215, 0, .70) !important;
    background: rgba(255, 215, 0, .10) !important;
    box-shadow:
        0 0 0 1px rgba(255, 215, 0, .35),
        0 10px 24px rgba(255, 215, 0, .18);
}

.current-badge {
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #ffd87a;
    border: 1px solid rgba(255, 215, 0, .35);
    background: rgba(255, 215, 0, .10);
}

/* 升階規則提示（高風險/極高風險） */
.mode-alert {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.3;
}

.mode-alert i {
    margin-top: 2px;
    font-size: 16px;
    opacity: .95;
}

.mode-alert-title {
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 2px;
}

.mode-alert-desc {
    font-size: 12px;
    opacity: .95;
}

/* 失敗倒退：警告 */
.mode-warn {
    border-color: rgba(255, 215, 0, .28);
    background: rgba(255, 215, 0, .08);
    color: #ffe39b;
}

.mode-warn i {
    color: #ffd87a;
}

/* 失敗消失：危險 */
.mode-danger {
    border-color: rgba(255, 90, 90, .30);
    background: rgba(255, 90, 90, .10);
    color: #ffb3b3;
}

.mode-danger i {
    color: #ff7a7a;
}

.power-accordion {
    margin-top: 10px;
}

.power-chain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
    user-select: none;
}

.power-chain-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eaeaea;
    font-weight: 900;
}

.power-chain-title {
    letter-spacing: .2px;
}

.power-chain-body {
    margin-top: 10px;
}

/* ✅ 道具卡片：說明行（你現在的 .item-mini-desc-line） */
.item-mini-desc-line {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88em;
    line-height: 1.35;
    margin: 4px 0;
    padding-left: 12px;
    position: relative;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* 小圓點（像條列），讓兩三行看起來更有層次 */
.item-mini-desc-line:before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 215, 122, 0.75);
    /* 低調金色 */
    position: absolute;
    left: 2px;
    top: 0.62em;
    box-shadow: 0 0 8px rgba(255, 215, 122, 0.15);
}

/* ✅ 第一行更像「效果主軸」：稍微亮一點 */
.item-mini-desc-line:first-child {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

/* ✅ 若你有包一層容器（item-mini-desc），順便讓它更像小區塊 */
.item-mini-desc {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ✅ 你那個道具說明框（item-mini-desc）再大一點 */
.modal-body .item-mini-desc {
    font-size: 16px;
    line-height: 1.75;
}

/* ✅ 每一行（• 開頭那個） */
.modal-body .item-mini-desc-line {
    font-size: 16px;
    line-height: 1.75;
    margin: 6px 0;
    /* 行距更舒服 */
}

/* ✅ 區塊標題（基本資訊/怪物掉落...）也順便略大 */
.modal-body .section-title {
    font-size: 18px;
}

/* ✅ 左上標題（道具名稱）更醒目 */
.modal-title {
    font-size: 20px;
}

/* ✅ 道具傷害行（箭矢用） */
.item-mini-dmg {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

.item-mini-dmg:before {
    background: rgba(79, 195, 247, 0.75);
    /* 淡藍點點，跟一般描述區分 */
}

/* ===== 眾神之戒樣式 ===== */
.godring-meta {
    margin: 8px 0 12px;
}

.godring-meta .chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.92em;
}

.godring-row {
    align-items: center;
}

.godring-lv {
    color: rgba(255, 215, 122, 0.95);
    letter-spacing: 0.3px;
}

.godring-split {
    color: rgba(255, 255, 255, 0.18);
    margin: 0 8px;
}

.godring-power {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
}

.godring-val {
    margin-left: 6px;
    color: rgba(255, 255, 255, 0.94);
}

.godring-rate {
    font-weight: 800;
    color: rgba(79, 195, 247, 0.92);
}

/* 眾神之戒：不可升級狀態 */
.godring-disabled {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.62);
    font-weight: 700;
    font-size: 0.9em;
}

.godring-disabled i {
    opacity: 0.85;
}

.godring-row .shop-price-info {
    min-width: 160px;
    text-align: right;
}

/* 眾神之戒：警告提示框 */
.godring-alert {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 98, 7, 0.08);
    /* 黃色警告淡底 */
    border: 1px solid rgba(255, 193, 7, 0.22);
    color: rgba(255, 255, 255, 0.88);
}

.godring-alert-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    color: rgba(255, 215, 122, 0.95);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.godring-alert-line {
    margin: 6px 0;
    padding-left: 14px;
    position: relative;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.godring-alert-line:before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0.75;
}

.item-badge.success {
    background: rgba(46, 204, 113, .15);
    border: 1px solid rgba(46, 204, 113, .45);
    color: #2ecc71;
}

/* ===== 溶解清單區塊 ===== */
.sub-card {
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
}

.sub-title {
    font-weight: 800;
    letter-spacing: .5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 清單容器 */
.mini-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 每一列卡片 */
.mini-row {
    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .07);
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.mini-row:hover {
    transform: translateY(-1px);
    background: rgba(0, 0, 0, .28);
    border-color: rgba(255, 255, 255, .12);
}

/* 第一行：目標 + 百分比徽章 */
.mini-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    line-height: 1.4;
}

.mini-name .label {
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
}

.target-name {
    color: rgba(255, 255, 255, .92);
}

/* 第二行：獲得物 */
.mini-desc {
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    line-height: 1.55;
}

.reward-name {
    color: rgba(255, 255, 255, .95);
}

.reward-count {
    color: rgba(255, 255, 255, .78);
    font-weight: 700;
    margin-left: 2px;
}

/* 成功率徽章 */
.rate-badge {
    margin-left: auto;
    /* 讓徽章靠右，視覺更整齊 */
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .2px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .85);
}

/* 100%：綠色 */
.rate-badge.ok {
    background: rgba(46, 204, 113, .14);
    border-color: rgba(46, 204, 113, .35);
    color: #2ecc71;
}

/* <100%：橘色（提示機率） */
.rate-badge.warn {
    background: rgba(241, 196, 15, .14);
    border-color: rgba(241, 196, 15, .35);
    color: #f1c40f;
}

/* 手機：徽章不要硬靠右（避免擠壓） */
@media (max-width: 520px) {
    .rate-badge {
        margin-left: 0;
    }
}

.rpower-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;

    object-fit: contain;
    /* 不裁切、等比塞進去 */
    image-rendering: pixelated;
    /* 像素風 icon 更銳利（支援度高） */

    vertical-align: middle;
    margin-right: 6px;

}

.label {
    opacity: .75;
}

.sep {
    opacity: .5;
    margin: 0 6px;
}

.reward-count {
    margin-left: 6px;
    opacity: .9;
}

.info-line {
    margin: 6px 0;
    line-height: 1.6;
}

/* 祝福：金色偏亮 */
.text-blessed {
    color: #f5d77a;
}

.icon-blessed {
    filter: brightness(1.15) saturate(1.25) drop-shadow(0 0 2px rgba(245, 215, 122, .7));
}

/* 詛咒：紅色偏暗 */
.text-cursed {
    color: #ff6b6b;
}

.icon-cursed {
    filter: brightness(.9) saturate(1.5) hue-rotate(-25deg) drop-shadow(0 0 2px rgba(255, 107, 107, .7));
}

/* 小標籤 */
/* =========================
   BossSoul / 魂系統 UI（桌機左圖200x165、手機上下）
========================= */
.soul-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 10px;
}

/* 卡片 */
.soul-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.06), rgba(0, 0, 0, 0.0));
    border: 1px solid rgba(255, 215, 0, 0.14);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* ✅ 桌機：左圖固定 200x165（你要的） */
.soul-media {
    width: 200px;
    height: 165px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.soul-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 右側內容 */
.soul-content {
    flex: 1;
    min-width: 0;
}

.soul-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.soul-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 1px;
    color: #111;
    background: rgba(255, 215, 0, 0.92);
    font-weight: 800;
}

.soul-name {
    font-size: 16px;
    font-weight: 900;
    color: #f2f2f2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soul-desc {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.soul-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.soul-chip b {
    color: #ffd87a;
    font-weight: 900;
}

.soul-chip.dmg b {
    color: #b388ff;
}

/* ✅ 手機：上下排列 + 圖片變全寬（高度保留比例） */
@media (max-width: 640px) {
    .soul-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .soul-media {
        width: 100%;
        height: auto;
        /* 讓高度自適應 */
        aspect-ratio: 200/165;
        /* ✅ 保持你要的比例 */
        border-radius: 14px;
    }

    .soul-name {
        white-space: normal;
        /* 手機允許換行 */
        line-height: 1.3;
    }

    .soul-desc {
        gap: 8px;
    }

    .soul-chip {
        width: 100%;
        /* 手機一條一行更好讀 */
        justify-content: space-between;
    }
}

/* 第二層彈窗偏移（桌機），手機不偏移 */
.modal-shift {
    transform: translate3d(140px, -30px, 0);
}

@media (max-width: 768px) {
    .modal-shift {
        transform: translate3d(0, 0, 0);
    }
}

/* 疊層（可調） */
.mob-modal-overlay {
    z-index: 11000;
}

.item-modal-overlay {
    z-index: 12000;
}

.modal-on-top{ z-index: 13000 !important; }


/* 第二層開啟時，凍結底層彈窗的滾動 */
.freeze-scroll {
    overflow: hidden !important;
}
/* 不可點版本：看起來像資訊，但不會讓人誤會可點 */
.itemMtext{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.86);
}

/* item_Modal 怪物掉落：手機版讓「機率」換行 */
@media (max-width: 640px){
  .drop-list-container .data-list-row.shop-row{
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
  }

  /* 左欄（怪物名稱）吃滿 */
  .drop-list-container .data-list-row.shop-row .shop-npc-info{
    flex: 0 0 100%;
    width: 100%;
  }

  /* 右欄（機率）換到下一行 */
  .drop-list-container .data-list-row.shop-row .shop-price-info{
    flex: 0 0 100%;
    width: 100%;
    text-align: left;     /* 想靠右就改 right */
    padding-left: 22px;   /* 對齊 skull/icon 的視覺縮排（可自行調整） */
  }

  .drop-list-container .data-list-row.shop-row .price-line{
    justify-content: flex-start; /* 想靠右就改 flex-end */
  }
}

/* ===== item_Modal：開寶箱/寶箱取得/買Cn 手機換行 ===== */
@media (max-width: 640px){

  /* 每一列允許換行 */
  .drop-list-container .data-list-row.shop-row{
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
  }

  /* 左側資訊（圖+名稱+數量+刻印/公告）吃滿 */
  .drop-list-container .data-list-row.shop-row .shop-npc-info{
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;          /* ✅ 讓公告/刻印徽章可換到下一行 */
    row-gap: 6px;
  }

  /* 徽章跟數量不要擠壓名字 */
  .drop-list-container .data-list-row.shop-row .itemMtext{
    flex: 1 1 100%;
    min-width: 0;
    word-break: break-word;   /* 長名稱可換行 */
  }

  /* 右側（機率/職業/售價）換到下一行 */
  .drop-list-container .data-list-row.shop-row .shop-price-info{
    flex: 0 0 100%;
    width: 100%;
    text-align: left;         /* 想靠右就改 right */
    padding-left: 38px;       /* 對齊左邊 icon/圖的視覺縮排，可自行調 */
  }

  /* 右側的每一行靠左排 */
  .drop-list-container .data-list-row.shop-row .price-line{
    justify-content: flex-start;  /* 想靠右就改 flex-end */
  }
}


.wiki-content {
    padding-bottom: 10px !important;
}