/* ========================================================
   今彩539 跨週全歷史大數據專區（實開核銷看板與良心收兵提示）專屬樣式庫
   路徑: static/css/weekly_tracker_539.css
   品牌: 100% 易算神算 777 / 中獎領錢 自有品牌
   ======================================================== */

.weekly-539-tracker-card {
  background: linear-gradient(145deg, #0d1527 0%, #070b14 100%) !important;
  border: 1.5px solid #1e3a8a !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(30, 58, 138, 0.25) !important;
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  padding: 12px 14px;
}

.weekly-539-tracker-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #f59e0b, #10b981, #f59e0b, #3b82f6);
  background-size: 200% 100%;
  animation: weeklyBorderFlow 4s linear infinite;
}

@keyframes weeklyBorderFlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* 頂部標題 */
.weekly-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.weekly-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weekly-icon-badge {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(30, 58, 138, 0.4);
  border: 1px solid #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.weekly-title-texts h3 {
  margin: 0;
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.weekly-title-texts .weekly-sub-text {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 2px;
  display: block;
}

.weekly-period-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 「良心大師」動態出牌與風險控管提示卡 */
.weekly-advice-banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s ease;
  position: relative;
}

/* 進攻期樣式 */
.weekly-advice-banner.advice-attack {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.15) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1.5px solid #f97316;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.25);
}

/* 大獲全勝 / 收兵期樣式（高光榮耀） */
.weekly-advice-banner.advice-harvest_stop {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(245, 158, 11, 0.15) 50%, rgba(15, 23, 42, 0.95) 100%);
  border: 2px solid #fbbf24;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.4), inset 0 0 14px rgba(16, 185, 129, 0.2);
  animation: pulseHarvestBorder 2.5s infinite alternate;
}

@keyframes pulseHarvestBorder {
  0% { border-color: #fbbf24; box-shadow: 0 0 16px rgba(251, 191, 36, 0.35); }
  100% { border-color: #34d399; box-shadow: 0 0 26px rgba(52, 211, 153, 0.55); }
}

.weekly-advice-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.weekly-advice-badge {
  font-size: 0.74rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.advice-attack .weekly-advice-badge {
  background: #f97316;
  color: #0b0f19;
}

.advice-harvest_stop .weekly-advice-badge {
  background: linear-gradient(135deg, #fbbf24, #10b981);
  color: #0b0f19;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
}

.weekly-advice-sim-toggle {
  display: inline-flex;
  gap: 4px;
}

.btn-advice-toggle {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #475569;
  color: #94a3b8;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-advice-toggle:hover {
  background: #334155;
  color: #ffffff;
}

.btn-advice-toggle.active {
  background: #3b82f6;
  border-color: #60a5fa;
  color: #ffffff;
  font-weight: 700;
}

.weekly-advice-title {
  font-size: 0.96rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.35;
}

.advice-harvest_stop .weekly-advice-title {
  color: #fef08a;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.weekly-advice-desc {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

/* ========================================================
   黃金主力 5 碼（當週實開動態打勾核銷區塊）
   ======================================================== */
.weekly-golden-section {
  margin-bottom: 16px;
}

.weekly-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.weekly-section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fde047;
  display: flex;
  align-items: center;
  gap: 6px;
}

.weekly-section-stats {
  font-size: 0.75rem;
  color: #94a3b8;
}

.weekly-section-stats strong {
  color: #38bdf8;
  font-size: 0.85rem;
}

.weekly-golden-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

/* 號碼卡單元 */
.weekly-ball-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 8px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  transition: all 0.25s ease;
}

.weekly-ball-card:hover {
  transform: translateY(-2px);
  border-color: #3b82f6;
}

/* 已開出狀態（高光金邊 + 打勾金色徽章） */
.weekly-ball-card.is-hit {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
  border: 1.5px solid #fbbf24 !important;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.35);
}

.weekly-hit-badge {
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.weekly-ball-card.is-hit .weekly-hit-badge {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #0b0f19;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.weekly-ball-card:not(.is-hit) .weekly-hit-badge {
  background: rgba(30, 41, 59, 0.6);
  color: #64748b;
  border: 1px solid #334155;
}

/* 號碼球本體 */
.weekly-ball-sphere {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #ffffff;
  margin: 2px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  position: relative;
  transition: transform 0.2s;
}

.weekly-ball-card.is-hit .weekly-ball-sphere {
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.8), inset 0 2px 5px rgba(255, 255, 255, 0.7);
  animation: hitBallGlow 2s infinite alternate;
}

@keyframes hitBallGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 4px #fbbf24); }
  100% { transform: scale(1.06); filter: drop-shadow(0 0 10px #fbbf24); }
}

.weekly-ball-sphere .ball-num {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
}

.weekly-ball-sphere .ball-zodiac {
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  margin-top: 1px;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.4);
  padding: 0 2px;
  border-radius: 2px;
}

.weekly-ball-wuxing {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1;
}

/* ========================================================
   本週最強雙尾（命中進度條區塊）
   ======================================================== */
.weekly-tails-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.weekly-tails-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.weekly-tail-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.weekly-tail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weekly-tail-name {
  font-size: 0.92rem;
  font-weight: 900;
  color: #fde047;
  display: flex;
  align-items: center;
  gap: 4px;
}

.weekly-tail-hit-count {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 12px;
  background: rgba(234, 88, 12, 0.2);
  border: 1px solid #f97316;
  color: #fdba74;
}

.weekly-tail-hit-count.has-hit {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.weekly-tail-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.weekly-tail-chip {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #475569;
  color: #cbd5e1;
}

.weekly-tail-hit-history {
  font-size: 0.7rem;
  color: #a7f3d0;
  margin-top: 2px;
}

/* 底部宣告 */
.weekly-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.72rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.weekly-brand-tag {
  color: #fbbf24;
  font-weight: 700;
}

/* RWD 適配 */
@media (max-width: 480px) {
  .weekly-golden-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }
  .weekly-ball-sphere {
    width: 38px;
    height: 38px;
  }
  .weekly-ball-sphere .ball-num {
    font-size: 1rem;
  }
  .weekly-ball-sphere .ball-zodiac {
    font-size: 8px;
  }
  .weekly-hit-badge {
    font-size: 0.58rem;
    padding: 1px 3px;
  }
  .weekly-tails-grid {
    grid-template-columns: 1fr;
  }
}
