/* =============================================
   BASE.CSS — 變數 / 重置 / 字型 / 導覽列 / Hero
   ============================================= */

/* ── LIVE 比賽通知條（重新設計版）──────────────────────── */
#live-matches-banner {
  position: sticky;
  top: 64px;
  /* 拉到 1001 高於 header(1000)、半透明蓋在拉環上方、不被擋 */
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 16px;
  background:
    linear-gradient(135deg, rgba(40,15,15,0.78), rgba(35,20,30,0.78));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(239,68,68,0.55);
  box-shadow:
    0 4px 18px rgba(239,68,68,0.20),
    inset 0 1px 0 rgba(255,255,255,0.04);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  animation: lmb-slide-in 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes lmb-slide-in {
  0% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
#live-matches-banner:hover {
  background:
    linear-gradient(135deg, rgba(50,18,18,0.96), rgba(45,25,35,0.96));
}
#live-matches-banner .lmb-pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #ef4444;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(239,68,68,0.7);
}
#live-matches-banner .lmb-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(239,68,68,0.5);
  animation: lmb-pulse-ring 1.4s ease-out infinite;
}
@keyframes lmb-pulse-ring {
  0%   { transform: scale(0.8); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}
#live-matches-banner .lmb-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #ef5350;
  font-weight: 900;
  flex-shrink: 0;
}
#live-matches-banner .lmb-text {
  flex: 1;
  display: flex;
  gap: 18px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#live-matches-banner .lmb-match {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#live-matches-banner .lmb-score {
  font-family: 'Courier New', monospace;
  font-weight: 900;
  color: #FFD54F;
  padding: 2px 8px;
  background: rgba(255,213,79,0.10);
  border-radius: 4px;
  font-size: 13px;
}
#live-matches-banner .lmb-min {
  color: #FFD54F;
  font-weight: 900;
  font-size: 12px;
  padding: 1px 7px;
  background: rgba(255,213,79,0.10);
  border: 1px solid rgba(255,213,79,0.35);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}
#live-matches-banner .lmb-close {
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.65);
  border-radius: 50%;
  padding: 0;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
#live-matches-banner .lmb-close:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
@media (max-width: 600px) {
  #live-matches-banner {
    padding: 7px 8px 7px 10px;
    gap: 8px;
    font-size: 12px;
    /* ★ 手機版 pull-tab 在中央上方、紅條往下推到 pull-tab 下方 */
    top: 98px;
  }
  #live-matches-banner .lmb-label { display: none; }
}

/* ---------- CSS 變數 ---------- */
:root {
  --bg-primary:    #07091a;
  --bg-secondary:  #0f1328;
  --bg-card:       rgba(255,255,255,0.05);
  --bg-card-hover: rgba(255,255,255,0.09);
  --border:        rgba(255,255,255,0.10);
  --border-accent: rgba(240,192,64,0.40);
  --gold:    #f0c040;
  --gold-dk: #c89a20;
  --red:     #e53935;
  --red-dk:  #b71c1c;
  --blue:    #1e88e5;
  --green:   #43a047;

  /* 主題色（由賽事切換覆蓋） */
  --accent:         #f0c040;
  --accent-dk:      #c89a20;
  --accent-glow:    rgba(240,192,64,0.35);
  --accent-bg:      rgba(240,192,64,0.08);
  --accent-bg-deep: rgba(240,192,64,0.05);
  --accent-border:  rgba(240,192,64,0.40);
  --accent-gradient: linear-gradient(90deg, #f0c040, #ff8c42);
  --hero-gradient:  linear-gradient(160deg, rgba(240,192,64,0.08) 0%, transparent 40%),
                    linear-gradient(220deg, rgba(229,57,53,0.06) 0%, transparent 40%);
  --particle-a:     rgba(240,192,64,0.06);
  --particle-b:     rgba(30,136,229,0.07);

  /* 語意色彩 */
  --success:    #4caf50;
  --success-dk: #388e3c;
  --warning:    #f5a623;
  --warning-dk: #e09000;
  --danger:     #f44336;
  --danger-dk:  #d32f2f;
  --info:       #29b6f6;
  --orange:     #ff8c42;

  --text-primary:   #f0f0f0;
  --text-secondary: #90a4ae;
  --text-muted:     #546e7a;

  /* 間距比例 */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;
  --sp-2xl: 48px;

  /* 字級比例 */
  --fs-xs:  11px;
  --fs-sm:  12px;
  --fs-base: 14px;
  --fs-md:  16px;
  --fs-lg:  18px;
  --fs-xl:  22px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;

  --header-h: 68px;
  --radius:   14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow:   0 8px 32px rgba(0,0,0,0.45);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);

  /* Z-index 層級系統 */
  --z-base:     1;
  --z-dropdown: 900;
  --z-header:   1000;
  --z-modal:    2000;
  --z-overlay:  9999;
  --z-toast:    10000;
  --z-top:      99999;
}

/* ---------- 歐冠主題色覆蓋 ---------- */
[data-tournament-active="ucl"] {
  --accent:         #1a73e8;
  --accent-dk:      #0d47a1;
  --accent-glow:    rgba(26,115,232,0.35);
  --accent-bg:      rgba(26,115,232,0.10);
  --accent-bg-deep: rgba(26,115,232,0.06);
  --accent-border:  rgba(26,115,232,0.40);
  --accent-gradient: linear-gradient(90deg, #1a73e8, #5eb8ff);
  --hero-gradient:  linear-gradient(160deg, rgba(26,115,232,0.10) 0%, transparent 40%),
                    linear-gradient(220deg, rgba(13,71,161,0.08) 0%, transparent 40%);
  --particle-a:     rgba(26,115,232,0.07);
  --particle-b:     rgba(90,200,250,0.05);
  --border-accent:  rgba(26,115,232,0.40);
}

/* ---------- 英超主題色覆蓋 ---------- */
[data-tournament-active="epl"] {
  --accent:         #00ff87;
  --accent-dk:      #00cc6a;
  --accent-glow:    rgba(0,255,135,0.30);
  --accent-bg:      rgba(0,255,135,0.10);
  --accent-bg-deep: rgba(0,255,135,0.05);
  --accent-border:  rgba(0,255,135,0.40);
  --accent-gradient: linear-gradient(90deg, #00ff87, #04f5ff);
  --hero-gradient:  linear-gradient(160deg, rgba(61,25,91,0.15) 0%, transparent 40%),
                    linear-gradient(220deg, rgba(0,255,135,0.08) 0%, transparent 40%);
  --particle-a:     rgba(0,255,135,0.06);
  --particle-b:     rgba(61,25,91,0.08);
  --border-accent:  rgba(0,255,135,0.40);
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans TC', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  /* sticky footer 模式：main 撐滿剩餘空間，footer 永遠跟在 main 末端
     之前 .page-section 用 min-height:100vh 導致短頁面下方有大空白，使用者誤以為頁尾就是這、不再往下滑 → 看不到 footer */
  display: flex;
  flex-direction: column;
}
#main-content { flex: 1 0 auto; }
.main-footer { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- 捲軸 ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-dk); border-radius: 3px; }

/* ---------- 粒子背景 ---------- */
#particles-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, var(--particle-a) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, var(--particle-b) 0%, transparent 60%),
    var(--bg-primary);
  pointer-events: none;
}

/* ---------- 導覽列 ---------- */
#main-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(7,9,26,0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px; height: var(--header-h);
}
.logo {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; flex-shrink: 0;
}
.logo-icon { font-size: 28px; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.logo-svg  { filter: drop-shadow(0 0 8px var(--accent-glow)); flex-shrink: 0; }
.logo-title { display: block; font-size: 14px; font-weight: 700; color: var(--accent); line-height: 1; }
.logo-sub   { display: block; font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* 賽事切換器 */
.tournament-switcher {
  display: flex; gap: 4px; flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--border);
}
.tournament-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}
.tournament-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}
.tournament-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--tournament-color, var(--accent)), var(--tournament-accent, var(--accent-dk)));
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.tournament-btn .t-label { pointer-events: none; }
.tournament-btn .t-logo { height: 20px; width: 20px; object-fit: contain; vertical-align: middle; pointer-events: none; }

/* 拉桿 / backdrop：base 隱藏、只在 @media (max-width:768px) 顯示
   防止桌機看到漏出來的 button */
.pull-tab { display: none; }
.mobile-nav-backdrop { display: none; }

.main-nav {
  display: flex; gap: 2px; margin-left: auto;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}
.nav-btn span { white-space: nowrap; }
.nav-btn i { font-size: 16px; }
/* 8 顆 nav 在較窄螢幕擠不下 → 1100px 以下縮字級避免換行 */
@media (max-width: 1100px) {
  .nav-btn { padding: 7px 7px; font-size: 11px; }
  .nav-btn i { font-size: 14px; }
}
.nav-btn:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-btn.active { color: var(--accent); }
.nav-btn.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--accent); border-radius: 2px;
}

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; margin-left: auto;
  position: relative;
}
/* 任何模組註冊通知（friend-room / rogue / 任務...）→ 漢堡按鈕右上紅點 */
.hamburger.has-notif::after {
  content: '';
  position: absolute;
  top: 4px; right: 4px;
  width: 9px; height: 9px;
  background: #ff3b30;
  border-radius: 50%;
  border: 2px solid var(--bg-base, #0e1430);
  box-shadow: 0 0 8px rgba(255,59,48,0.75);
  animation: rogue-dot-pulse 1.4s ease-in-out infinite;
  z-index: 1;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: var(--transition);
}

.mobile-nav {
  display: none; padding: 8px 16px 12px;
  border-top: 1px solid var(--border);
}
.mobile-nav .nav-btn { flex-direction: row; gap: 10px; width: 100%; padding: 12px 16px; }
.mobile-nav-status {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 10px 16px; margin-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
}
.mobile-nav-stat { display: flex; align-items: center; gap: 4px; }
.mobile-nav-stat-icon { font-size: 14px; }

/* ---------- 主內容區 ---------- */
#main-content { padding-top: var(--header-h); position: relative; z-index: 1; }
/* min-height 拿掉，改用 sticky footer pattern（body flex column + main flex:1）
   原本 min-height:100vh 在短頁面留下大空白，使用者以為頁尾就是這，看不到 footer */
.page-section { display: none; }
.page-section.active { display: block; animation: pageFadeIn 0.35s ease; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  background: var(--hero-gradient);
}
.hero-bg-overlay {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(255,255,255,0.015) 60px, rgba(255,255,255,0.015) 61px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(255,255,255,0.015) 60px, rgba(255,255,255,0.015) 61px);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 0 auto;
  padding: 60px 24px 40px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px; border-radius: 999px;
  border: 1px solid var(--border-accent);
  background: var(--accent-bg);
  color: var(--accent); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(42px, 8vw, 88px);
  font-weight: 900; line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.hero-highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 16px; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 36px; line-height: 1.7;
}

/* 倒計時 */
.countdown-container {
  margin-bottom: 36px;
}
.countdown-label {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; letter-spacing: 1px;
}
.countdown-blocks {
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.countdown-block {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px; min-width: 80px;
  backdrop-filter: blur(8px);
}
.countdown-num {
  font-size: 42px; font-weight: 900; color: var(--accent);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.countdown-unit { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.countdown-sep { font-size: 32px; font-weight: 900; color: var(--accent-dk); margin-bottom: 16px; }
.countdown-date {
  margin-top: 14px; font-size: 13px; color: var(--text-muted);
}

/* Hero 按鈕 */
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 0; }
.btn-primary {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-dk));
  color: #07091a; font-weight: 700; font-size: 15px;
  transition: var(--transition);
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--accent-glow); }
.btn-secondary {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius);
  border: 1px solid var(--border-accent);
  background: var(--accent-bg);
  color: var(--accent); font-weight: 700; font-size: 15px;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--accent-bg); transform: translateY(-2px); }

/* Hero 統計 */
.hero-stats {
  position: relative; z-index: 1;
  display: flex; justify-content: center; gap: 0;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.hero-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 40px;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-num { font-size: 36px; font-weight: 900; color: var(--accent); }
.hero-stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ---------- 頁面內 Hero ---------- */
.page-hero {
  text-align: center; padding: 60px 24px 40px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--accent-bg-deep) 0%, transparent 100%);
}
.page-hero h1 { font-size: 36px; font-weight: 900; margin-bottom: 10px; }
.page-hero h1 i { color: var(--accent); margin-right: 12px; }
.page-hero p { color: var(--text-secondary); font-size: 15px; }

/* ---------- 通用 Section ---------- */
.home-section {
  max-width: 1400px; margin: 0 auto;
  padding: 40px 24px;
  border-bottom: 1px solid var(--border);
}
.section-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-header h2 {
  font-size: 22px; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.section-header h2 i { color: var(--accent); }
.section-badge {
  padding: 3px 12px; border-radius: 999px;
  background: var(--accent-bg); border: 1px solid var(--border-accent);
  color: var(--accent); font-size: 12px; font-weight: 600;
}
.link-btn {
  margin-left: auto; color: var(--accent); font-size: 14px; font-weight: 600;
  transition: var(--transition);
}
.link-btn:hover { text-decoration: underline; }

/* ---------- 頁腳 ---------- */
.main-footer {
  border-top: 2px solid var(--accent-border);
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
  /* padding-bottom 加大：避免左下/右下浮動按鈕(bottom:24px)蓋住 footer 底部內容 */
  padding: 32px 24px 100px;
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
}
.footer-logo { display: flex; align-items: center; gap: 14px; font-size: 24px; }
.footer-title { font-size: 14px; font-weight: 700; color: var(--accent); }
.footer-sub   { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.footer-info  { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); text-align: right; }

/* ── 今日比賽 widget（桌機 + 手機共用）─────────────────────
   4 個狀態用 class 切換：藏 / 未開始金 / LIVE 紅閃 / 完賽綠
   桌機放 header 右群組、手機在右群組底部 */
.nav-today-widget {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s, border-color 0.3s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  background: transparent;
  color: inherit;
}
.nav-today-widget.show { display: inline-flex !important; }
.nav-today-widget:active { transform: scale(0.94); }
.nav-today-widget .ntw-icon { font-size: 15px; line-height: 1; }
.nav-today-widget .ntw-count { line-height: 1; letter-spacing: 0.5px; }

/* 狀態 1: 未開始 — 金色 */
.nav-today-widget.state-upcoming {
  background: linear-gradient(135deg, rgba(255,193,7,0.15), rgba(255,152,0,0.10));
  border-color: rgba(255,193,7,0.35);
  color: #FFD54F;
  text-shadow: 0 0 4px rgba(255,193,7,0.4);
}

/* 狀態 2: LIVE — 紅色脈動 */
.nav-today-widget.state-live {
  background: linear-gradient(135deg, rgba(255,71,87,0.20), rgba(255,32,52,0.12));
  border-color: rgba(255,71,87,0.6);
  color: #FF6B7A;
  text-shadow: 0 0 6px rgba(255,71,87,0.6);
  animation: ntw-pulse 1.4s ease-in-out infinite;
}
.nav-today-widget.state-live .ntw-icon {
  animation: ntw-icon-pulse 1.2s ease-in-out infinite;
}
@keyframes ntw-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,71,87,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(255,71,87,0); }
}
@keyframes ntw-icon-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* 狀態 3: 已完賽 — 綠色 */
.nav-today-widget.state-done {
  background: linear-gradient(135deg, rgba(76,175,80,0.15), rgba(56,142,60,0.10));
  border-color: rgba(76,175,80,0.35);
  color: #81C784;
}

/* ---------- RWD ---------- */
@media (max-width: 768px) {
  /* 雷達圖區塊：手機改 1 欄上下排列、canvas 縮成 200px */
  .team-radar-block > div {
    grid-template-columns: 1fr !important;
    justify-items: center;
  }
  .team-radar-block #team-radar-canvas {
    width: 200px !important;
    height: 200px !important;
  }
  .team-radar-block #team-radar-stats {
    width: 100%;
  }

  /* header 單列、自適應佈局：logo 自然寬 + switcher flex:1 填滿中間 + 右群組固定
     EN 切換、☰ 漢堡都改用底部「梯形拉桿」開啟 */
  :root { --header-h: 64px; }
  #main-header { height: var(--header-h); overflow: visible; }
  .header-inner {
    gap: 8px;
    padding: 0 10px;
    height: var(--header-h);
  }
  /* Logo 加大、品牌存在感更強 */
  .logo { gap: 8px; min-width: 0; flex: 0 0 auto; }
  .logo-title { font-size: 14px; white-space: nowrap; line-height: 1.1; }
  .logo-img, .logo .logo-img { width: 40px !important; height: 40px !important; }
  .logo-svg { width: 36px; height: 40px; }
  .logo-sub { font-size: 10px; white-space: nowrap; line-height: 1.1; }
  .logo-text { min-width: 0; overflow: hidden; }
  .main-nav { display: none; }
  /* ☰ 漢堡按鈕拿掉、改用底部梯形拉桿 */
  .hamburger { display: none !important; }

  /* 桌機版 EN 按鈕在手機隱藏（已搬進拉桿選單） */
  #lang-toggle-btn { display: none !important; }

  /* 賽事切換器：flex:1 自動撐滿 logo 跟右群組之間的空白
     3 顆按鈕內部用 flex:1 1 0 平均分配、按鈕越寬 padding 越大 */
  .tournament-switcher { flex: 1 1 auto; }
  #nav-user-widget { flex: 0 0 auto; }
  .nav-streak-widget { flex: 0 0 auto; }
  .nav-today-widget { flex: 0 0 auto; }

  /* 手機版：widget 略縮一點點 */
  .nav-today-widget { padding: 5px 9px; font-size: 12px; }
  .nav-today-widget .ntw-icon { font-size: 14px; }

  /* ── 賽事切換器：自適應寬度、按鈕平均分配填滿中間空間 ── */
  .tournament-switcher {
    flex: 1 1 auto;        /* 自動撐滿剩餘空間 */
    min-width: 0;
    display: flex;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
  }
  .tournament-switcher .tournament-btn {
    flex: 1 1 0;          /* 3 顆按鈕平均分配寬度 */
    padding: 6px 4px !important;
    background: transparent !important;
    border-radius: 8px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    display: flex; align-items: center; justify-content: center;
    min-width: 28px;     /* 至少容納 icon 22 + tiny padding，不會 overflow */
  }
  .tournament-switcher .tournament-btn .t-label { display: none !important; }
  /* 不再 grayscale / 壓 brightness、保留品牌色（EPL 紫色才看得到）
     非 active 只用 opacity 0.78 區分、加白色背景襯托提升對比 */
  .tournament-switcher .tournament-btn .t-logo {
    height: 22px !important; width: 22px !important;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
    opacity: 0.78;
    transition: opacity 0.2s ease, transform 0.18s ease, filter 0.2s ease;
  }
  /* 非 active 加極淡背景襯托、讓 EPL 紫色之類深色 logo 不被 header 吃掉 */
  .tournament-switcher .tournament-btn:not(.active) {
    background: rgba(255,255,255,0.05) !important;
  }
  .tournament-switcher .tournament-btn:active .t-logo { transform: scale(0.92); }
  .tournament-switcher .tournament-btn.active {
    background: linear-gradient(135deg, rgba(255,193,7,0.20), rgba(255,152,0,0.12)) !important;
    box-shadow: 0 0 0 1px rgba(255,193,7,0.45) inset;
  }
  .tournament-switcher .tournament-btn.active .t-logo {
    opacity: 1;
    transform: scale(1.05);
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
  }

  /* 手機版漢堡選單裡的語系按鈕 */
  .mobile-nav-lang { margin-top: 6px; padding: 12px 16px; }

  /* ── 漢堡選單展開：浮動定位 + 實心背景，修透明 bug ── */
  .mobile-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(7,9,26,0.97);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
    padding: 14px 14px 18px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    z-index: 998;
    animation: drawer-slide-down 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top center;
  }
  @keyframes drawer-slide-down {
    from { transform: translateY(-100%); opacity: 0.4; }
    to   { transform: translateY(0);     opacity: 1; }
  }

  /* 選單項目「從上掉落」stagger 動畫 */
  .mobile-nav.open .nav-btn,
  .mobile-nav.open .mobile-nav-status {
    opacity: 0;
    animation: nav-item-drop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }
  .mobile-nav.open .nav-btn:nth-child(1)  { animation-delay: 60ms; }
  .mobile-nav.open .nav-btn:nth-child(2)  { animation-delay: 110ms; }
  .mobile-nav.open .nav-btn:nth-child(3)  { animation-delay: 160ms; }
  .mobile-nav.open .nav-btn:nth-child(4)  { animation-delay: 210ms; }
  .mobile-nav.open .nav-btn:nth-child(5)  { animation-delay: 250ms; }
  .mobile-nav.open .nav-btn:nth-child(6)  { animation-delay: 290ms; }
  .mobile-nav.open .nav-btn:nth-child(7)  { animation-delay: 320ms; }
  .mobile-nav.open .nav-btn:nth-child(8)  { animation-delay: 350ms; }
  .mobile-nav.open .nav-btn:nth-child(9)  { animation-delay: 380ms; }
  .mobile-nav.open .nav-btn:nth-child(10) { animation-delay: 410ms; }
  .mobile-nav.open .nav-btn:nth-child(11) { animation-delay: 440ms; }
  .mobile-nav.open .mobile-nav-status     { animation-delay: 480ms; }
  @keyframes nav-item-drop {
    from { transform: translateY(-22px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
  }

  /* ── 梯形拉桿（凸面感版本）─────────────────────────────
     頂亮 + 底暗 + drop-shadow 落地、跟 header 接縫處 -1px overlap 蓋掉邊框 */
  .pull-tab {
    position: absolute;
    /* 往上 18px、跟 header 重疊更多、減少下方凸出量 → 不再蓋住 sticky filter 文字 */
    top: calc(var(--header-h) - 18px);
    left: 50%;
    transform: translate(-50%, 0);
    width: 138px;
    height: 34px;
    background: transparent;       /* SVG 才是真正背景 */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    color: #FFD54F;
    text-shadow: 0 0 6px rgba(255,193,7,0.45), 0 1px 0 rgba(0,0,0,0.5);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    display: flex;                 /* @media 內：覆寫 base 的 display:none */
    z-index: 999;                  /* 高於 drawer (998)、展開時 tab 不會被蓋 */
    overflow: visible;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    /* 光暈現在內建在 SVG 的多層 stroke blur、不需要 CSS drop-shadow
       只留一個極淡的深色細陰影增加「漂浮」立體感、Y=B 保證不上漏 */
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35));
    /* 開合時平滑移動 top */
    transition:
      top 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
      transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  /* SVG 背景：filling button area */
  .pull-tab .pull-tab-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
  }
  /* 內容（chevron / label / dot / shimmer）疊在 SVG 上面 */
  .pull-tab > *:not(.pull-tab-bg) { position: relative; z-index: 1; }
  .pull-tab .pull-tab-chevron {
    font-size: 11px;
    line-height: 1;
    color: #FFC107;
    text-shadow: 0 0 8px rgba(255,193,7,0.7);
    animation: pull-tab-bounce 2s ease-in-out infinite;
    transition: transform 0.3s ease;
  }
  .pull-tab .pull-tab-label { line-height: 1; }
  @keyframes pull-tab-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(3px); }
  }
  /* Shimmer 金色反光（用 clip-path 跟隨梯形形狀、不會溢出邊緣） */
  .pull-tab-shimmer {
    position: absolute;
    inset: 0;
    /* 跟 SVG path 相同的梯形形狀（140x34 座標、跟新的 path 同步） */
    clip-path: path('M 0,0 L 140,0 L 127,30 Q 125,34 121,34 L 19,34 Q 15,34 13,30 Z');
    background: linear-gradient(
      100deg,
      transparent 0%,
      transparent 30%,
      rgba(255,213,79,0.35) 50%,
      transparent 70%,
      transparent 100%
    );
    background-size: 280% 100%;
    background-repeat: no-repeat;
    background-position: -180% 0;
    animation: pull-tab-shimmer 5s ease-in-out infinite;
    pointer-events: none;
  }
  @keyframes pull-tab-shimmer {
    0%   { background-position: -180% 0; }
    40%  { background-position: 280% 0; }
    100% { background-position: 280% 0; }
  }
  /* 移除舊的 ::before/::after 邊框、SVG 的 stroke 已經畫金邊了 */
  .pull-tab::before, .pull-tab::after {
    display: none;
  }
  /* 通知紅點 */
  .pull-tab-dot {
    position: absolute;
    top: 3px;
    right: 14px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 8px rgba(255,71,87,0.6);
  }
  /* 拉桿按下回饋 */
  .pull-tab:active {
    transform: translate(-50%, 2px);
  }
  /* 拉桿打開狀態：⌄ 旋轉成 ⌃ */
  .pull-tab.open .pull-tab-chevron {
    transform: rotate(180deg);
    animation: none;
  }
  /* 拖動中（JS 加 .dragging 後）跟手位移 */
  .pull-tab.dragging { transition: none; }

  /* ── 背景遮罩：點外面關選單 ── */
  .mobile-nav-backdrop {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 996;
    animation: backdrop-fade-in 0.3s ease forwards;
  }
  .mobile-nav-backdrop.show { display: block; }
  @keyframes backdrop-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .hero-stats { flex-wrap: wrap; }
  .hero-stat { padding: 16px 20px; flex: 1 1 40%; }
  .countdown-block { min-width: 62px; padding: 10px 14px; }
  .countdown-num { font-size: 30px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .page-hero { padding: 30px 16px 20px; }
  .page-hero h1 { font-size: 26px; }
  .page-hero p { font-size: 13px; }
  .home-section { padding: 28px 16px; }
  .section-header { margin-bottom: 20px; }
  .footer-info { text-align: left; }
}
