/* =========================================================
   cspecialDailyDungeon.css  (完整覆蓋版)
   - tab-nav：超出範圍自動換行到下一列（不橫向捲動）
   - 修正重複定義
   - 難度條顏色使用 class（bg-success/bg-warning/bg-danger）
   ========================================================= */

/* =========================================
   0. 小工具
   ========================================= */
.text-left { text-align: left !important; }
.text-gold { color: #ffd700; }
.text-red { color: #ff5252; }
.text-green { color: #81c784; }
.text-blue { color: #64b5f6; }

.highlight { color: #fbb750; font-weight: bold; }

.hrr { border-top: 1px solid rgba(255,255,255,0.08); margin: 16px 0; }

/* =========================================
   1. 頁首
   ========================================= */
.page-header h1 {
  margin: 0;
  font-size: 1.6rem;
  color: #fbb750;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-line {
  margin-top: 12px;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, rgba(251,183,80,0.7), rgba(251,183,80,0));
}

/* =========================================
   2. Tab 導覽：超出就換行
   ========================================= */
.tab-nav {
  display: flex;
  gap: 8px;
  margin: 18px 0 14px;
  padding: 6px 0;

  /* ✅ 超出就換到下一列 */
  flex-wrap: wrap;
  overflow: visible;
  overflow-x: hidden;

  width: 100%;
  align-items: center;
}

.tab-btn {
  flex: 0 0 auto;
  white-space: nowrap;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #aaa;

  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.tab-btn:hover {
  border-color: rgba(251,183,80,0.45);
  background: rgba(251,183,80,0.08);
  transform: translateY(-1px);
}

.tab-btn.active {
  background: linear-gradient(180deg, #fbb750 0%, #e6a33c 100%);
  color: #000;
  font-weight: 700;
  border-color: #fbb750;
}

/* Tab 內容 */
.tab-content { display: none; animation: fadeIn 0.35s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. 表格
   ========================================= */
.table-responsive { width: 100%; overflow-x: auto; }

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  color: #ddd;
}

.wiki-table thead th {
  background: rgba(0,0,0,0.35);
  color: #f0c27b;
  font-weight: 700;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.wiki-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.center-table td, .center-table th { text-align: center; }

.dungeon-main-table tbody tr {
  transition: background 0.15s ease;
}

.dungeon-main-table tbody tr:hover {
  background: rgba(251, 183, 80, 0.10) !important;
}

.dungeon-main-table td { vertical-align: middle !important; }

/* =========================================
   4. 內容區塊
   ========================================= */
.rule-box {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 22px;
}

.rule-box h3 {
  margin: 0 0 14px;
  color: #fbb750;
  border-bottom: 1px dashed rgba(255,255,255,0.18);
  padding-bottom: 10px;
}

.rule-box p { margin: 0; color: #ccc; }

.check-list { list-style: none; padding: 0; margin: 0; }

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  color: #ccc;
  line-height: 1.6;
}

.check-list i {
  margin-top: 5px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.check-list li div { flex: 1; }

.rule-img-inline {
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.18);
  max-width: 100%;
}

/* =========================================
   5. 難度條（用 class 控制顏色）
   ========================================= */
.diff-container {
  width: 100%;
  max-width: 120px;
  background: rgba(255, 255, 255, 0.10);
  height: 12px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.diff-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.35s ease;
}

.bg-success { background: linear-gradient(90deg, #4caf50, #81c784); }
.bg-warning { background: linear-gradient(90deg, #ff9800, #ffb74d); }
.bg-danger  { background: linear-gradient(90deg, #f44336, #ff7961); }

.diff-text {
  position: absolute;
  top: -15px;
  right: 0;
  font-size: 0.7rem;
  color: #888;
}

.rule-desc{
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-left: 3px solid rgba(251,183,80,0.9);
  background: rgba(251,183,80,0.08);
  color: #ddd;
  border-radius: 8px;
  line-height: 1.7;
}

/* 連結按鈕（怪物資料） */
.link-btn{
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(251,183,80,0.35);
  background: rgba(251,183,80,0.10);
  color: #fbb750;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.link-btn:hover{
  background: rgba(251,183,80,0.18);
  border-color: rgba(251,183,80,0.55);
  transform: translateY(-1px);
}

/* YouTube RWD */
.video-wrap{
  margin-top: 10px;
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
}
.video-wrap iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.reward-table td, .reward-table th {
  padding: 12px 12px;
}

.reward-table tbody tr:hover {
  background: rgba(251,183,80,0.08);
}



/* =========================================
   6. 手機版 RWD
   ========================================= */
@media (max-width: 768px) {
  .tab-btn {
    padding: 10px 14px;
    font-size: 0.95rem;
  }

  .diff-container {
    max-width: 100px;
    margin-top: 5px;
  }

  .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: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    overflow: hidden;
  }

  .wiki-table td {
    display: flex;
    justify-content: space-between;
    text-align: right;
    padding: 10px 14px;
    border-bottom: 1px dashed rgba(255,255,255,0.12);
  }

  .wiki-table td:last-child { border-bottom: none; }
  .wiki-table td::before {
    content: attr(data-label);
    color: #8f8f8f;
    font-weight: 400;
  }

  .text-left { text-align: right !important; }
}

