/* =========================================
   1. 任務導航列 (Tabs) - RWD 優化
   ========================================= */
.task-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* 自動換行 */
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 8px;
}

.task-nav a {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.95rem;
    flex: 1 1 auto; /* 讓按鈕自動填滿 */
    text-align: center;
    white-space: nowrap;
}

.task-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-2px);
}

.task-nav a.active {
    background: var(--primary-gold, #fbb750);
    color: #000;
    font-weight: bold;
    border-color: var(--primary-gold, #fbb750);
    box-shadow: 0 0 10px rgba(251, 183, 80, 0.3);
}

/* =========================================
   2. 總覽表格 (Overview Table)
   ========================================= */
.center-table th, .center-table td {
    text-align: center;
    vertical-align: middle;
}

.center-table .text-left {
    text-align: left;
    padding-left: 15px;
}

/* 標籤樣式 */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #fff;
    min-width: 70px;
}
.tag-main { background: #42a5f5; }
.tag-daily { background: #66bb6a; }
.tag-dungeon { background: #ab47bc; }
.tag-rep { background: #ffa726; }
.tag-seal { background: #ef5350; }
.tag-fire { background: #ff7043; }
.tag-mat { background: #78909c; }

/* 按鈕 */
.btn-go {
    display: inline-block;
    padding: 4px 15px;
    border: 1px solid var(--primary-gold, #fbb750);
    color: var(--primary-gold, #fbb750);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s;
    background: transparent;
}

.btn-go:hover {
    background: var(--primary-gold, #fbb750);
    color: #000;
}

.btn-go.disabled {
    border-color: #555;
    color: #666;
    pointer-events: none;
}

/* =========================================
   3. 通用排版元件
   ========================================= */
/* 規則 Grid */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.rule-card {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center; /* 垂直置中 */
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.05);
}

.rule-card.full-width {
    grid-column: 1 / -1;
}

.rule-icon { font-size: 1.8rem; width: 40px; text-align: center; flex-shrink: 0; }
.rule-text strong { display: block; color: #fff; margin-bottom: 4px; font-size: 1.05rem; }
.rule-text p { margin: 0; color: #ccc; font-size: 0.95rem; line-height: 1.4; }

/* 提示框 */
.alert-box {
    display: flex;
    align-items: center;
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196f3;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
}
.alert-icon { font-size: 1.5rem; color: #2196f3; margin-right: 15px; }
.alert-content h4 { margin: 0 0 3px 0; color: #64b5f6; font-size: 1.1rem; }
.alert-content p { margin: 0; color: #ddd; font-size: 0.95rem; }

/* 清單盒子 */
.step-box {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.step-box h4 { margin-top: 0; color: #fbb750; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; margin-bottom: 15px; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
    display: flex; gap: 15px; margin-bottom: 15px;
    border-bottom: 1px dashed rgba(255,255,255,0.05); padding-bottom: 15px;
}
.check-list li:last-child { border: 0; margin: 0; padding: 0; }

.check-icon {
    color: #81c784; background: rgba(129, 199, 132, 0.1);
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.check-icon.sm { width: 28px; height: 28px; font-size: 0.9rem; background: rgba(255,255,255,0.1); color: #ddd; }

.check-list strong { color: #fff; font-size: 1.05rem; margin-right: 5px; }
.check-list p { margin: 0; color: #ccc; font-size: 0.95rem; display: inline; }
.note { font-size: 0.85rem; margin-left: 5px; }

/* 圖片容器 */
.img-container {
    text-align: center;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}
.img-container h4 { margin-top: 0; color: #ccc; font-size: 1rem; margin-bottom: 10px; }
.responsive-img { max-width: 100%; height: auto; border-radius: 4px; }
.shadow-box { box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.mb-20 { margin-bottom: 20px; }

/* 多欄圖片 */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* NPC 對話框 (精靈墓穴用) */
.npc-dialog {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.npc-img img { width: 60px; height: 60px; border-radius: 50%; border: 2px solid #aaa; margin-right: 15px; }
.npc-text strong { color: #fbb750; display: block; margin-bottom: 5px; }
.npc-text p { margin: 0; color: #fff; font-style: italic; }

/* 小提示與連結 */
.tips-box {
    text-align: center; margin-bottom: 30px; padding: 15px;
    background: rgba(251, 183, 80, 0.05); border-radius: 8px; border: 1px solid rgba(251, 183, 80, 0.1);
}
.tips-box p { margin: 0 0 10px 0; color: #ddd; }
.link-btn { display: inline-block; color: #fbb750; text-decoration: none; border-bottom: 1px dashed #fbb750; font-weight: bold; transition: all 0.2s; }
.link-btn:hover { color: #fff; border-bottom-style: solid; }

/* 顏色 */
.text-gold { color: #ffd700; }
.text-red { color: #ff5252; }
.text-green { color: #81c784; }
.text-blue { color: #64b5f6; }
.highlight { color: #ffd700; font-weight: bold; }

/* RWD */
@media (max-width: 768px) {
    .task-nav a { flex: 1 1 45%; } /* 手機版一行兩個按鈕 */
    .two-col, .three-col { grid-template-columns: 1fr; } /* 圖片變單欄 */
    .rule-card { flex-direction: column; text-align: center; }
    .npc-dialog { flex-direction: column; text-align: center; }
    .npc-img img { margin: 0 0 10px 0; }
}