/* ==========================================================================
   SkyFire GPS - 霞光隨行 核心樣式表
   設計哲學：台灣隨身定位、深邃晨昏光影、玻璃擬態與精準大氣視覺化
   ========================================================================== */

:root {
  /* 主題色盤 - 晨昏大氣光影 */
  --bg-space: #090d16;
  --bg-surface-1: rgba(16, 22, 36, 0.93);
  --bg-surface-2: rgba(24, 32, 52, 0.9);
  --bg-surface-hover: rgba(38, 50, 78, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-glow: rgba(255, 107, 0, 0.35);

  /* 文字色彩 */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d16;

  /* 火燒雲評級光色 */
  --fire-epic: #ff2a6d;
  --fire-great: #ff6b00;
  --fire-moderate: #ffb703;
  --fire-faint: #6366f1;
  --fire-overcast: #64748b;

  /* 強調色 */
  --accent-gps: #0284c7;
  --accent-cyan: #38bdf8;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-sunset: linear-gradient(135deg, #ff4500 0%, #ff8c00 50%, #ff007f 100%);
  --accent-sunrise: linear-gradient(135deg, #ff007f 0%, #ff8c00 50%, #ffd700 100%);

  /* 陰影與光暈 */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow-orange: 0 0 35px rgba(255, 107, 0, 0.3);
  --shadow-glow-cyan: 0 0 35px rgba(56, 189, 248, 0.3);

  /* 圓角 */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* 字體：中文一律走系統字型 (PingFang TC / 微軟正黑 / 思源黑體)，零下載、
     零 FOUT，也不會在字體載入後觸發整頁重排。只有拉丁字母與數字用 Google 的
     Plus Jakarta Sans (檔案小)。 */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang TC', 'Microsoft JhengHei', 'Noto Sans CJK TC', 'Noto Sans TC', Roboto, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 全域重設 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  background-color: var(--bg-space);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #17153b 0%, #0b1120 40%, #05070c 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* 宇宙星空與晨昏微粒背景 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.6), rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 120px 180px, rgba(56, 189, 248, 0.5), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 280px 90px, rgba(255, 255, 255, 0.4), rgba(0,0,0,0)),
    radial-gradient(2px 2px at 450px 260px, rgba(255, 107, 0, 0.4), rgba(0,0,0,0));
  background-size: 550px 550px;
  opacity: 0.45;
  z-index: -2;
  pointer-events: none;
}

/* 動態光暈背景球 */
.ambient-glow {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 850px;
  height: 450px;
  /* 預先做寬鬆的漸層過渡，不用 filter: blur() —— blur(70px) 在大面積固定元素上
     每次合成都要跑一次模糊 shader，是持續的 paint 成本。 */
  background: radial-gradient(ellipse at center, rgba(255, 107, 0, 0.22) 0%, rgba(255, 107, 0, 0.12) 30%, rgba(56, 189, 248, 0.10) 55%, transparent 78%);
  z-index: -1;
  pointer-events: none;
  transition: var(--transition-smooth);
}

/* 主容器 */
.app-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 20px 80px 20px;
}

/* ==========================================================================
   Header 導航與定位操作列
   ========================================================================== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0 24px 0;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 24px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7 0%, #ff4500 50%, #ff8c00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(255, 69, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.brand-logo::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(60deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shine 4s infinite linear;
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.brand-text h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  letter-spacing: 0.5px;
  -webkit-text-fill-color: initial;
}

.brand-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-pill:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-pill.gps-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  color: #ffffff;
}

.btn-pill.gps-btn:hover {
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.55);
}

.btn-pill.primary {
  background: linear-gradient(135deg, #ff5722 0%, #ff8f00 100%);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(255, 87, 34, 0.35);
}

.btn-pill.primary:hover {
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.5);
}

.btn-pill.rotating span {
  display: inline-block;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   時段切換列與即時定位狀態列
   ========================================================================== */
.session-switch-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.session-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

.tab-btn {
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 7px;
}

.tab-btn.active {
  background: linear-gradient(135deg, #ff6b00 0%, #ff9e00 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.live-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 16px #38bdf8; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   Hero 主儀表板：火燒雲核心指數與大氣垂直雲層剖面
   ========================================================================== */
.hero-dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 960px) {
  .hero-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* 玻璃擬態通用卡片 */
.glass-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* 主要指數卡片 */
.main-gauge-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(26, 34, 54, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-top: 1px solid rgba(56, 189, 248, 0.35);
}

.gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}

.target-time-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.location-chip {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.82rem;
}

.countdown-box {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffb703;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* 儀表中央圓形與分數 */
.gauge-content-row {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .gauge-content-row {
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }
}

.circular-gauge-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  flex-shrink: 0;
}

.circular-gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 12;
}

.gauge-fill-circle {
  fill: none;
  stroke: url(#gaugeGradient);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 88;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.2, 0.9, 0.3, 1), stroke 0.4s;
  filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.6));
}

.gauge-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-number {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  background: linear-gradient(180deg, #ffffff 30%, #ffeedd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gauge-unit {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.gauge-verdict {
  flex: 1;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: rgba(255, 107, 0, 0.15);
  color: #ff7b1a;
  border: 1px solid rgba(255, 107, 0, 0.4);
}

.rating-summary {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.45;
}

.peak-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.peak-window-bar strong {
  color: #ffca3a;
}

/* 4 大指標柱 */
.quick-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-top: 1px solid var(--glass-border);
  padding-top: 18px;
}

@media (max-width: 600px) {
  .quick-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.metric-pill-item {
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-pill-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-pill-val {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   右側：3D 大氣垂直雲層剖面卡片
   ========================================================================== */
.cloud-cross-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title-bar h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-chip {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.atmosphere-visualizer {
  position: relative;
  background: linear-gradient(180deg, #181336 0%, #1e293b 60%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.sunbeam-ray {
  position: absolute;
  bottom: 0;
  right: -20px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle at 100% 100%, rgba(255, 107, 0, 0.25) 0%, rgba(255, 215, 0, 0.1) 40%, transparent 70%);
  pointer-events: none;
}

.cloud-level-row {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.level-indicator {
  width: 95px;
  flex-shrink: 0;
}

.level-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.level-height {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.level-bar-track {
  flex: 1;
  height: 22px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.level-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
}

.level-bar-fill.high {
  background: linear-gradient(90deg, #ec4899 0%, #f43f5e 100%);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

.level-bar-fill.mid {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.4);
}

.level-bar-fill.low {
  background: linear-gradient(90deg, #64748b 0%, #475569 100%);
}

.level-status-tag {
  width: 72px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
}

.level-status-tag.good { color: #34d399; }
.level-status-tag.fair { color: #fbbf24; }
.level-status-tag.danger { color: #f87171; }

.cross-section-footer {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   天文日照時間軸 (Solar Timeline)
   ========================================================================== */
.solar-timeline-section {
  margin-bottom: 36px;
}

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

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-cards-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .timeline-cards-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .timeline-cards-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.solar-event-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  transition: var(--transition-smooth);
}

.solar-event-card:hover {
  transform: translateY(-2px);
  background: var(--bg-surface-hover);
}

.solar-event-card.highlight {
  border-color: rgba(255, 107, 0, 0.5);
  background: linear-gradient(180deg, rgba(255, 107, 0, 0.12) 0%, rgba(20, 26, 40, 0.8) 100%);
}

.event-phase-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-time-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.event-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   未來 7 日火燒雲趨勢一覽卡片 (7-Day SkyFire Deck)
   ========================================================================== */
.forecast-7day-section {
  margin-bottom: 36px;
}

.days-forecast-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

@media (max-width: 1200px) {
  .days-forecast-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .days-forecast-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.day-forecast-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.day-forecast-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 0, 0.4);
}

.day-forecast-card.selected {
  border-color: #ff6b00;
  background: linear-gradient(180deg, rgba(255, 107, 0, 0.15) 0%, rgba(20, 26, 40, 0.9) 100%);
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.25);
}

.card-day-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card-event-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.card-score-num {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.card-cloud-spec {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   台灣互動地圖與 20 大攝影聖地列表
   ========================================================================== */
.spots-section {
  margin-bottom: 36px;
}

.spots-layout-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
}

@media (max-width: 960px) {
  .spots-layout-grid {
    grid-template-columns: 1fr;
  }
}

.map-container-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 540px;
  position: relative;
  box-shadow: var(--shadow-md);
}

#interactiveMap {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-floating-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ff9e00;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-hint-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 10;
  background: rgba(2, 132, 199, 0.85);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  color: #ffffff;
}

@keyframes gpsPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.spots-list-wrapper {
  background: var(--bg-surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 540px;
}

.spots-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.filter-chip {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--bg-surface-2);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.filter-chip.active {
  background: #ff5722;
  color: #ffffff;
  border-color: #ff5722;
}

.spots-scroll-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.spots-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.spots-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}

.spot-card-item {
  background: var(--bg-surface-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.spot-card-item:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 107, 0, 0.4);
  transform: translateX(3px);
}

.spot-card-item.active {
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.15);
}

.spot-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.spot-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.spot-type-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.spot-type-tag.sunset { background: rgba(255, 107, 0, 0.2); color: #ff9e00; }
.spot-type-tag.sunrise { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.spot-type-tag.both { background: rgba(236, 72, 153, 0.2); color: #f43f5e; }

.spot-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.spot-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.spot-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spot-tag-pill {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.spot-card-live {
  margin-top: 8px;
}

.spot-live-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: #38bdf8;
  padding: 3px 8px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.spot-live-link:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.6);
}

/* ==========================================================================
   攝影師隨身小抄指南
   ========================================================================== */
.photo-guide-section {
  margin-bottom: 36px;
}

.photo-tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 850px) {
  .photo-tips-grid {
    grid-template-columns: 1fr;
  }
}

.photo-tip-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.tip-card-header {
  font-size: 1.02rem;
  font-weight: 800;
  color: #ff9e00;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tip-param-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tip-param-item {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.tip-param-item strong {
  color: var(--text-primary);
}

/* ==========================================================================
   科學物理模型與大氣光學專區
   ========================================================================== */
.science-section {
  margin-bottom: 36px;
}

.science-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

@media (max-width: 850px) {
  .science-grid {
    grid-template-columns: 1fr;
  }
}

.science-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.science-card-header {
  font-size: 1.02rem;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.science-card-body p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.formula-badge-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 10px 0;
  text-align: center;
}

.formula-badge-box span {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 800;
  color: #ff9e00;
  display: block;
}

.formula-badge-box small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cloud-physics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 8px;
}

.cloud-physics-table th, .cloud-physics-table td {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.cloud-physics-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.cloud-physics-table td {
  color: var(--text-secondary);
}

.science-banner-full {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15) 0%, rgba(255, 107, 0, 0.15) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.science-banner-full h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 10px;
}

/* ==========================================================================
   Modal 氣象沙盒模擬器
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #fff;
}

.slider-group {
  margin-bottom: 14px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.slider-input {
  width: 100%;
  accent-color: #ff6b00;
  cursor: pointer;
}

.sim-preview-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-top: 18px;
/* ==========================================================================
   實況驗證走廊與統計 Banner (Live Ground Truth Corridor)
   ========================================================================== */
.verification-stats-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .verification-stats-banner {
    grid-template-columns: 1fr;
  }
}

.stat-pill-box {
  background: var(--bg-surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: center;
}

.stat-pill-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-pill-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #38bdf8;
}

.verification-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.verification-card-item {
  background: var(--bg-surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.verification-card-item:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-md);
}

.verification-img-wrapper {
  position: relative;
  width: 100%;
  height: 160px;
  background: #0b0f19;
  overflow: hidden;
}

.verification-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.verification-card-item:hover .verification-img-wrapper img {
  transform: scale(1.05);
}

.verdict-floating-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.85);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.verification-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.verification-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.verification-date {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
}

.verification-source {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.score-compare-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
}

.compare-score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.compare-score-box span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.compare-score-box strong {
  font-size: 1.1rem;
  font-weight: 800;
}

.compare-divider {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.verification-metrics-chips {
  display: flex;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* 頁尾 */
.site-footer {
  text-align: center;
  padding: 28px 0;
  border-top: 1px solid var(--glass-border);
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ==========================================================================
   每日實況日報與歷史歸檔庫 (Daily Ground Truth Briefing & Archive)
   ========================================================================== */
.latest-report-card {
  padding: 24px;
  background: rgba(26, 32, 53, 0.75);
  border: 1px solid rgba(255, 112, 67, 0.25);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-bottom: 24px;
}

.report-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-title-group h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-meta-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-tag-pill {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.report-tag-pill.highlight {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.report-score-banner-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .report-score-banner-row {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.report-score-unit {
  display: flex;
  align-items: center;
  gap: 14px;
}

.report-score-unit-icon {
  font-size: 1.8rem;
}

.report-score-info-box span {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.report-score-info-box strong {
  font-size: 1.2rem;
  font-weight: 800;
}

.report-table-box {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.report-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.report-data-table th {
  background: rgba(30, 41, 59, 0.85);
  padding: 10px 14px;
  color: #cbd5e1;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.report-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  line-height: 1.45;
}

.report-data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.report-unavailable-banner {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 11px 16px;
  margin: 12px 0;
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.5;
}

.report-summary-card-block {
  background: rgba(15, 23, 42, 0.65);
  border-left: 4px solid #ff7043;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin-top: 14px;
}

.report-summary-card-block h4 {
  font-size: 0.95rem;
  color: #fb923c;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-summary-card-block p {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 6px;
}

/* 歷史歸檔庫 Deck */
.archive-section-box {
  margin-top: 32px;
}

.archive-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.archive-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f1f5f9;
}

.archive-list-deck {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-item-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.archive-item-card:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(255, 112, 67, 0.4);
  transform: translateY(-2px);
}

.archive-item-card.active {
  background: rgba(30, 41, 59, 0.9);
  border-color: #ff7043;
}

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

.archive-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.archive-item-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ==========================================================================
   預測演算法模式切換器與光路通道 (Algorithm Switcher & Ray-Path Channel)
   ========================================================================== */
.model-algorithm-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 20px auto;
  flex-wrap: wrap;
}

.switcher-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.model-tabs {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px;
  border-radius: 30px;
  gap: 4px;
}

.model-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.model-tab-btn:hover {
  color: #fff;
}

.model-tab-btn.active {
  background: linear-gradient(135deg, #ff7043, #f43f5e);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 112, 67, 0.35);
}

/* 光路進光通道 Banner */
.raypath-channel-banner {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 16px;
}

.raypath-channel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.raypath-channel-title {
  font-size: 0.88rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.raypath-tag {
  font-size: 0.75rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  padding: 2px 8px;
  border-radius: 12px;
}

.raypath-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 768px) {
  .raypath-grid {
    grid-template-columns: 1fr;
  }
}

.raypath-cell {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
}

.raypath-cell.highlight {
  border-color: rgba(255, 112, 67, 0.3);
  background: rgba(255, 112, 67, 0.08);
}

.raypath-cell-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.raypath-cell-val {
  font-size: 0.84rem;
  color: #f1f5f9;
}


.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: #ff9e00;
}
