/* =========================================
   1. 規則說明區
   ========================================= */
.rule-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.rule-box h3 { margin-top: 0; color: var(--primary-gold, #fbb750); margin-bottom: 15px; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); padding-bottom: 10px; }

.rule-alert {
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196f3;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    gap: 15px;
}
.rule-alert .alert-icon { color: #2196f3; font-size: 1.5rem; }
.mb-20 { margin-bottom: 20px; }

/* =========================================
   2. 機率表樣式
   ========================================= */
.wiki-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.wiki-table th { background: rgba(0, 0, 0, 0.5); white-space: nowrap; padding: 12px 10px; color: #aaa; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.wiki-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); text-align: center; }
.scroll-name { text-align: left !important; font-weight: bold; color: #fff; }
.scroll-name i { margin-right: 8px; color: var(--primary-gold, #fbb750); }
.rate-val { color: #81c784; font-weight: bold; font-family: monospace; }

/* =========================================
   3. 飾品數值卡片 (Grid System)
   ========================================= */
.acc-grid {
    display: grid;
    /* 電腦版一排 5 個 */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.acc-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s;
}

.acc-card:hover { transform: translateY(-3px); border-color: var(--primary-gold, #fbb750); }

.acc-lv {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.acc-stats { padding: 10px; }

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 5px;
}
.stat-row:last-child { margin-bottom: 0; }
.stat-row strong { color: #fff; }
.stat-row.highlight strong { color: #ffd700; } /* 特殊屬性高亮 */

/* 眾神飾品樣式 */
.acc-grid.god-tier .acc-card { border-color: rgba(255, 215, 0, 0.3); background: rgba(255, 215, 0, 0.05); }
.acc-grid.god-tier .acc-lv { background: rgba(255, 215, 0, 0.1); color: #ffd700; }

/* =========================================
   4. RWD 手機版優化
   ========================================= */
@media (max-width: 768px) {
    /* 機率表轉卡片 */
    .wiki-table thead { display: none; }
    .wiki-table, .wiki-table tbody, .wiki-table tr, .wiki-table td { display: block; width: 100%; }
    .wiki-table tr { margin-bottom: 15px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; overflow: hidden; }
    
    .rate-table td.scroll-name { background: rgba(0, 0, 0, 0.4); text-align: center !important; font-size: 1.1rem; color: var(--primary-gold, #fbb750); border-bottom: 1px solid rgba(255,255,255,0.1); }
    
    .rate-table td.rate-val { display: flex; justify-content: space-between; padding: 10px 15px; text-align: right; }
    .rate-table td.rate-val::before { content: attr(data-label); color: #aaa; }

    /* 飾品卡片轉為 3 欄 */
    .acc-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-row { flex-direction: column; font-size: 0.85rem; gap: 2px; } /* 手機版數值上下排 */
}
/* =========================================
   1. 規則說明區 (Rule Box) - 風格統一
   ========================================= */
.rule-box {
    background: rgba(0, 0, 0, 0.3); /* 深色半透明底 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.rule-box h3 {
    margin-top: 0;
    color: var(--primary-gold, #fbb750); /* 金色標題 */
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}


/* 顏色工具 (與其他強化頁面共用) */
.text-green { color: #81c784; }
.text-red { color: #ff5252; }
.text-blue { color: #64b5f6; }
.text-gold { color: #ffd700; }
.highlight { color: #ffd700; font-weight: bold; }
.mb-20 { margin-bottom: 20px; }

/* 警示框 (用於眾神戒指規則) */
.rule-alert {
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196f3;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    gap: 15px;
}
.rule-alert .alert-icon { color: #2196f3; font-size: 1.5rem; margin-top: 2px; }

/* =========================================
   2. 機率表樣式 (Responsive Table)
   ========================================= */
.wiki-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.wiki-table th {
    background: rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    padding: 12px 10px;
    font-size: 0.9rem;
    color: #aaa;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wiki-table td {
    vertical-align: middle;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scroll-name {
    font-weight: bold;
    color: #fff;
    text-align: left;
    white-space: nowrap;
}

.scroll-name i {
    margin-right: 8px;
    color: var(--primary-gold, #fbb750);
    width: 20px; /* 固定圖示寬度對齊 */
    text-align: center;
}

.rate-val {
    color: #81c784;
    font-weight: bold;
    font-family: monospace;
    font-size: 1rem;
    text-align: center;
}

/* =========================================
   3. 飾品數值卡片 (Grid System)
   ========================================= */
.acc-grid {
    display: grid;
    /* 電腦版：自動適應寬度，最小 140px，確保不擠壓 */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.acc-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.acc-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-gold, #fbb750);
    background: rgba(255, 255, 255, 0.08);
}

.acc-lv {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1rem;
}

.acc-stats {
    padding: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
}

.stat-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.stat-row strong { color: #fff; }
.stat-row.highlight strong { color: #ffd700; } /* 特殊屬性高亮 */

/* 眾神飾品樣式 (金色系) */
.acc-grid.god-tier .acc-card {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
}
.acc-grid.god-tier .acc-lv {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

/* =========================================
   4. RWD 手機版優化
   ========================================= */
@media (max-width: 768px) {
    
    /* --- 機率表轉卡片模式 --- */
    .wiki-table thead { display: none; }
    .wiki-table, .wiki-table tbody, .wiki-table tr, .wiki-table td { display: block; width: 100%; }
    
    .wiki-table tr {
        margin-bottom: 15px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        overflow: hidden;
    }
    
    .rate-table td.scroll-name {
        background: rgba(0, 0, 0, 0.4);
        text-align: center !important; /* 標題置中 */
        font-size: 1.1rem;
        color: var(--primary-gold, #fbb750);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 12px;
    }
    
    .rate-table td.rate-val {
        display: flex;
        justify-content: space-between;
        padding: 10px 15px;
        text-align: right;
    }
    
    /* 顯示 data-label */
    .rate-table td.rate-val::before {
        content: attr(data-label);
        color: #aaa;
        font-weight: normal;
        font-size: 0.95rem;
    }

    /* --- 飾品網格手機版 (3欄) --- */
    .acc-grid {
        grid-template-columns: repeat(3, 1fr); /* 強制三欄，比較緊湊 */
        gap: 8px;
    }
    
    .acc-lv { font-size: 0.9rem; padding: 5px; }
    .acc-stats { padding: 8px 5px; }
    
    .stat-row {
        flex-direction: column; /* 數值上下排 */
        align-items: center;
        text-align: center;
        font-size: 0.8rem;
        gap: 2px;
        border: none;
    }
}