/* ===== BeyTop 全站共用樣式（單一來源；index.html / rankings.html 共用）=====
   值以主頁為準。各頁專屬樣式留在各自的內嵌 <style>，並放在本檔 <link> 之後以覆寫。 */

:root{
  --bg:#0f1115; --panel:#171a21; --panel2:#1d212b; --line:#262b36;
  --txt:#e6e8ec; --dim:#8b93a3; --accent:#4d8dff; --good:#39d98a;
  --warn:#f5c451; --bad:#ff5d6c; --yt:#ff3b30; --mid:#c8cdd6;
}
*{box-sizing:border-box; margin:0; padding:0}
body{background:var(--bg); color:var(--txt);
  font-family:"Segoe UI","Microsoft JhengHei",system-ui,sans-serif; font-size:15px; line-height:1.5}
a{color:inherit; text-decoration:none}
.wrap{max-width:1080px; margin:0 auto; padding:0 20px}

/* ===== 導覽列 ===== */
nav{position:sticky; top:0; z-index:10; background:rgba(15,17,21,.92);
  backdrop-filter:blur(8px); border-bottom:1px solid var(--line)}
.nav-in{display:flex; align-items:center; gap:22px; height:74px}
.logo{font-size:30px; font-weight:800; letter-spacing:.5px}
.logo span{color:var(--accent)}
.logo small{display:block; font-size:15px; color:var(--txt); font-weight:800; letter-spacing:2px}
.nav-links{display:flex; gap:20px; font-size:19px; font-weight:700; color:var(--dim)}
.nav-links a:hover{color:var(--txt)}
.nav-right{margin-left:auto; display:flex; align-items:center; gap:10px}
.nav-right .btn{font-size:19px}

/* ===== 按鈕 ===== */
.btn{border:1px solid var(--line); border-radius:8px; padding:8px 14px; font-size:14px;
  cursor:pointer; background:transparent; color:var(--txt); font-family:inherit}
.btn:hover{border-color:var(--accent)}
.btn.primary{background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600}
.btn.yt{background:var(--yt); border-color:var(--yt); color:#fff; font-weight:600}
.btn.hot{background:#ff7a1a; border-color:#ff7a1a; color:#fff; font-weight:600}
.btn.login{font-weight:600}

/* ===== 膠囊切換 ===== */
.pills{display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap}
.pill{border:1px solid var(--line); background:var(--panel); color:var(--dim);
  border-radius:999px; padding:7px 16px; font-size:14px; cursor:pointer; font-family:inherit}
.pill:hover{color:var(--txt)}
.pill.on{background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600}

/* ===== 排行榜表格（主頁 Top10 與排行榜共用同一套）===== */
.tierwrap{overflow-x:auto; border-radius:10px}
table{width:100%; border-collapse:collapse; background:var(--panel);
      border:1px solid var(--line); border-radius:10px; overflow:hidden}
thead th{background:#1b1f28; color:var(--dim); font-weight:600; text-align:right;
         padding:9px 7px; white-space:nowrap; cursor:pointer; user-select:none;
         border-bottom:1px solid var(--line); font-size:12px}
thead th.l{text-align:left}
thead th:hover{color:var(--txt)}
thead th.rank,thead th.src,thead th.name{cursor:default}
thead th.rank:hover,thead th.src:hover,thead th.name:hover{color:var(--dim)}
th .ar{opacity:.5; font-size:10px; margin-left:3px}
th .ar.on{opacity:1; color:var(--accent)}
tbody td{padding:8px 7px; text-align:right; border-bottom:1px solid var(--line); white-space:nowrap}
tbody tr:last-child td{border-bottom:none}
tbody tr:hover{background:#1d2230}
.rank{color:var(--dim); width:30px; text-align:center}
.combo{text-align:left}
.cwrap{display:flex; align-items:center; gap:6px}
.pics{display:flex; align-items:center; gap:4px; flex:0 0 auto}
.pic{width:80px; height:80px; border-radius:8px; background:#0c0e12; border:1px solid var(--line);
     object-fit:contain; flex:0 0 auto}
.pic.multi{width:64px; height:64px}
.ph{width:80px; height:80px; border-radius:8px; background:#0c0e12; border:1px solid var(--line);
    display:flex; align-items:center; justify-content:center; color:var(--dim);
    font-weight:700; font-size:18px; flex:0 0 auto}
.ph.code{font-size:20px; letter-spacing:.3px; color:var(--txt)}
.nm{display:flex; flex-direction:column; line-height:1.25}
.blade{font-weight:600}
.sub{color:var(--dim); font-size:12px}
.tag{display:inline-block; font-size:10px; color:var(--dim); border:1px solid var(--line);
     border-radius:4px; padding:0 5px; margin-left:6px; vertical-align:1px}
td.wr{font-weight:700}
.bar{height:4px; border-radius:2px; background:#2a2f3a; margin-top:4px; overflow:hidden}
.bar > i{display:block; height:100%}
td.num{font-variant-numeric:tabular-nums}
.dim{color:var(--dim)}
.placeholder{padding:34px; text-align:center; color:var(--dim)}

/* ===== 點列／影片來源（紅＋▶）／彈窗 ===== */
tr.main{cursor:pointer}
.srctoggle{cursor:pointer; color:var(--yt); font-weight:700; user-select:none}
.srctoggle::before{content:"▶ "; font-size:.85em}
.srctoggle:hover{text-decoration:underline}
.modal{position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; z-index:50}
.modal.hidden{display:none}
.mbox{background:var(--panel); border:1px solid var(--line); border-radius:12px; width:min(560px,92vw); max-height:80vh; display:flex; flex-direction:column}
.mhead{display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border-bottom:1px solid var(--line); font-weight:700}
.mhead button{background:none; border:none; color:var(--dim); font-size:18px; cursor:pointer}
.mhead button:hover{color:#fff}
.mbody{padding:8px 16px 16px; overflow:auto}
.mbody a{display:block; color:var(--yt); text-decoration:none; padding:8px 0; border-bottom:1px solid var(--line)}
.mbody a::before{content:"▶ "; font-size:.85em}
.mbody a:hover{text-decoration:underline}

/* ===== 頁尾 ===== */
footer{border-top:1px solid var(--line); margin-top:30px; padding:30px 0; color:var(--dim); font-size:13px}
.foot-in{display:flex; justify-content:space-between; flex-wrap:wrap; gap:16px}
.foot-in a{color:var(--dim)} .foot-in a:hover{color:var(--txt)}

@media(max-width:720px){
  .nav-links{display:none}
}
