/* =============================================
   NBA 賽事預測畫面
   ============================================= */

/* ── 頁面報告日期 ─────────────────────────── */

.nba-report-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.nba-report-date {
  font-size: 12px;
  color: var(--text-muted);
  padding: var(--sp-1) var(--sp-3);
  background: var(--bg-raised);
  border-radius: var(--r-full);
}
.nba-report-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── 主體佈局（側欄 + 卡片）────────────── */

.nba-body-layout {
  display: flex;
  flex-direction: row;
  gap: var(--sp-4);
  align-items: flex-start;
}

/* ── 行程側欄 ────────────────────────────── */

.nba-schedule-side {
  flex-shrink: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  overflow-y: auto;
  max-height: 80vh;
  position: sticky;
  top: 0;
}
.nba-schedule-title {
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* ── 行事曆格子 ──────────────────────────── */
.nba-cal-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nba-cal-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nba-cal-cell--today {
  border-color: rgba(123,170,247,0.4);
  background: rgba(123,170,247,0.07);
}
.nba-cal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nba-cal-dd {
  font-size: 15px;
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: 1;
}
.nba-cal-cell--today .nba-cal-dd {
  color: #7baaf7;
}
.nba-cal-wd {
  font-size: 12px;
  color: var(--text-muted);
}
.nba-cal-today-badge {
  font-size: 9px;
  background: rgba(123,170,247,0.18);
  color: #7baaf7;
  border-radius: var(--r-full);
  padding: 1px 6px;
  font-weight: var(--weight-bold);
  line-height: 1.4;
  margin-left: auto;
}
.nba-cal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nba-cal-game {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nba-cal-game:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.nba-cal-game:first-child {
  padding-top: 0;
}
.nba-cal-matchup {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nba-cal-team-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.nba-cal-team {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.nba-cal-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}
.nba-cal-abbr {
  font-size: 11px;
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}
.nba-cal-name {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}
.nba-cal-time {
  font-size: 10px;
  color: #7baaf7;
  opacity: 0.9;
}
.nba-cal-score {
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--text-muted);
  flex-shrink: 0;
}
.nba-cal-score--win {
  color: var(--text-primary);
}
.nba-cal-vs {
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.5;
  padding-left: 20px;
}
.nba-cal-rest {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-top: 6px;
}
.nba-cal-expand-btn {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 4px 0;
  font-size: 11px;
  color: #7baaf7;
  background: none;
  border: none;
  border-top: 1px dashed rgba(123,170,247,0.2);
  cursor: pointer;
  text-align: center;
  opacity: 0.8;
}
.nba-cal-expand-btn:hover {
  opacity: 1;
}

/* ── 卡片列表 ────────────────────────────── */

.nba-cards-list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* ── 場次說明列 ──────────────────────────── */

.sport-notice {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(123,170,247,0.07);
  border: 1px solid rgba(123,170,247,0.15);
  border-radius: var(--r-md);
  padding: 8px 14px;
  margin-bottom: var(--sp-4);
  line-height: 1.6;
}

/* ── 動能 Tooltip ────────────────────────── */

.nba-momentum-label {
  font-size: 11px;
  color: var(--text-muted);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.nba-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  line-height: 1;
}
.nba-tip-box {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background: var(--bg-raised);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: normal;
  text-align: left;
  z-index: 10;
  pointer-events: none;
}
.nba-tip-icon:hover .nba-tip-box,
.nba-tip-icon:focus .nba-tip-box {
  display: block;
}

@media (max-width: 768px) {
  .nba-body-layout {
    flex-direction: column;
  }
  .nba-schedule-side {
    width: 100%;
    max-height: none;
    position: static;
  }
}

/* ── 對戰卡片 ────────────────────────────── */

.nba-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.nba-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* EV+ 卡片金邊 */
.nba-card--ev-plus {
  border-color: rgba(255, 215, 0, 0.28);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.08);
}

/* ── 卡片頂部：球隊對戰 ──────────────────── */

.nba-card-header {
  display: flex;
  align-items: stretch;
  background: var(--bg-raised);
  padding: var(--sp-4) var(--sp-5);
  gap: var(--sp-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nba-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  min-width: 0;
}
.nba-team--away { }

.nba-team-logo {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nba-team-name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  text-align: center;
  line-height: 1.3;
}
.nba-team-abbr {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-num);
  letter-spacing: 0.05em;
}
.nba-team-record {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-num);
}

.nba-vs-block {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: 0 var(--sp-1);
}
.nba-vs-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
}
.nba-game-time {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

/* ── 標籤列 ──────────────────────────────── */

.nba-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.nba-tag {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-raised);
  border-radius: var(--r-full);
  padding: 3px 10px;
  white-space: nowrap;
}

/* ── 卡片主體 ────────────────────────────── */

.nba-card-body {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  align-items: flex-start;
}

/* 雷達圖區 */
.nba-radar-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.nba-radar-labels {
  display: flex;
  justify-content: space-around;
  width: 100%;
}
.nba-radar-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}
.nba-radar-label span {
  display: block;
  font-size: 9px;
  opacity: 0.7;
}

/* 分析文字區 */
.nba-analysis-section {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.nba-analysis-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── 預測結果列 ──────────────────────────── */

.nba-prediction {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.nba-rec-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  background: rgba(123, 170, 247, 0.15);
  color: #7baaf7;
  border: 1px solid rgba(123, 170, 247, 0.25);
  white-space: nowrap;
}
.nba-rec-badge--ev {
  background: rgba(255, 215, 0, 0.12);
  color: var(--lotto-gold);
  border-color: rgba(255, 215, 0, 0.28);
}

.nba-ev-chip {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: rgba(129, 201, 149, 0.15);
  color: #81c995;
  border: 1px solid rgba(129, 201, 149, 0.25);
  white-space: nowrap;
  font-weight: var(--weight-bold);
}

/* ── 信心指數 ────────────────────────────── */

.nba-confidence {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.nba-confidence-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.nba-confidence-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  min-width: 60px;
}
.nba-confidence-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}
.nba-confidence-val {
  font-size: 12px;
  font-weight: var(--weight-bold);
  font-family: var(--font-num);
  color: var(--text-primary);
  white-space: nowrap;
  min-width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* ── 空狀態 ─────────────────────────────── */

.nba-empty {
  text-align: center;
  padding: var(--sp-10) var(--sp-4);
  color: var(--text-muted);
}
.nba-empty-icon {
  font-size: 52px;
  margin-bottom: var(--sp-3);
}
.nba-empty p {
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 260px;
  margin: 0 auto;
}

/* ── 免責聲明 ────────────────────────────── */

.nba-disclaimer {
  margin-top: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-raised);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
}

/* ── 響應式：手機版雷達圖移至下方 ──────────── */

@media (max-width: 480px) {
  .nba-card-body {
    flex-direction: column;
  }
  .nba-radar-section {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: var(--sp-4);
  }
  .nba-team-name {
    font-size: var(--text-xs);
  }
}
