/* =========================================
   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;
    font-size: 1.2rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}


/* 道具網格 */
.item-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    flex: 1;
}

.item-card img {
    width: 32px;
    height: 32px;
}

.item-name {
    color: #81c784;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

.item-name:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(129, 199, 132, 0.5);
}

/* 顏色工具 */
.text-gold {
    color: #ffd700;
}

.text-red {
    color: #ff5252;
}

.text-blue {
    color: #64b5f6;
}

.text-green {
    color: #81c784;
}

.text-purple {
    color: #ce93d8;
}

.text-gray {
    color: #aaa;
}

.highlight {
    color: #ffd700;
    font-weight: bold;
}

.intro-text {
    color: #ccc;
    margin-bottom: 15px;
}

/* =========================================
   2. 屬性卡片網格 (Attribute Grid)
   ========================================= */
.attr-grid {
    display: grid;
    /* 電腦版：最小寬度 280px，自動填滿 */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.attr-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.attr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.attr-header {
    padding: 10px 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.attr-list {
    list-style: none;
    padding: 10px 15px;
    margin: 0;
    flex-grow: 1;
    /* 讓內容撐開 */
}

.attr-list li {
    padding: 4px 0;
    font-size: 0.95rem;
    color: #ccc;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.attr-list li:last-child {
    border-bottom: none;
}

/* 不同分類的配色 */
.tier-basic .attr-header {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.2), transparent);
    border-left: 4px solid #ffc107;
}

.tier-basic i {
    color: #ffc107;
}

.tier-combat .attr-header {
    background: linear-gradient(90deg, rgba(244, 67, 54, 0.2), transparent);
    border-left: 4px solid #f44336;
}

.tier-combat i {
    color: #f44336;
}

.tier-defense .attr-header {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.2), transparent);
    border-left: 4px solid #2196f3;
}

.tier-defense i {
    color: #2196f3;
}

.tier-utility .attr-header {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.2), transparent);
    border-left: 4px solid #4caf50;
}

.tier-utility i {
    color: #4caf50;
}

.tier-special .attr-header {
    background: linear-gradient(90deg, rgba(156, 39, 176, 0.2), transparent);
    border-left: 4px solid #9c27b0;
}

.tier-special i {
    color: #9c27b0;
}

/* 特殊屬性底部 (GIF & Note) */
.attr-footer {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.gif-box {
    margin-bottom: 5px;
}

.gif-box .label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.gif-box img {
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 100%;
}

.note-text {
    font-size: 0.85rem;
    color: #ffcc80;
    margin-top: 5px;
}

/* =========================================
   3. RWD 手機版優化
   ========================================= */
@media (max-width: 768px) {

    /* 道具網格在手機上單欄 */
    .item-card {
        width: 100%;
    }

    /* 屬性網格維持 Grid，但寬度自動適應 */
    .attr-grid {
        grid-template-columns: 1fr;
        /* 手機版單欄，確保內容不擠壓 */
    }
}