/* ============================================================
   K宝桌球 档位天梯积分排行系统 · 移动端 UI
   风格：Steam 主题色 × Apple 玻璃拟态 × 动态流光背景
   自适应：全部尺寸用 clamp(vw) 等比例缩放，窄屏整体缩小不变形
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg-deep: #080b12;
  --bg: #0e1420;
  --bg2: #131c2c;
  /* Steam 主题色 */
  --steam-blue: #66c0f4;
  --steam-blue-2: #1a9fff;
  --steam-purple: #7d5ba6;
  --steam-teal: #4be0c6;
  --gold: #ffd479;
  --gold-deep: #d7b86a;
  --win: #5cd48a;
  --lose: #ff7b7b;
  --text: #edf2fa;
  --text2: #a7b8d0;
  --text3: #6e8199;
  --glass-brd: rgba(255,255,255,0.10);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(clamp(56px, 16vw, 64px) + env(safe-area-inset-bottom));
  overflow-x: hidden;
  background:
    radial-gradient(900px 600px at 88% -8%, rgba(125,91,166,0.28), transparent 60%),
    radial-gradient(1000px 640px at 8% -12%, rgba(26,159,255,0.30), transparent 55%),
    radial-gradient(800px 600px at 50% 118%, rgba(75,224,198,0.12), transparent 60%),
    linear-gradient(168deg, var(--bg) 0%, var(--bg2) 46%, var(--bg) 100%);
  background-color: var(--bg-deep);
  background-attachment: fixed;
  position: relative;
}

/* 动态流光光斑（背景氛围，Steam 感） */
body::before, body::after {
  content: ''; position: fixed; z-index: 0; pointer-events: none;
  border-radius: 50%; filter: blur(70px); opacity: .5; will-change: transform;
}
body::before {
  width: 340px; height: 340px; top: -80px; left: -60px;
  background: radial-gradient(circle, rgba(26,159,255,0.55), transparent 70%);
  animation: orbA 16s ease-in-out infinite;
}
body::after {
  width: 420px; height: 420px; bottom: -120px; right: -80px;
  background: radial-gradient(circle, rgba(125,91,166,0.5), transparent 70%);
  animation: orbB 20s ease-in-out infinite;
}
@keyframes orbA { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.15); } }
@keyframes orbB { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,-40px) scale(1.1); } }

#app { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; }

/* ---------- 顶栏（磨砂玻璃） ---------- */
#topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(12px, 3.6vw, 14px) clamp(14px, 4.6vw, 18px);
  background: linear-gradient(180deg, rgba(10,14,24,0.84), rgba(10,14,24,0.55));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--glass-brd);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
#topbar .brand {
  font-weight: 800; font-size: clamp(16px, 4.8vw, 19px); letter-spacing: .3px;
  white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(90deg, #fff, #9cc8ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
#topbar .brand b {
  background: linear-gradient(135deg, var(--steam-blue), var(--steam-purple));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
#topbar .right { display: flex; align-items: center; gap: clamp(7px, 2.3vw, 9px); flex: 0 1 auto; min-width: 0; }
#topbar .me-chip {
  display: flex; align-items: center; gap: clamp(6px, 1.8vw, 7px);
  padding: clamp(6px, 1.8vw, 7px) clamp(11px, 3.6vw, 14px); border-radius: 22px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  font-size: clamp(12px, 3.4vw, 13.5px); font-weight: 600; backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.09);
  white-space: nowrap; flex: 0 1 auto; min-width: 0;
  max-width: clamp(110px, 38vw, 200px);
  overflow: hidden; text-overflow: ellipsis;
}
#topbar .me-chip .dot { width: clamp(8px, 2.3vw, 9px); height: clamp(8px, 2.3vw, 9px); border-radius: 50%; background: var(--text3); flex: 0 0 auto; }
#topbar .me-chip.on .dot { background: var(--win); box-shadow: 0 0 10px var(--win); }
#topbar .admin-link {
  color: var(--gold); font-size: clamp(12px, 3.3vw, 13px); font-weight: 700; text-decoration: none;
  padding: clamp(5px, 1.6vw, 6px) clamp(11px, 3.3vw, 13px); border-radius: 22px;
  border: 1px solid rgba(255,212,121,0.4);
  background: rgba(255,212,121,0.10);
  white-space: nowrap; flex: 0 0 auto;
}

/* ---------- 视图 ---------- */
#view { position: relative; z-index: 2; padding: clamp(14px, 4vw, 16px) clamp(13px, 3.8vw, 14px); }
.hidden { display: none !important; }
.title {
  font-size: clamp(19px, 5.4vw, 22px); font-weight: 800; letter-spacing: .4px; margin-bottom: 6px;
  white-space: nowrap;
  background: linear-gradient(90deg, #fff, var(--steam-blue));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sub { color: var(--text2); font-size: clamp(11.5px, 3.2vw, 12.5px); margin-bottom: clamp(13px, 4vw, 16px); letter-spacing: .2px; }

/* ---------- 玻璃卡片 ---------- */
.card {
  position: relative;
  background:
    linear-gradient(150deg, rgba(255,255,255,0.09), rgba(255,255,255,0.015) 55%, rgba(255,255,255,0.05)) padding-box,
    linear-gradient(165deg, rgba(102,192,244,0.45), rgba(125,91,166,0.22), rgba(255,255,255,0.06)) border-box;
  border: 1px solid transparent;
  border-radius: clamp(15px, 4.6vw, 18px);
  padding: clamp(13px, 3.8vw, 15px);
  margin-bottom: clamp(12px, 3.6vw, 14px);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 34px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.09);
  overflow: hidden;
  animation: rise .4s ease both;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card h3 { font-size: clamp(14px, 3.9vw, 15px); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; font-weight: 800; white-space: nowrap; }

/* ---------- 榜单 ---------- */
.rank-item {
  display: flex; align-items: center; gap: clamp(10px, 3vw, 12px); padding: clamp(10px, 3vw, 12px) 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  animation: rise .4s ease both;
}
.rank-item:last-child { border-bottom: none; }
.rank-no {
  width: clamp(27px, 7.7vw, 30px); height: clamp(27px, 7.7vw, 30px); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; text-align: center;
  font-weight: 800; font-size: clamp(12px, 3.3vw, 13px); color: var(--text3);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
}
.rank-no.top { color: #fff; border: none; box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.rank-item:nth-child(1) .rank-no.top { background: linear-gradient(135deg,#ffd479,#f5b23e); }
.rank-item:nth-child(2) .rank-no.top { background: linear-gradient(135deg,#d5e0ea,#a9b7c6); }
.rank-item:nth-child(3) .rank-no.top { background: linear-gradient(135deg,#e3a06a,#c97b3d); }
.rank-info { flex: 1; min-width: 0; }
.rank-name {
  font-weight: 700; font-size: clamp(13px, 3.7vw, 14.5px);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden;
}
.rank-name .me { font-size: 10px; color: var(--steam-blue); border: 1px solid var(--steam-blue); border-radius: 4px; padding: 0 4px; background: rgba(102,192,244,0.1); flex: 0 0 auto; }
.badge { font-size: clamp(9.5px, 2.6vw, 10px); padding: 2px 7px; border-radius: 6px; font-weight: 700;
  background: rgba(102,192,244,0.16); color: var(--steam-blue);
  border: 1px solid rgba(102,192,244,0.25); flex: 0 0 auto; white-space: nowrap; }
.badge.admin { background: rgba(255,212,121,0.14); color: var(--gold); border-color: rgba(255,212,121,0.3); }
.badge.member { background: rgba(92,212,138,0.14); color: var(--win); border-color: rgba(92,212,138,0.3); }
.rank-meta { color: var(--text3); font-size: clamp(10.5px, 3vw, 11.5px); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-tier {
  font-size: clamp(11px, 3.1vw, 12px); color: var(--text2); min-width: clamp(42px, 12vw, 46px); text-align: center;
  padding: 4px 8px; border-radius: 12px; flex: 0 0 auto;
  background: linear-gradient(135deg, rgba(102,192,244,0.18), rgba(125,91,166,0.16));
  border: 1px solid rgba(102,192,244,0.22);
  font-weight: 700; white-space: nowrap;
}
.rank-pts {
  font-weight: 800; font-size: clamp(16px, 4.6vw, 18px); min-width: clamp(48px, 13.8vw, 54px); text-align: right;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(255,212,121,0.25);
  flex: 0 0 auto;
}
.tab-switch { display: flex; gap: 8px; margin-bottom: clamp(12px, 3.6vw, 14px);
  padding: 4px; border-radius: 14px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08); backdrop-filter: blur(10px); }
.tab-switch button {
  flex: 1; padding: clamp(8px, 2.3vw, 9px); border: none; border-radius: 11px;
  background: transparent; color: var(--text2); font-size: clamp(12px, 3.4vw, 13px); font-weight: 700; cursor: pointer;
  transition: all .25s; white-space: nowrap;
}
.tab-switch button.active {
  background: linear-gradient(135deg, var(--steam-blue), var(--steam-blue-2));
  color: #04121f; box-shadow: 0 4px 16px rgba(26,159,255,0.4);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: clamp(12px, 3.3vw, 13px) clamp(15px, 4.1vw, 16px); border: none; border-radius: clamp(13px, 3.6vw, 14px);
  background: linear-gradient(135deg, var(--steam-blue), var(--steam-blue-2) 65%, #2f7fd0);
  color: #04121f; font-size: clamp(14px, 3.85vw, 15px); font-weight: 800; cursor: pointer;
  width: 100%; margin-top: 8px; letter-spacing: .3px;
  min-height: clamp(42px, 11.8vw, 46px);
  box-shadow: 0 6px 20px rgba(26,159,255,0.35);
  transition: transform .12s, box-shadow .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.ghost {
  background: rgba(255,255,255,0.07);
  color: var(--text); border: 1px solid rgba(255,255,255,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn.danger {
  background: rgba(255,123,123,0.13); color: var(--lose);
  border: 1px solid rgba(255,123,123,0.3); box-shadow: none;
}
.btn.sm { width: auto; padding: clamp(7px, 2vw, 8px) clamp(13px, 3.8vw, 15px); font-size: clamp(12px, 3.3vw, 13px); margin-top: 0; border-radius: clamp(11px, 3.1vw, 12px); min-height: clamp(34px, 9.5vw, 37px); }

/* ---------- 表单 ---------- */
.field { margin-bottom: clamp(12px, 3.3vw, 13px); }
.field label { display: block; font-size: clamp(11.5px, 3.2vw, 12px); color: var(--text2); margin-bottom: 6px; font-weight: 600; }
.field input, .field select {
  width: 100%; padding: clamp(12px, 3.3vw, 13px) clamp(13px, 3.6vw, 14px); border-radius: clamp(12px, 3.3vw, 13px);
  background: rgba(6,10,18,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text); font-size: clamp(14px, 3.85vw, 15px); outline: none;
  backdrop-filter: blur(8px);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
  border-color: var(--steam-blue);
  box-shadow: 0 0 0 3px rgba(102,192,244,0.18);
}
.link { color: var(--steam-blue); font-size: clamp(12px, 3.3vw, 13px); text-align: center; display: block; margin-top: 13px; text-decoration: none; }

/* ---------- 行 / 统计格 ---------- */
.row { display: flex; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 2.9vw, 11px); }
.stat {
  position: relative;
  background: linear-gradient(150deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02)) padding-box,
              linear-gradient(160deg, rgba(102,192,244,0.35), rgba(125,91,166,0.16)) border-box;
  border: 1px solid transparent; border-radius: clamp(13px, 3.6vw, 14px); padding: clamp(12px, 3.3vw, 13px); text-align: center;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  animation: rise .4s ease both;
}
.stat .v {
  font-size: clamp(19px, 5.6vw, 22px); font-weight: 800;
  background: linear-gradient(180deg, var(--steam-blue), #7fd0ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 16px rgba(102,192,244,0.3);
}
.stat .k { font-size: clamp(11px, 3vw, 11.5px); color: var(--text2); margin-top: 3px; }

/* ---------- 在线 / 开关 ---------- */
.online-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: clamp(10px, 2.9vw, 11px); color: var(--win);
  background: rgba(92,212,138,0.14); padding: 2px 9px; border-radius: 12px;
  border: 1px solid rgba(92,212,138,0.25);
}
.switch { position: relative; width: clamp(46px, 12.3vw, 48px); height: clamp(25px, 6.7vw, 26px); border-radius: 13px;
  background: linear-gradient(135deg,#3a4a63,#2c3a50); cursor: pointer; transition: background .2s; border: none; }
.switch.on { background: linear-gradient(135deg, var(--win), #2fbf6f); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: clamp(19px, 5.1vw, 20px); height: clamp(19px, 5.1vw, 20px);
  border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch.on::after { left: calc(100% - clamp(22px, 5.9vw, 23px)); }

/* ---------- 历史战绩 ---------- */
.match-line {
  display: flex; align-items: center; gap: 8px; padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06); font-size: clamp(12px, 3.4vw, 13px);
  white-space: nowrap; overflow: hidden;
}
.match-line:last-child { border-bottom: none; }
.match-line .res { font-weight: 800; min-width: 34px; padding: 2px 8px; border-radius: 8px; text-align: center; flex: 0 0 auto; }
.match-line .w { color: #04260f; background: linear-gradient(135deg, var(--win), #2fbf6f); }
.match-line .l { color: #2b0808; background: linear-gradient(135deg, var(--lose), #e04f4f); }
.empty { text-align: center; color: var(--text3); font-size: clamp(12px, 3.4vw, 13px); padding: clamp(22px, 6.6vw, 26px) 0; }

/* ---------- 底部导航（图标 + 等比例自适应） ---------- */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex;
  background: linear-gradient(180deg, rgba(10,14,24,0.88), rgba(8,11,18,0.94));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-bottom: env(safe-area-inset-bottom);
}
#tabbar a {
  flex: 1; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(3px, 1vw, 4px);
  padding: clamp(8px, 2.3vw, 9px) 0 clamp(9px, 2.6vw, 10px); min-height: clamp(54px, 15.4vw, 62px);
  color: var(--text3);
  font-size: clamp(10.5px, 2.95vw, 11.5px); text-decoration: none; font-weight: 700; letter-spacing: .4px;
  transition: color .2s; white-space: nowrap;
}
#tabbar .ti {
  width: clamp(20px, 5.9vw, 23px); height: clamp(20px, 5.9vw, 23px);
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto;
}
#tabbar a.active { color: var(--steam-blue); text-shadow: 0 0 12px rgba(102,192,244,0.6); }
#tabbar a.active .ti { filter: drop-shadow(0 0 7px rgba(102,192,244,0.8)); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px); bottom: calc(clamp(72px, 21vw, 84px) + env(safe-area-inset-bottom));
  background: linear-gradient(160deg, rgba(30,44,70,0.95), rgba(18,28,46,0.96));
  color: var(--text); padding: 11px 20px; border-radius: 12px;
  font-size: clamp(12px, 3.4vw, 13px); opacity: 0; transition: all .3s; pointer-events: none; z-index: 60;
  border: 1px solid rgba(102,192,244,0.3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 弹窗 ---------- */
#modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(4,6,12,0.72);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(8px);
}
#modal .modal-box {
  width: 100%; max-width: 420px;
  background: linear-gradient(160deg, #16243e, #101a2e) padding-box,
              linear-gradient(160deg, rgba(102,192,244,0.5), rgba(125,91,166,0.3)) border-box;
  border: 1px solid transparent; border-radius: clamp(16px, 4.6vw, 18px); padding: clamp(16px, 4.6vw, 18px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.09);
  animation: rise .3s ease both;
}
#modal .modal-box h3 { font-size: clamp(15px, 4.1vw, 16px); margin-bottom: 12px; }
#modal .close-x { float: right; font-size: 18px; color: var(--text3); cursor: pointer; background: none; border: none; }

/* ---------- 管理后台 ---------- */
.admin-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2.3vw, 9px); margin-bottom: clamp(14px, 4.1vw, 16px); }
.admin-nav a {
  text-align: center; padding: clamp(12px, 3.6vw, 14px) 4px; font-size: clamp(12.5px, 3.5vw, 13.5px); font-weight: 700;
  color: var(--text2); text-decoration: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10); border-radius: clamp(13px, 3.6vw, 14px);
  backdrop-filter: blur(10px);
  transition: all .2s; white-space: nowrap;
}
.admin-nav a.active {
  color: var(--gold);
  border-color: rgba(255,212,121,0.45);
  background: rgba(255,212,121,0.10);
  box-shadow: 0 4px 14px rgba(255,212,121,0.15);
}
.badge-tag { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 8px; margin: 2px; font-weight: 700; white-space: nowrap; }
.badge-tag.pending { background: rgba(255,212,121,0.14); color: var(--gold); border: 1px solid rgba(255,212,121,0.3); }
.badge-tag.approved { background: rgba(92,212,138,0.14); color: var(--win); border: 1px solid rgba(92,212,138,0.3); }
.badge-tag.rejected { background: rgba(255,123,123,0.14); color: var(--lose); border: 1px solid rgba(255,123,123,0.3); }

/* 头像（个人中心圆形昵称首字） */
#p_card div[style*="border-radius:50%"] {
  background: linear-gradient(135deg, var(--steam-blue), var(--steam-purple)) !important;
  box-shadow: 0 6px 20px rgba(102,192,244,0.35);
}

/* ---------- 首页：领奖台积分榜 ---------- */
.lb-title {
  display: flex; align-items: center; gap: clamp(8px, 2.2vw, 9px);
  font-size: clamp(19px, 5.2vw, 21px); font-weight: 800; letter-spacing: .3px;
  white-space: nowrap;
}
.lb-title b {
  background: linear-gradient(135deg, var(--steam-blue), var(--steam-purple));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lb-count {
  margin-left: auto;
  font-size: clamp(11px, 3vw, 11.5px); font-weight: 700; color: var(--steam-blue);
  background: rgba(102,192,244,0.12); border: 1px solid rgba(102,192,244,0.3);
  padding: clamp(3px, 1vw, 4px) clamp(8px, 2.3vw, 9px); border-radius: 20px;
  white-space: nowrap;
}
.lb-tabs {
  display: flex; gap: 8px; margin: clamp(10px, 3vw, 12px) 0 clamp(2px, .6vw, 3px);
  padding: 4px; border-radius: 14px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08); backdrop-filter: blur(10px);
}
.lb-tabs button {
  flex: 1; padding: clamp(8px, 2.3vw, 9px); border: none; border-radius: 11px;
  background: transparent; color: var(--text2); font-size: clamp(12px, 3.4vw, 13px); font-weight: 700; cursor: pointer;
  transition: all .25s; white-space: nowrap;
}
.lb-tabs button.active {
  background: linear-gradient(135deg, var(--steam-blue), var(--steam-blue-2));
  color: #04121f; box-shadow: 0 4px 16px rgba(26,159,255,0.4);
}

.podium-wrap { margin: clamp(12px, 3.5vw, 14px) 0 clamp(14px, 4vw, 16px); }
.podium {
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 2.4vw, 10px);
  padding: clamp(14px, 4vw, 16px) clamp(6px, 2vw, 8px) clamp(8px, 2.3vw, 9px);
  background: linear-gradient(165deg, rgba(24,38,66,0.6), rgba(14,22,40,0.7));
  border: 1px solid rgba(255,255,255,0.10); border-radius: clamp(16px, 4.6vw, 18px);
  backdrop-filter: blur(12px);
  position: relative; overflow: hidden;
}
.podium::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(40% 45% at 15% 0%, rgba(102,192,244,0.16), transparent 70%),
    radial-gradient(45% 50% at 88% 10%, rgba(255,212,121,0.12), transparent 70%);
  pointer-events: none;
}
.pod {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(8px, 2.4vw, 9px) clamp(4px, 1.4vw, 6px);
}
.pod.empty { opacity: 0; }
.pod-medal {
  display: inline-flex; align-items: center; gap: clamp(3px, .9vw, 4px);
  font-size: clamp(11px, 3vw, 12px); font-weight: 800; letter-spacing: .5px;
  padding: clamp(2px, .7vw, 3px) clamp(8px, 2.3vw, 10px); border-radius: 20px;
  white-space: nowrap;
}
.pod.gold .pod-medal { background: linear-gradient(135deg,#ffd479,#f5b23e); color: #3a2500; box-shadow: 0 4px 14px rgba(255,212,121,0.45); }
.pod.silver .pod-medal { background: linear-gradient(135deg,#d5e0ea,#a9b7c6); color: #1d2733; box-shadow: 0 4px 12px rgba(180,200,220,0.3); }
.pod.bronze .pod-medal { background: linear-gradient(135deg,#e3a06a,#c97b3d); color: #2b1606; box-shadow: 0 4px 12px rgba(201,123,61,0.3); }
.pod-avatar {
  width: clamp(40px, 11.5vw, 46px); height: clamp(40px, 11.5vw, 46px); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(18px, 5.2vw, 20px); font-weight: 800; margin-top: clamp(7px, 2vw, 8px); color: #04121f;
  background: linear-gradient(135deg, var(--steam-blue), var(--steam-purple));
  box-shadow: 0 8px 22px rgba(102,192,244,0.35);
}
.pod.gold .pod-avatar { box-shadow: 0 8px 24px rgba(255,212,121,0.5), 0 0 0 3px rgba(255,212,121,0.5); }
.pod.silver .pod-avatar { box-shadow: 0 6px 18px rgba(200,220,240,0.3), 0 0 0 3px rgba(200,220,240,0.4); }
.pod.bronze .pod-avatar { box-shadow: 0 6px 18px rgba(201,123,61,0.3), 0 0 0 3px rgba(201,123,61,0.4); }
.pod-name {
  margin-top: clamp(7px, 2vw, 8px); font-size: clamp(12px, 3.4vw, 13px); font-weight: 800;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pod-name .me { font-size: clamp(9px, 2.5vw, 10px); margin-left: 2px; background: var(--steam-blue); color: #04121f; padding: 1px 5px; border-radius: 8px; font-weight: 800; }
.pod-meta { margin-top: clamp(2px, .7vw, 3px); font-size: clamp(10.5px, 2.9vw, 11px); color: var(--text2); white-space: nowrap; }
.pod-bar {
  width: clamp(28px, 8.5vw, 34px); border-radius: 8px 8px 0 0; margin-top: clamp(9px, 2.6vw, 10px);
}
.pod.gold .pod-bar { height: clamp(34px, 9.5vw, 38px); background: linear-gradient(180deg,#ffd479,#f5b23e); box-shadow: 0 4px 16px rgba(255,212,121,0.4); }
.pod.silver .pod-bar { height: clamp(26px, 7.5vw, 30px); background: linear-gradient(180deg,#d5e0ea,#a9b7c6); box-shadow: 0 4px 12px rgba(180,200,220,0.25); }
.pod.bronze .pod-bar { height: clamp(20px, 5.7vw, 23px); background: linear-gradient(180deg,#e3a06a,#c97b3d); box-shadow: 0 4px 12px rgba(201,123,61,0.25); }

/* ---------- 设置页 ---------- */
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: clamp(11px, 3.2vw, 12px) 2px; font-size: clamp(13.5px, 3.75vw, 14.5px); font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.07); white-space: nowrap;
}
.set-row:last-child { border-bottom: none; }
.set-row .arrow { color: var(--text3); font-weight: 400; font-size: clamp(16px, 4.4vw, 17px); }
.set-sub { font-size: clamp(10.5px, 2.9vw, 11px); color: var(--text3); margin: clamp(2px, .7vw, 3px) 2px 0; white-space: nowrap; }
.tgl {
  width: clamp(46px, 12.8vw, 50px); height: clamp(26px, 7.3vw, 28px); border-radius: 20px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.15);
  position: relative; cursor: pointer; transition: all .25s; flex: 0 0 auto; padding: 0;
}
.tgl i {
  position: absolute; top: 50%; left: clamp(3px, .9vw, 4px); transform: translateY(-50%);
  width: clamp(20px, 5.6vw, 22px); height: clamp(20px, 5.6vw, 22px); border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3); transition: all .25s;
}
.tgl.on { background: linear-gradient(135deg, var(--steam-blue), var(--steam-blue-2)); border-color: transparent; }
.tgl.on i { left: calc(100% - clamp(23px, 6.5vw, 25px)); }
.rule-text { font-size: clamp(13px, 3.6vw, 14px); line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.rule-text p { margin: 0 0 8px; }

/* ---------- 验证码输入行 ---------- */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn.sm { flex: 0 0 auto; min-width: clamp(96px, 27vw, 108px); }
