/* =========================================================
 * Avatar Arena — app.css（选人 + 战斗 UI 通用）
 * ========================================================= */
:root {
  --bg: #0b0e13;
  --panel: #121722;
  --panel2: #171e2b;
  --line: #232c3d;
  --text: #e6eaf2;
  --muted: #8b96a8;
  --accent: #4da3ff;
  --teamA: #3b82f6;
  --teamB: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  overflow: hidden;
}

#app { height: 100vh; display: flex; flex-direction: column; }

button.btn {
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
button.btn:hover { border-color: var(--accent); color: #fff; }
button.btn.primary { background: var(--accent); border-color: var(--accent); color: #06121f; font-weight: 600; }
button.btn.primary:disabled { opacity: .35; cursor: not-allowed; }
button.btn.sm { padding: 6px 13px; font-size: 13px; }
button.btn.active { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
button.mini {
  border: 1px solid var(--line); background: #1c2434; color: var(--text);
  border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
button.mini.tagA:hover { border-color: var(--teamA); color: var(--teamA); }
button.mini.tagB:hover { border-color: var(--teamB); color: var(--teamB); }

.spacer { flex: 1; }

/* ============ 选人页 ============ */
.select-wrap { height: 100vh; display: flex; flex-direction: column; padding: 26px 34px; gap: 16px; overflow: hidden; }
.select-header h1 { font-size: 26px; letter-spacing: 1px; }
.select-header .ver { font-size: 13px; color: var(--accent); font-weight: 500; margin-left: 8px; }
.select-header .sub { color: var(--muted); font-size: 13px; margin-top: 6px; }

.pick-bar { display: flex; align-items: center; gap: 18px; justify-content: center; }
.slot {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px dashed var(--line); border-radius: 12px;
  padding: 10px 18px; min-width: 260px; min-height: 64px;
}
.slot.filled { border-style: solid; }
.slot-tag { font-weight: 700; font-size: 15px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; }
.tagA, .slot-tag.tagA { background: rgba(59,130,246,.18); color: var(--teamA); }
.tagB, .slot-tag.tagB { background: rgba(239,68,68,.18); color: var(--teamB); }
.slot-img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.slot-name { color: var(--text); font-size: 15px; }
.vs { font-size: 20px; font-weight: 800; color: var(--muted); }

.char-grid {
  flex: 1; overflow-y: auto; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  grid-auto-rows: max-content; /* v83 行高随内容——技能不再画出卡片 */
  gap: 14px; padding: 4px; align-content: start;
}
.char-card { height: fit-content; }
.char-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; transition: border-color .15s, transform .1s;
}
.char-card:hover { border-color: #37507a; transform: translateY(-2px); }
.char-card.selA { border-color: var(--teamA); box-shadow: 0 0 0 1px var(--teamA) inset; }
.char-card.selB { border-color: var(--teamB); box-shadow: 0 0 0 1px var(--teamB) inset; }
.char-avatar {
  position: relative; width: 74px; height: 74px; flex: none;
  border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #243044, #18202e);
  display: grid; place-items: center;
}
.char-avatar img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.char-avatar .char-initial {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 28px; font-weight: 700; color: #cbd5e1;
}
.char-info { flex: 1; min-width: 0; }
.char-name { font-size: 16px; font-weight: 600; }
.char-meta { font-size: 12px; color: var(--muted); margin: 3px 0 5px; }
.char-desc {
  font-size: 12px; color: #9aa6b8;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.5; max-height: 3em;
}
/* v83 技能区防溢出：最多 3 行技能可见，超出内滚 */
.char-skills {
  margin-top: 7px; border-top: 1px dashed #2a3446; padding-top: 6px;
  max-height: 108px; overflow-y: auto; overscroll-behavior: contain;
}
.char-skills::-webkit-scrollbar { width: 4px; }
.char-skills::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }
.skills-title { font-size: 11px; color: #64748b; margin-bottom: 3px; letter-spacing: 1px; }
.skill-row { display: flex; gap: 6px; font-size: 11.5px; line-height: 1.5; align-items: baseline; }
.skill-name { color: var(--accent); white-space: nowrap; flex: none; font-weight: 600; }
.skill-name::before { content: '✦ '; color: #fbbf24; }
.skill-desc { color: #8b96a8; min-width: 0; overflow-wrap: anywhere; }
.char-card { min-height: 0; }
.char-info { overflow: visible; }
.char-btns { display: flex; flex-direction: column; gap: 7px; }

.select-actions { display: flex; gap: 14px; justify-content: flex-end; align-items: center; }

dialog {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px; width: min(640px, 92vw);
}
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h3 { margin-bottom: 10px; }
dialog .hint { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
dialog textarea {
  width: 100%; background: #0d1219; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; font-family: Consolas, monospace; font-size: 12.5px; resize: vertical;
}
.dlg-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; }

/* ============ 战斗页 ============ */
.battle-screen { height: 100vh; display: flex; flex-direction: column; padding: 14px 18px 10px; gap: 10px; }

.hud { display: flex; align-items: center; gap: 16px; }
.hud-side { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.hud-side.right { justify-content: flex-end; }
.hud-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--teamA); background: var(--panel);
}
.hud-side.right .hud-avatar { border-color: var(--teamB); }
.hud-text { flex: 1; min-width: 0; }
.hud-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-side.right .hud-text { text-align: right; }
.hpbar { height: 14px; background: #0d1219; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.hpfill { height: 100%; width: 100%; transition: width .12s linear; border-radius: 6px; }
.hpfill.teamA { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.hpfill.teamB { background: linear-gradient(90deg, #dc2626, #f87171); }
.hud-vs { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 74px; }
.hud-vs #hudTime { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--muted); }
.vslabel { font-weight: 800; font-size: 15px; color: #64748b; }

.arena-wrap {
  flex: 1; min-height: 0; position: relative;
  background: #0e1116; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.arena-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.controls { display: flex; gap: 9px; align-items: center; }

.bottom-panels { display: flex; gap: 12px; height: 132px; flex: none; }
.log-panel {
  flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden;
}
.log-title { font-size: 12px; color: var(--muted); padding: 6px 12px; border-bottom: 1px solid var(--line); flex: none; }
.log-lines { flex: 1; overflow-y: auto; padding: 6px 12px; font-size: 12.5px; font-family: Consolas, "Microsoft YaHei", monospace; }
.log-line { color: #aab6c8; padding: 1px 0; }
.log-line:nth-child(odd) { color: #c3cddd; }

.result-overlay {
  position: fixed; inset: 0; background: rgba(5,8,12,.78); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 50;
}
.result-overlay.hidden { display: none; }
.result-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 38px; width: min(760px, 92vw); text-align: center;
}
.result-title { font-size: 30px; font-weight: 800; letter-spacing: 1px; margin-bottom: 8px; }
.result-title.winA { color: var(--teamA); }
.result-title.winB { color: var(--teamB); }
.result-title.draw { color: var(--muted); }
.result-time { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.result-table { width: 100%; border-collapse: collapse; margin-bottom: 22px; font-size: 13.5px; }
.result-table th { color: var(--muted); font-weight: 500; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.result-table td { padding: 9px 8px; border-bottom: 1px solid #1b2331; }
.result-btns { display: flex; gap: 14px; justify-content: center; }


/* ===== KO 演出 / 轮间结算 / 倒计时 / 3v3 分组 ===== */
.ko-stage { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:8vw;
  background:radial-gradient(ellipse at center, rgba(8,10,16,0.78) 30%, rgba(4,6,10,0.94)); pointer-events:none; }
.ko-winner-wrap { text-align:center; animation:koWinnerIn .55s cubic-bezier(.2,1.6,.4,1) both; }
.ko-winner-img { width:240px; height:240px; border-radius:50%; border:5px solid #fde047;
  box-shadow:0 0 60px rgba(253,224,71,.5), 0 18px 50px rgba(0,0,0,.6); object-fit:cover;
  animation:winnerGlow 1.6s ease-in-out infinite alternate; }
.ko-winner-name { margin-top:14px; font-size:30px; font-weight:900; color:#fde047; text-shadow:0 2px 12px rgba(0,0,0,.8); }
.ko-loser-wrap { text-align:center; position:relative; width:170px; height:170px; }
.ko-loser-img { position:absolute; inset:0; width:170px; height:170px; border-radius:50%; border:4px solid #64748b; object-fit:cover;
  filter:grayscale(1) brightness(.75) contrast(1.1); }
/* 左右两半：clip-path 各取半边，延迟后分向两侧飞出旋转 */
.ko-loser-img.halfL { clip-path:polygon(0 0, 52% 0, 44% 100%, 0 100%); animation:halfLShake .4s ease-out .3s both, halfLFly 1.0s cubic-bezier(.45,.05,.9,.5) 1.0s both; }
.ko-loser-img.halfR { clip-path:polygon(56% 0, 100% 0, 100% 100%, 48% 100%); animation:halfRShake .4s ease-out .3s both, halfRFly 1.0s cubic-bezier(.45,.05,.9,.5) 1.0s both; }
.ko-loser-name { position:absolute; top:100%; left:0; right:0; margin-top:10px; font-size:16px; color:#94a3b8; }
.ko-round-tag { position:absolute; bottom:12vh; left:0; right:0; text-align:center; font-size:18px; color:#cbd5e1; }
@keyframes koWinnerIn { from { transform:scale(.2) translateY(40px); opacity:0; } to { transform:scale(1) translateY(0); opacity:1; } }
@keyframes winnerGlow { from { box-shadow:0 0 40px rgba(253,224,71,.35), 0 18px 50px rgba(0,0,0,.6); } to { box-shadow:0 0 90px rgba(253,224,71,.75), 0 18px 50px rgba(0,0,0,.6); } }
@keyframes halfLShake { 0%,100% { transform:translateX(0); } 30% { transform:translateX(-3px); } 60% { transform:translateX(-6px) rotate(-1deg); } }
@keyframes halfRShake { 0%,100% { transform:translateX(0); } 30% { transform:translateX(3px); } 60% { transform:translateX(6px) rotate(1deg); } }
@keyframes halfLFly { to { transform:translateX(-46vw) translateY(-14vh) rotate(-26deg); opacity:0; } }
@keyframes halfRFly { to { transform:translateX(46vw) translateY(-18vh) rotate(30deg); opacity:0; } }

/* 轮间倒计时 */
.countdown-stage { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:rgba(4,6,10,.82); pointer-events:none; }
.countdown-round { font-size:26px; color:#cbd5e1; letter-spacing:6px; margin-bottom:6px; }
.countdown-num { font-size:150px; font-weight:900; color:#fde047; text-shadow:0 0 50px rgba(253,224,71,.6);
  animation:countPop .9s ease-out; }
.countdown-hint { font-size:18px; color:#94a3b8; letter-spacing:8px; margin-top:8px; }
@keyframes countPop { 0% { transform:scale(1.9); opacity:0; } 40% { transform:scale(1); opacity:1; } 100% { opacity:.92; } }

/* 3v3 分组结算 */
.team-result { max-width:960px; }
.team-vs-row { display:flex; gap:22px; margin:16px 0 6px; }
.team-group { flex:1; border-radius:14px; padding:14px; background:rgba(255,255,255,.03); }
.team-group.win { border:2px solid rgba(253,224,71,.55); box-shadow:0 0 30px rgba(253,224,71,.12); }
.team-group.lose { border:2px solid rgba(100,116,139,.4); filter:saturate(.55) brightness(.85); }
.team-group-label { font-size:19px; font-weight:800; margin-bottom:12px; color:#e2e8f0; }
.team-group.win .team-group-label { color:#fde047; }
.team-cards { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.team-card { position:relative; width:120px; text-align:center; }
.team-card img { width:96px; height:96px; border-radius:50%; border:3px solid #475569; object-fit:cover; }
.team-group.win .team-card img { border-color:#fde047; }
.team-card.mvp img { width:112px; height:112px; box-shadow:0 0 26px rgba(253,224,71,.65); }
.mvp-tag { position:absolute; top:-12px; left:50%; transform:translateX(-50%) rotate(-6deg);
  background:linear-gradient(135deg,#fde047,#f59e0b); color:#422006; font-weight:900; font-size:14px;
  padding:3px 12px; border-radius:10px; box-shadow:0 3px 10px rgba(0,0,0,.5); z-index:2; letter-spacing:1px; }
.team-card-name { font-size:14px; color:#e2e8f0; margin-top:7px; font-weight:700; }
.team-card-stat { font-size:12px; color:#94a3b8; margin-top:2px; }


/* ===== 团体战 HUD（6 血条）===== */
.hud-side.group { display:flex; flex-direction:column; gap:5px; flex:0 0 auto; width:210px; }
.ghud-row { display:flex; align-items:center; gap:7px; padding:2px 6px; border-radius:8px;
  background:rgba(255,255,255,.04); transition:filter .4s, opacity .4s; }
.ghud-row.dead { filter:grayscale(1) brightness(.55); opacity:.55; }
.ghud-img { width:30px; height:30px; border-radius:50%; border:2px solid #64748b; object-fit:cover; }
.ghud-text { flex:1; min-width:0; }
.ghud-name { font-size:11px; color:#cbd5e1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hpbar.sm { height:6px; margin-top:2px; }

/* 团体战败者：灰头像慢镜头绕场 → 加速飞出 */
.ko-fly-ghost { position:absolute; width:84px; height:84px; border-radius:50%;
  border:3px solid #94a3b8; object-fit:cover; filter:grayscale(.85) brightness(.75);
  pointer-events:none; z-index:60;
  animation:ghostOrbit 3.6s cubic-bezier(.3,.15,.7,.85) forwards; }
.ko-fly-ghost .ghost-tag { position:absolute; top:-26px; left:50%; transform:translateX(-50%);
  white-space:nowrap; font-size:15px; font-weight:900; color:#e2e8f0;
  background:rgba(10,12,18,.85); border:1px solid #475569; padding:2px 12px; border-radius:9px;
  text-shadow:0 1px 4px #000; }
.ko-fly-ghost .ghost-ko { position:absolute; bottom:-24px; left:50%; transform:translateX(-50%) rotate(-6deg);
  font-size:19px; font-weight:900; color:#f87171; letter-spacing:2px;
  text-shadow:0 0 12px rgba(248,113,113,.7); }
@keyframes ghostOrbit {
  0%   { transform:translate(0,0) rotate(0deg) scale(1.15); opacity:1; }
  12%  { transform:translate(-3vw,-2vh) rotate(-18deg) scale(1.18); opacity:1; }
  26%  { transform:translate(-6vw,2vh) rotate(-32deg) scale(1.18); opacity:1; }
  40%  { transform:translate(-4vw,7vh) rotate(-16deg) scale(1.15); opacity:.98; }
  55%  { transform:translate(4vw,8vh) rotate(24deg) scale(1.12); opacity:.98; }
  68%  { transform:translate(10vw,3vh) rotate(42deg) scale(1.08); opacity:.96; }
  100% { transform:translate(56vw,-34vh) rotate(160deg) scale(.2); opacity:0; }
}
  15%  { transform:translate(-16vw,-6vh) rotate(-40deg) scale(1.06); }
  35%  { transform:translate(-24vw,10vh) rotate(40deg) scale(1.02); }
  55%  { transform:translate(6vw,22vh) rotate(-30deg) scale(.96); }
  75%  { transform:translate(20vw,4vh) rotate(50deg) scale(.9); opacity:.95; }
  100% { transform:translate(52vw,-30vh) rotate(120deg) scale(.25); opacity:0; }
}

/* ============ 手机/平板触屏适配（v48） ============ */
@media (max-width: 820px) {
  /* 选人卡片单列、可点区域加大 */
  .char-card { min-height: 0; height: fit-content; }
  .char-grid { grid-template-columns: 1fr 1fr !important; }
  /* 战斗页：HUD 紧凑、日志收窄 */
  .hud-side { gap: 6px; }
  .hud-text .name { font-size: 12px !important; }
  .log-panel { max-height: 90px !important; font-size: 11px !important; }
  /* 控制按钮触屏友好 */
  .ctrl-btn, button { min-height: 44px; min-width: 44px; }
}
/* 窄手机（竖屏）：进一步压 */
@media (max-width: 480px) {
  .char-grid { grid-template-columns: 1fr !important; }
  .hud-vs { min-width: 50px; }
}
/* 触屏：禁双击缩放（游戏快速点击不误触缩放） */
html, body { touch-action: manipulation; }


/* ============ 锦标赛模式（v49） ============ */
#tournOverlay { position:fixed; inset:0; z-index:120; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(ellipse at center, rgba(15,18,30,.94), rgba(6,8,14,.98)); cursor:pointer; }
.tourn-stage { display:flex; flex-direction:column; align-items:center; gap:14px; max-width:min(94vw,900px); max-height:94vh; overflow:auto; padding:22px; }
.tourn-label { font-size:26px; font-weight:900; color:#fbbf24; letter-spacing:3px; text-shadow:0 0 18px rgba(251,191,36,.45); }
.tourn-vs-row { display:flex; align-items:center; gap:34px; margin:6px 0; }
.tourn-fighter { display:flex; flex-direction:column; align-items:center; gap:8px; }
.tourn-fighter img { width:110px; height:110px; border-radius:50%; border:4px solid #64748b; object-fit:cover;
  box-shadow:0 8px 30px rgba(0,0,0,.6); animation:tournPop .5s cubic-bezier(.2,1.4,.4,1) both; }
.tourn-fighter:last-child img { animation-delay:.12s; }
@keyframes tournPop { from { transform:scale(.2); opacity:0; } to { transform:scale(1); opacity:1; } }
.tourn-name { font-size:17px; font-weight:800; color:#e2e8f0; }
.tourn-vs { font-size:34px; font-weight:900; color:#f87171; text-shadow:0 0 16px rgba(248,113,113,.6); }
.tourn-bracket-wrap { width:100%; overflow-x:auto; }
.t-bracket { display:flex; gap:16px; align-items:center; justify-content:center; padding:10px; }
.t-col { display:flex; flex-direction:column; gap:8px; }
.t-col-title { font-size:12px; color:#94a3b8; text-align:center; font-weight:700; letter-spacing:1px; }
.t-match { display:flex; flex-direction:column; gap:3px; background:rgba(30,36,52,.65); border:1px solid #334155; border-radius:8px; padding:5px; }
.t-slot { display:flex; align-items:center; gap:7px; padding:3px 9px; border-radius:6px; font-size:13px; color:#cbd5e1; }
.t-slot img { width:26px; height:26px; border-radius:50%; object-fit:cover; border:2px solid #475569; }
.t-slot.won { color:#fbbf24; } .t-slot.won img { border-color:#fbbf24; }
.t-slot.lost { opacity:.42; filter:grayscale(.7); }
.t-slot.cur { outline:2px dashed #f87171; animation:tournBlink 1s infinite alternate; }
.t-slot.empty { color:#475569; font-style:italic; }
@keyframes tournBlink { from { outline-color:rgba(248,113,113,.25); } to { outline-color:rgba(248,113,113,.95); } }
.t-champion { display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px; }
.t-champion img { width:64px; height:64px; border-radius:50%; border:3px solid #fbbf24; box-shadow:0 0 24px rgba(251,191,36,.55); }
.t-champion span { color:#fbbf24; font-weight:900; font-size:14px; }
/* 终局 */
.tourn-stage.finale { cursor:default; gap:10px; }
.tourn-crown { font-size:52px; animation:tournFloat 2.4s ease-in-out infinite; }
@keyframes tournFloat { 0%,100% { transform:translateY(0) rotate(-4deg); } 50% { transform:translateY(-10px) rotate(4deg); } }
.tourn-champ-img img { width:150px; height:150px; border-radius:50%; border:5px solid #fbbf24;
  box-shadow:0 0 44px rgba(251,191,36,.55); animation:tournPop .6s cubic-bezier(.2,1.4,.4,1) both; }
/* v128 荣誉榜（选人界面：参赛名单右侧横排 + 终局页） */
#tournTopRow { display:flex; align-items:stretch; gap:16px; justify-content:center; width:100%; }
#tournTopRow .pick-bar { flex:1 1 auto; max-width:calc(100% - 330px); margin:0; } /* 名单占主行，荣誉榜右侧定宽 */
#honorRollBox { flex:0 0 300px; margin:0; align-self:center; }
@media (max-width: 900px) { /* 手机窄屏：纵排防重叠 */
  #tournTopRow { flex-direction:column; align-items:stretch; gap:8px; }
  #tournTopRow .pick-bar { max-width:100%; }
  #honorRollBox { flex:0 0 auto; }
}
.honor-roll { background:linear-gradient(160deg, rgba(120,53,15,.25), rgba(30,36,52,.65)); border:1px solid rgba(251,191,36,.4); border-radius:12px; padding:8px 12px; max-height:132px; overflow-y:auto; }
.honor-title { font-size:12px; font-weight:900; color:#fbbf24; letter-spacing:2px; margin-bottom:4px; text-align:center; }
.honor-row { display:flex; align-items:center; gap:10px; padding:2px 6px; font-size:12px; }
.honor-rank { width:16px; text-align:center; color:#94a3b8; font-weight:800; }
.honor-name { flex:1; color:#e2e8f0; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.honor-titles { color:#fbbf24; font-weight:900; }
.tourn-honor { margin:8px auto 0; max-width:460px; }
/* v130.1 终局页：战绩表与荣誉榜并排（荣誉榜右侧） */
#tournHistRow { display:flex; gap:16px; align-items:flex-start; justify-content:center; width:100%; }
#tournHistRow .tourn-hist { flex:1 1 auto; max-width:calc(100% - 330px); margin:0; }
#tournHistRow .tourn-honor { flex:0 0 300px; margin:0; align-self:flex-start; }
#tournHistRow .tourn-honor .honor-roll { max-height:180px; }
@media (max-width: 900px) {
  #tournHistRow { flex-direction:column; align-items:stretch; }
  #tournHistRow .tourn-hist { max-width:100%; }
  #tournHistRow .tourn-honor { flex:0 0 auto; }
}
.t-byes { font-size:11px; color:#94a3b8; padding:4px 6px; text-align:center; line-height:1.5; border:1px dashed #334155; border-radius:6px; }
/* 12人赛第一列稍窄容纳5行 */
.t-col.r12col { gap:5px; }
.t-col.r12col .t-match { padding:4px; }
.tourn-champ-name { font-size:32px; font-weight:900; color:#fde68a; letter-spacing:2px; text-shadow:0 0 24px rgba(251,191,36,.5); }
.tourn-champ-sub { font-size:13px; color:#94a3b8; letter-spacing:6px; }
.tourn-hist { width:100%; border-collapse:collapse; font-size:13px; margin-top:6px; }
.tourn-hist th, .tourn-hist td { padding:5px 10px; border-bottom:1px solid #263043; text-align:left; color:#cbd5e1; }
.tourn-hist th { color:#94a3b8; font-size:12px; }
.t-win { color:#fbbf24; font-weight:800; }
#tournGo { margin-top:4px; }
/* 手机适配 */
@media (max-width: 820px) {
  .tourn-vs-row { gap:16px; }
  .tourn-fighter img { width:76px; height:76px; }
  .tourn-vs { font-size:24px; }
  .tourn-champ-img img { width:110px; height:110px; }
  .t-bracket { transform-origin:top center; transform:scale(.82); }
}


/* ============ 选人页 VS 主题背景（v51） ============ */
.select-wrap {
  position: relative;
  background: linear-gradient(rgba(8,10,18,.82), rgba(8,10,18,.88) 45%, rgba(10,8,18,.84)),
              url('../assets/ui/vs-hero.jpg') center/cover no-repeat;
}
.select-wrap::before {  /* 顶部标题区渐隐，让标题浮在战场之上 */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,10,18,.35), transparent 30%, transparent 70%, rgba(8,10,18,.4));
}
.select-header { position: relative; z-index: 2; }
.select-header h1 { text-shadow: 0 2px 18px rgba(0,0,0,.75); }
.mode-bar, .pick-bar { position: relative; z-index: 2; }
.char-grid { position: relative; z-index: 2; }
.select-actions { position: relative; z-index: 2; }
/* 卡片面板加实底：背景图不穿透，选人看清 */
.char-card {
  background: rgba(17,21,34,.92);
  backdrop-filter: blur(4px);
}
.char-card:hover { background: rgba(23,28,45,.95); }
.slot { background: rgba(17,21,34,.9); }
.mode-switch .btn { background: rgba(17,21,34,.88); }

/* 锦标赛对阵卡：VS 战场背景 */
#tournOverlay { background: radial-gradient(ellipse at center, rgba(12,14,24,.78), rgba(6,8,14,.92)), url('../assets/ui/vs-hero.jpg') center/cover no-repeat; }
.tourn-stage { background: none; }
.tourn-label { text-shadow: 0 2px 16px rgba(0,0,0,.9); }
.tourn-fighter img { box-shadow: 0 10px 36px rgba(0,0,0,.85), 0 0 22px rgba(59,130,246,.25); }
.t-match { background: rgba(17,21,34,.88); backdrop-filter: blur(3px); }


/* ============ 性格选择条（v53） ============ */
.perso-bar { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 2; }
.perso-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.perso-side { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 64px; }
.perso-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.perso-btn {
  font-size: 12.5px; padding: 5px 10px; border-radius: 8px;
  background: rgba(17,21,34,.92); border: 1px solid var(--line); color: #cbd5e1;
  cursor: pointer; transition: all .12s;
}
.perso-btn:hover { border-color: #64748b; }
.perso-btn.active { border-color: #fbbf24; color: #fde68a; box-shadow: 0 0 10px rgba(251,191,36,.25); }
.perso-btn.group i { font-style: normal; font-size: 10px; color: #7c8db5; margin-left: 2px; }
.perso-dice { font-size: 16px; padding: 3px 8px; border-radius: 8px; background: rgba(17,21,34,.92);
  border: 1px solid var(--line); cursor: pointer; }
.perso-dice.active { border-color: #a78bfa; box-shadow: 0 0 10px rgba(167,139,250,.35); }
.perso-hint { font-size: 11.5px; color: #64748b; }
@media (max-width: 820px) { .perso-side { min-width: 50px; } .perso-btn { padding: 6px 8px; } }


/* 性格 tooltip 浮层（v60） */
.perso-tip {
  position: fixed; z-index: 999; max-width: 320px;
  background: rgba(12,16,28,0.97); border: 1px solid #fbbf24; border-radius: 10px;
  padding: 10px 14px; font-size: 13px; line-height: 1.65; color: #e2e8f0;
  box-shadow: 0 10px 34px rgba(0,0,0,.6), 0 0 14px rgba(251,191,36,.15);
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.perso-tip.show { opacity: 1; }


/* 先天体质徽章（选人卡） */
.phys-tag {
  font-style: normal; font-size: 11px; font-weight: 700;
  color: #93c5fd; background: rgba(30,58,95,0.75);
  border: 1px solid #3b82f6; border-radius: 6px;
  padding: 1px 7px; margin-left: 7px; vertical-align: 1px;
}


/* §v76 团体战 HUD 出局者头像画叉 */
.ghud-avwrap { position: relative; display: inline-block; flex: none; }
.ghud-avwrap .ghud-img { display: block; }
.ghud-row.dead .ghud-avwrap::before,
.ghud-row.dead .ghud-avwrap::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 130%; height: 4px; border-radius: 2px;
  background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.8), 0 1px 2px rgba(0,0,0,.6);
  transform-origin: center;
}
.ghud-row.dead .ghud-avwrap::before { transform: translate(-50%, -50%) rotate(45deg); }
.ghud-row.dead .ghud-avwrap::after { transform: translate(-50%, -50%) rotate(-45deg); }


/* §v77 队员级性格徽章 */
.member-perso {
  font-style: normal; font-size: 11px; font-weight: 700;
  color: #fde68a; background: rgba(69,50,10,0.6);
  border: 1px solid rgba(251,191,36,0.5); border-radius: 6px;
  padding: 1px 6px; margin-left: 4px; cursor: pointer;
  transition: all .12s; vertical-align: 1px; white-space: nowrap;
}
.member-perso:hover { border-color: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.3); }
.perso-note { font-size: 11px; color: #64748b; margin-right: 6px; }


/* v85 队员槽头像约束（裸 img 曾按原始尺寸渲染——512 大图=巨大） */
.team-member img {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  vertical-align: -8px; margin-right: 2px;
}
