/* 勝利女神 V3.0 共用新風格：淺色＝液態玻璃×夢幻漸層（預設），深色＝夜場霓虹×深色液態玻璃。
   由 theme.js 在 <html> 設定 data-theme="light|dark"；選擇存在 localStorage goddess-theme。 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&display=swap');

html:root[data-theme="light"]{
  --bg:#f4efff;--surface:rgba(255,255,255,.62);--surface-2:rgba(122,77,255,.1);
  --ink:#1f1a3d;--muted:#5d5680;--line:rgba(110,90,180,.2);
  --accent:#6a45f5;--accent-ink:#ffffff;--gold:#9a6a00;--good:#1b8a5a;--up:#1b8a5a;--down:#c0392b;
  --font-num:"Outfit","Bebas Neue","Arial Narrow",sans-serif;
  --gt-page:linear-gradient(170deg,#efe9ff 0%,#f9e6f3 32%,#e5f3fb 62%,#efeaff 100%);
  --gt-bd:rgba(255,255,255,.9);
  --gt-sh:0 18px 40px -24px rgba(92,60,190,.45),inset 0 1px 0 rgba(255,255,255,.9);
  --gt-orb:1;
  color-scheme:light;
}
html:root[data-theme="dark"]{
  --bg:#0d0b20;--surface:rgba(255,255,255,.07);--surface-2:rgba(255,255,255,.1);
  --ink:#f3f0ff;--muted:#b7b0d8;--line:rgba(255,255,255,.13);
  --accent:#ff7ab8;--accent-ink:#1a0c14;--gold:#ffd98a;--good:#46c98e;--up:#46c98e;--down:#ff7a6b;
  --font-num:"Outfit","Bebas Neue","Arial Narrow",sans-serif;
  --gt-page:radial-gradient(560px 560px at 0% 4%,rgba(255,79,163,.36),rgba(255,79,163,0) 70%),radial-gradient(520px 520px at 100% 18%,rgba(71,224,255,.24),rgba(71,224,255,0) 70%),radial-gradient(680px 680px at 40% 70%,rgba(140,100,255,.3),rgba(140,100,255,0) 70%),#0d0b20;
  --gt-bd:rgba(255,255,255,.15);
  --gt-sh:inset 0 1px 0 rgba(255,255,255,.18),0 20px 40px -24px rgba(0,0,0,.85);
  --gt-orb:0;
  color-scheme:dark;
}

/* 頁面底色：漸層畫在 html，body 透明，讓光球在內容下方 */
html[data-theme]{background:var(--gt-page);background-color:var(--bg);background-attachment:fixed;min-height:100%}
html[data-theme] body{background:transparent!important;font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif}
#gt-orbs{position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:var(--gt-orb);transition:opacity .4s;overflow:hidden}
#gt-orbs i{position:absolute;border-radius:50%}
#gt-orbs i:nth-child(1){width:300px;height:300px;left:-100px;top:60px;background:radial-gradient(circle at 35% 30%,#fff 0%,#f7b8e2 35%,rgba(196,160,255,0) 70%)}
#gt-orbs i:nth-child(2){width:260px;height:260px;right:-80px;top:40%;background:radial-gradient(circle at 35% 30%,#fff 0%,#9fe3f2 38%,rgba(159,227,242,0) 70%)}
#gt-orbs i:nth-child(3){width:360px;height:360px;left:30%;bottom:-140px;background:radial-gradient(circle at 40% 35%,#fff 0%,#cdb8ff 36%,rgba(205,184,255,0) 70%)}

/* 玻璃表面：沿用各頁原本的版面，只換材質 */
html[data-theme] :is(.card,.panel,.summary,.ending,.myrank,.lbi,.lbr,.rk-empty,.empty,.coachbtn,.teampick button,.shot,.cols,.ladder li,.astat div,.picked button,
  .mc,.kpi,.kp div,.detail,.upd,.top10 li,.sheet .pn,.news li,.moreNews summary,.tabs,nav.tabs,.chip,.btn:not(.primary),.seg button,.cmp button,
  .tools input,.tools select,.row input[type=search],.row select,.actionbar,.dock,.viewer .vc,.legal .social a){
  backdrop-filter:blur(18px) saturate(1.4);-webkit-backdrop-filter:blur(18px) saturate(1.4);
  border-color:var(--gt-bd);
}
html[data-theme] :is(.card,.panel,.summary,.ending,.myrank,.lbi,.lbr,.coachbtn,.teampick button,.mc,.kpi,.detail,.top10 li,.sheet .pn,.news li,.cols){box-shadow:var(--gt-sh)}
html[data-theme] :is(.card,.mc,.lbi,.lbr,.news li,.top10 li,.coachbtn,.teampick button){border-radius:18px}
html[data-theme] :is(.panel,.summary,.ending,.myrank,.detail,.kpi,.cols,.sheet .pn){border-radius:24px}
html[data-theme] .card[aria-pressed="true"],html[data-theme] .coachbtn[aria-pressed="true"]{border-color:var(--accent)}
html[data-theme] .actionbar{border-top-color:var(--gt-bd);box-shadow:0 -10px 30px -18px rgba(60,30,140,.45)}
html[data-theme="dark"] .actionbar{box-shadow:0 -10px 30px -18px rgba(0,0,0,.9)}

/* 主要按鈕：紫粉漸層（深色為霓虹） */
html[data-theme] .btn.primary{border:0;color:#fff;background:linear-gradient(135deg,#6a45f5,#8b5cf6 55%,#c64fd0);box-shadow:0 12px 24px -14px rgba(106,69,245,.9),inset 0 1px 0 rgba(255,255,255,.4)}
html[data-theme="dark"] .btn.primary{background:linear-gradient(135deg,#e2378f,#7c4dff);box-shadow:0 14px 30px -12px rgba(226,55,143,.9),inset 0 0 0 1px rgba(255,255,255,.2)}
html[data-theme] .btn.primary:disabled{opacity:.45}

/* 頂部列：玻璃膠囊 */
html[data-theme] .appbar{position:sticky;top:calc(8px + env(safe-area-inset-top,0px));z-index:30;gap:8px;margin-bottom:12px;padding:6px 6px 6px 14px;border-radius:999px;
  background:var(--surface);border:1px solid var(--gt-bd);box-shadow:var(--gt-sh);backdrop-filter:blur(22px) saturate(1.4);-webkit-backdrop-filter:blur(22px) saturate(1.4)}
html[data-theme] .appbar>.nav,html[data-theme] .appbar>nav{margin-left:auto}
html[data-theme] .appbar .logo i{width:22px;height:22px;border-radius:7px;background:linear-gradient(140deg,#ff8fc7,#8a6bff 60%,#5fd4ea);box-shadow:inset 0 1px 0 rgba(255,255,255,.6)}
html[data-theme] .appbar nav a,html[data-theme] .appbar .nav button,html[data-theme] .appbar .nav a{border-radius:999px;padding:8px 10px}
html[data-theme] .appbar nav a[aria-current="page"]{background:var(--surface-2)}

/* 分頁、籤 */
html[data-theme] .chip[aria-pressed="true"],html[data-theme] nav.tabs button[aria-selected="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
html[data-theme] .eyebrow{color:var(--accent)}
html[data-theme="dark"] h1 b,html[data-theme="dark"] .brand h1 b{color:#ff8cc6}

/* 深淺色開關 */
.gt-toggle{position:relative;flex:none;width:64px;height:36px;border-radius:999px;border:1px solid var(--line);background:var(--surface-2);cursor:pointer;padding:0}
.gt-toggle .knob{position:absolute;top:3px;left:3px;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#e0a000;box-shadow:0 4px 10px -4px rgba(0,0,0,.4);transition:left .25s,background .25s,color .25s}
html[data-theme="dark"] .gt-toggle .knob{left:31px;background:#1b1640;color:#ffd98a}
.gt-toggle .moon{display:none}
html[data-theme="dark"] .gt-toggle .moon{display:block}
html[data-theme="dark"] .gt-toggle .sun{display:none}
.gt-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.gt-toggle.float{position:fixed;top:calc(12px + env(safe-area-inset-top,0px));right:12px;z-index:50;width:72px;height:40px;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.gt-toggle.float .knob{width:32px;height:32px}
html[data-theme="dark"] .gt-toggle.float .knob{left:35px}
@media (prefers-reduced-motion:reduce){.gt-toggle .knob,#gt-orbs{transition:none}}

/* 保留各頁原本的球隊色邊與選取狀態 */
html[data-theme] .teampick button{border-left-color:var(--team)}
html[data-theme] :is(.summary,.ending,.myrank){border-top-color:var(--team)}
html[data-theme] :is(.teampick button[aria-pressed="true"],.shot[aria-checked="true"],.lbi.me,.row[aria-expanded="true"]){border-color:var(--accent)}
html[data-theme] .teampick button[aria-pressed="true"]{border-left-color:var(--team)}
html[data-theme] .mc:hover{border-color:var(--team)}
/* 窄螢幕頂部列不換行 */
html[data-theme] .appbar nav,html[data-theme] .appbar .nav{flex-wrap:nowrap}
html[data-theme] .appbar nav a,html[data-theme] .appbar .nav button,html[data-theme] .appbar .nav a{padding:7px 8px;white-space:nowrap}
@media (max-width:380px){html[data-theme] .appbar .gt-toggle{width:56px}html[data-theme="dark"] .appbar .gt-toggle .knob{left:23px}}

/* ===== 共用標題列（與首頁相同尺寸） ===== */
html:root[data-theme="light"]{--gt-bar-bg:rgba(255,255,255,.58);--gt-ink2:#3b3460;--gt-navh:rgba(255,255,255,.7);--gt-solid:#1f1a3d;--gt-solid-ink:#fff;--gt-cur:rgba(255,255,255,.7)}
html:root[data-theme="dark"]{--gt-bar-bg:linear-gradient(160deg,rgba(255,255,255,.12),rgba(255,255,255,.04));--gt-ink2:#d8d3f2;--gt-navh:rgba(255,255,255,.08);--gt-solid:#f3f0ff;--gt-solid-ink:#0d0b20;--gt-cur:rgba(255,255,255,.08)}
.gt-barwrap{position:sticky;top:-6px;z-index:40;max-width:1240px;margin:0 auto;padding:calc(14px + env(safe-area-inset-top,0px)) 18px 12px;box-sizing:border-box;pointer-events:none;font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif;line-height:1.5}
.gt-top{pointer-events:auto;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 8px 8px 16px;border-radius:999px;
  background:var(--gt-bar-bg);border:1px solid var(--gt-bd);box-shadow:var(--gt-sh);backdrop-filter:blur(22px) saturate(1.4);-webkit-backdrop-filter:blur(22px) saturate(1.4);box-sizing:border-box}
.gt-logo{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--ink)}
.gt-gem{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;flex:none;background:linear-gradient(140deg,#ff8fc7,#8a6bff 60%,#5fd4ea);box-shadow:inset 0 2px 0 rgba(255,255,255,.7),inset 0 -6px 12px rgba(40,10,90,.18),0 10px 20px -10px rgba(70,40,160,.55)}
.gt-logo b{font-weight:900;font-size:16px;letter-spacing:.04em;white-space:nowrap}
.gt-logo small{font-family:"Outfit","Noto Sans TC",sans-serif;font-size:12px;font-weight:600;color:var(--muted)}
.gt-tools{display:flex;align-items:center;gap:8px}
.gt-slot{display:flex}
.gt-nav{display:none;gap:2px}
.gt-nav a{color:var(--gt-ink2);text-decoration:none;font-weight:700;font-size:15px;padding:10px 14px;border-radius:999px;white-space:nowrap}
.gt-nav a:hover,.gt-nav a[aria-current]{background:var(--gt-navh);color:var(--ink)}
.gt-top .gt-toggle{width:76px;height:44px;background:var(--surface-2)}
.gt-top .gt-toggle .knob{top:4px;left:4px;width:34px;height:34px}
html[data-theme="dark"] .gt-top .gt-toggle .knob{left:36px}
.gt-menu{position:relative}
.gt-menu>summary{list-style:none;width:44px;height:44px;border-radius:999px;background:var(--gt-solid);color:var(--gt-solid-ink);display:grid;place-items:center;cursor:pointer}
.gt-menu>summary::-webkit-details-marker{display:none}
.gt-drop{position:absolute;right:0;top:52px;min-width:180px;border-radius:20px;padding:8px;display:grid;gap:2px;background:var(--gt-bar-bg);border:1px solid var(--gt-bd);box-shadow:var(--gt-sh);backdrop-filter:blur(22px) saturate(1.4);-webkit-backdrop-filter:blur(22px) saturate(1.4)}
html[data-theme="dark"] .gt-drop{background:rgba(27,22,64,.92)}
.gt-drop a{display:block;padding:12px 14px;border-radius:14px;text-decoration:none;color:var(--ink);font-weight:700}
.gt-drop a:hover,.gt-drop a[aria-current]{background:var(--surface-2)}
@media (min-width:960px){
  .gt-barwrap{top:-16px;padding:24px 24px 16px}
  .gt-top{padding:10px 10px 10px 20px}
  .gt-logo b{font-size:18px}
  .gt-nav{display:flex}
  .gt-menu{display:none}
}
/* 各頁原本的標題列：看板整個收起；遊戲只留「卡冊／排行榜／玩法」當工具列；統計後台保留自己的標題 */
html[data-theme] body.gt-board .appbar{display:none}
html[data-theme] body.gt-game .appbar{position:static;background:none;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;padding:0;margin:0 0 10px;justify-content:flex-end;border-radius:0}
html[data-theme] body.gt-game .appbar .logo{display:none}
html[data-theme] body.gt-game .appbar .nav{margin-left:0;gap:6px}
html[data-theme] body.gt-game .appbar .nav button{background:var(--surface);border:1px solid var(--gt-bd);font-size:13px;padding:7px 14px;color:var(--ink)}