/* ─── Hero ─────────────────────────────────────────────── */
.page-hero {
  padding-top: 110px;
  position: relative;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background: center/cover no-repeat;
  opacity: .1;
}
.page-hero-inner {
  position: relative; z-index: 1;
  padding: 3.5rem 0 2.5rem;
}
.page-hero-eyebrow {
  font-family: 'Oswald', sans-serif;
  font-size: .75rem; letter-spacing: .25em;
  color: var(--accent); text-transform: uppercase;
}
.page-hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700; color: #fff; margin: .4rem 0 .6rem;
}
.page-hero-title em { font-style: normal; color: var(--accent); }
.page-hero-sub { color: var(--text-muted); font-size: .95rem; margin-bottom: 0; }

/* ─── 數字統計橫幅 ──────────────────────────────────────── */
.zone-stats {
  background: rgba(0,0,0,.35);
  border-top: 1px solid rgba(255,255,255,.07);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(8px);
}
.zone-stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 767px) {
  .zone-stats .container { grid-template-columns: repeat(2, 1fr); }
}
.zone-stat-item {
  padding: 1.4rem 1rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.06);
}
.zone-stat-item:last-child { border-right: none; }
.zone-stat-num {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.zone-stat-label {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-top: .25rem;
}

/* ─── Main ──────────────────────────────────────────────── */
.athletes-main { padding: 3rem 0 5rem; }

.page-hero-breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--text-muted);
  margin-bottom: 2rem;
}
.page-hero-breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.page-hero-breadcrumb a:hover { color: var(--accent); }
.page-hero-breadcrumb .sep { opacity: .5; }

/* ─── Section Label ─────────────────────────────────────── */
.sec-label {
  font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent);
  font-weight: 700; margin-bottom: .4rem;
}
.sec-heading {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 700; color: #fff; margin: 0 0 .5rem;
}
.sec-heading em { font-style: normal; color: var(--accent); }
.sec-divider { width: 40px; height: 4px; background: var(--accent); margin: .6rem 0 1.4rem; }

/* ─── 生存榜 ────────────────────────────────────────────── */
.board-wrap {
  background: var(--secondary);
  border: 1px solid rgba(255,255,255,.07);
  overflow: hidden;
}
.board-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.board-search {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  padding: .38rem .85rem;
  flex: 1; max-width: 240px;
}
.board-search i { color: rgba(255,255,255,.3); font-size: .85rem; }
.board-search input {
  background: transparent; border: none; outline: none;
  color: #fff; font-size: .83rem; width: 100%;
}
.board-search input::placeholder { color: rgba(255,255,255,.25); }
.board-sort-group {
  display: flex; align-items: center; gap: .3rem; flex-wrap: wrap;
}
.board-sort-label {
  font-size: .68rem; color: rgba(255,255,255,.3);
  letter-spacing: .08em; text-transform: uppercase; margin-right: .2rem;
}
.board-sort-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.45);
  font-size: .72rem; padding: .28rem .85rem;
  cursor: pointer; transition: all .18s;
  letter-spacing: .04em;
}
.board-sort-btn.active,
.board-sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,194,224,.07);
}
.board-sort-btn.active i { opacity: 1; }
.board-sort-btn i { opacity: .4; font-size: .65rem; }

/* 表格 */
.board-table { width: 100%; border-collapse: collapse; }
.board-table th {
  padding: .65rem 1.2rem;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.3);
  border-bottom: 1px solid rgba(255,255,255,.07);
  text-align: left; white-space: nowrap;
}
.board-table td {
  padding: .85rem 1.2rem;
  font-size: .88rem;
  color: rgba(255,255,255,.72);
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.board-table tr:last-child td { border-bottom: none; }
.board-table tbody tr { transition: background .15s; }
.board-table tbody tr:hover td { background: rgba(255,255,255,.025); }

/* 前三名高亮列 */
.board-table tbody tr.rank-highlight-1 td { background: rgba(255,215,0,.04); }
.board-table tbody tr.rank-highlight-2 td { background: rgba(192,192,192,.03); }
.board-table tbody tr.rank-highlight-3 td { background: rgba(205,127,50,.03); }
.board-table tbody tr.rank-highlight-1 { border-left: 3px solid #ffd700; }
.board-table tbody tr.rank-highlight-2 { border-left: 3px solid #c0c0c0; }
.board-table tbody tr.rank-highlight-3 { border-left: 3px solid #cd7f32; }

/* 排名 */
.rank-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem; font-weight: 700;
  color: rgba(255,255,255,.18);
  min-width: 28px; display: inline-block; text-align: center;
}
.rank-num.top1 { color: #ffd700; }
.rank-num.top2 { color: #c0c0c0; }
.rank-num.top3 { color: #cd7f32; }

/* 選手資訊欄 */
.player-cell { display: flex; align-items: center; gap: .75rem; }
.player-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,194,224,.1);
  border: 1px solid rgba(0,194,224,.2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: .85rem; font-weight: 700; color: var(--accent);
  flex-shrink: 0;
}
.player-name { font-weight: 700; color: #fff; font-size: .9rem; }
.player-city { font-size: .72rem; color: var(--text-muted); margin-top: 1px; }

/* 完賽圓點 */
.round-dots { display: flex; gap: 3px; flex-wrap: nowrap; }
.round-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: .58rem; color: rgba(255,255,255,.18);
  font-weight: 700;
}
.round-dot.done {
  background: var(--accent); border-color: var(--accent);
  color: var(--primary); box-shadow: 0 0 6px rgba(0,194,224,.35);
}
.round-dot.dnf {
  background: rgba(255,80,80,.12);
  border-color: rgba(255,80,80,.3);
  color: rgba(255,100,100,.7);
}

/* 稱號 badge */
.title-badge {
  font-size: .63rem; padding: 3px 9px;
  background: rgba(0,194,224,.08);
  border: 1px solid rgba(0,194,224,.22);
  color: var(--accent); white-space: nowrap;
  letter-spacing: .04em;
}
.title-badge.gold {
  background: rgba(255,215,0,.1);
  border-color: rgba(255,215,0,.3);
  color: #ffd700;
}
.title-badge.silver {
  background: rgba(192,192,192,.1);
  border-color: rgba(192,192,192,.3);
  color: #c0c0c0;
}

.board-footer {
  padding: .9rem 1.4rem;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: .5rem;
}
.board-count { font-size: .78rem; color: rgba(255,255,255,.28); }

/* 分頁 */
.board-pagination { display: flex; gap: .3rem; }
.pg-btn {
  min-width: 30px; height: 30px;
  background: transparent; border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.45); font-size: .75rem;
  cursor: pointer; transition: all .18s;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 .5rem;
}
.pg-btn:hover { border-color: var(--accent); color: var(--accent); }
.pg-btn.active { background: var(--accent); border-color: var(--accent); color: var(--primary); font-weight: 700; }
.pg-btn:disabled { opacity: .25; cursor: default; pointer-events: none; }

/* 高度撐滿 */
#survival-board { flex: 1; display: flex; flex-direction: column; }
.board-wrap { flex: 1; display: flex; flex-direction: column; }
.board-wrap > div[style*="overflow"] { flex: 1; overflow-y: auto; }

/* ─── Sidebar ────────────────────────────────────────────── */
.athletes-sidebar {
  display: flex; flex-direction: column; gap: 1.2rem; height: 100%;
}
@media (min-width: 992px) {
  .athletes-sidebar .sidebar-card:first-child {
    flex: 1;
    display: flex; flex-direction: column;
  }
  .athletes-sidebar .sidebar-card:first-child .member-card-bottom {
    margin-top: auto;
  }
}

.sidebar-card {
  background: var(--secondary);
  border: 1px solid rgba(255,255,255,.07);
  padding: 1.4rem;
}
.sidebar-title {
  font-family: 'Oswald', sans-serif;
  font-size: .88rem; font-weight: 700;
  color: #fff; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 1rem; padding-bottom: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

/* 個人帳號卡 */
.member-card-inner {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.1rem;
}
.member-avatar-lg {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(0,194,224,.1);
  border: 2px solid rgba(0,194,224,.25);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--accent); flex-shrink: 0;
}
.member-info-text { font-size: .78rem; color: var(--text-muted); line-height: 1.7; }
.member-progress-label {
  display: flex; justify-content: space-between;
  font-size: .72rem; color: rgba(255,255,255,.35); margin-bottom: .35rem;
}
.member-progress-bar {
  height: 4px; background: rgba(255,255,255,.07); overflow: hidden;
}
.member-progress-fill {
  height: 100%; background: var(--accent); width: 0%;
  transition: width .8s ease;
}

/* 賽事清單 */
.sidebar-link-list { list-style: none; padding: 0; margin: 0; }
.sidebar-link-list li { border-bottom: 1px solid rgba(255,255,255,.05); }
.sidebar-link-list li:last-child { border-bottom: none; }
.sidebar-link-list a {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: .6rem 0; font-size: .84rem;
  color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s;
}
.sidebar-link-list a:hover { color: var(--accent); }
.sidebar-link-list a .chevron { font-size: .68rem; opacity: .45; }

/* 年度數據 */
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .84rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-row-label { color: var(--text-muted); }
.stat-row-val {
  font-family: 'Oswald', sans-serif;
  font-weight: 700; color: #fff; font-size: 1rem;
}
.stat-row-val.accent { color: var(--accent); }

/* ─── RWD ──────────────────────────────────────────────── */

/* 手機版 navbar 高度 80px */
@media (max-width: 991px) {
  .page-hero {
    padding-top: 80px;
  }
  .page-hero-inner {
    padding: 2rem 1.25rem 1.5rem;
  }
  .page-hero-title {
    font-size: 2rem;
  }
  .page-hero-sub {
    font-size: .88rem;
  }
  .athletes-main {
    padding: 1.25rem 0 3rem;
  }

  /* Board header：搜尋欄滿版，sort 按鈕橫向捲動 */
  .board-header {
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    padding: .85rem 1rem;
  }
  .board-search {
    max-width: 100%;
  }
  .board-sort-group {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 2px;
    gap: .4rem;
  }
  .board-sort-group::-webkit-scrollbar { display: none; }
  .board-sort-btn {
    flex-shrink: 0;
    font-size: .7rem;
    padding: .28rem .7rem;
  }

  /* 表格 cell 縮小 */
  .board-table th,
  .board-table td {
    padding: .65rem .75rem;
    font-size: .82rem;
  }
  .player-name { font-size: .85rem; }
  .player-city { font-size: .68rem; }
  .round-dot { width: 19px; height: 19px; font-size: .52rem; }

  /* sidebar：手機版隱藏次要區塊（年度數據、相關連結） */
  .athletes-sidebar .sidebar-card:nth-child(3),
  .athletes-sidebar .sidebar-card:nth-child(4) {
    display: none;
  }
}
