/* =========================================================
   梗王大乱斗 · 质感层 (polish.css)
   叠加在 style.css 之上，只改视觉与手感，不动结构与逻辑。
   原则：
   1. 玻璃面板 + 内高光 + 多层阴影，建立前后景深
   2. 文字最小 11px，信息层级清晰
   3. 按钮有"实体感"：按下去、弹起来、扫光
   4. 每个界面入场有节奏（错峰淡入），切换有转场
   ========================================================= */

:root {
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --glass: linear-gradient(160deg, rgba(40, 32, 51, .78), rgba(16, 12, 22, .82));
  --glass-soft: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  --gold: linear-gradient(180deg, #ffe87a 0%, #ffcb2b 50%, #ffae08 100%);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ring: 0 0 0 1px rgba(255, 244, 209, .1);
  --lift:
    0 1px 0 rgba(255, 255, 255, .09) inset,
    0 -1px 0 rgba(0, 0, 0, .35) inset,
    0 2px 4px rgba(0, 0, 0, .25),
    0 18px 44px rgba(0, 0, 0, .42),
    0 40px 90px rgba(0, 0, 0, .28);
  --shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

/* ---------- 基础 ---------- */
body { text-rendering: optimizeLegibility; font-synthesis: none; }
::selection { background: var(--yellow); color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 210, 63, .5); background-clip: content-box; }

:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
button:focus:not(:focus-visible), input:focus:not(:focus-visible) { outline: none; }
.menu-btn:focus-visible { outline: none; }

/* 晕影：压住四角，把视线收到中间（战斗页不加，canvas 自带） */
#app::after {
  content: ""; position: absolute; inset: 0; z-index: 40; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 100% at 50% 45%, transparent 52%, rgba(3, 2, 6, .55) 100%);
  transition: opacity .4s;
}
body[data-screen="battle"] #app::after { opacity: 0; }
.screen::after { opacity: .07; }

/* ---------- 入场节奏：切到某个界面时，里面的块依次升起 ---------- */
@keyframes p-rise { from { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes p-slide-l { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
@keyframes p-slide-r { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes p-drop { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

.screen.active .topbar, .screen.active .subbar { animation: p-drop .55s var(--ease) both; }
.title-screen.active .title-copy > * { animation: p-rise .8s var(--ease) both; }
.title-screen.active .title-copy > :nth-child(1) { animation-delay: .05s; }
.title-screen.active .title-copy > :nth-child(2) { animation-delay: .12s; }
.title-screen.active .title-copy > :nth-child(3) { animation-delay: .2s; }
.title-screen.active .title-copy > :nth-child(4) { animation-delay: .32s; }
.title-screen.active .title-copy > :nth-child(5) { animation-delay: .4s; }
.title-screen.active .title-copy > :nth-child(6) { animation-delay: .48s; }
.title-copy { animation: none !important; }
.title-screen.active .menu-card { animation: p-slide-r .8s .1s var(--ease) both; }
.title-screen.active .menu-btn { animation: p-rise .6s var(--ease) both; }
.title-screen.active .menu-btn:nth-of-type(1) { animation-delay: .3s; }
.title-screen.active .menu-btn:nth-of-type(2) { animation-delay: .38s; }
.title-screen.active .menu-btn:nth-of-type(3) { animation-delay: .46s; }
.title-screen.active .menu-btn:nth-of-type(4) { animation-delay: .54s; }
.title-screen.active .hero { animation-name: p-hero-in, var(--hero-idle); animation-duration: 1s, 5.4s; animation-timing-function: var(--ease), ease-in-out; animation-iteration-count: 1, infinite; animation-delay: .2s, 1.2s; animation-fill-mode: both, none; }
.title-screen .h-frog { --hero-idle: hero-frog; }
.title-screen .h-roo { --hero-idle: hero-bob; }
@keyframes p-hero-in { from { opacity: 0; transform: translateY(50px) scale(.94); } to { opacity: 1; transform: none; } }

.online-screen.active .online-art { animation: p-slide-l .8s var(--ease) both; }
.online-screen.active .online-panel { animation: p-slide-r .8s .08s var(--ease) both; }
.select-screen.active .fighter-panel.p1-panel { animation: p-slide-l .7s var(--ease) both; }
.select-screen.active .fighter-panel.p2-panel { animation: p-slide-r .7s var(--ease) both; }
.select-screen.active .select-head { animation: p-rise .6s .05s var(--ease) both; }
.select-screen.active .char-card { animation: p-rise .7s var(--ease) both; }
.select-screen.active .char-card:nth-child(1) { animation-delay: .12s; }
.select-screen.active .char-card:nth-child(2) { animation-delay: .2s; }
.select-screen.active .char-card:nth-child(3) { animation-delay: .28s; }
.select-screen.active .select-bottom, .select-screen.active .select-controls-strip { animation: p-rise .6s .34s var(--ease) both; }
.result-screen.active .winner-side { animation: p-slide-l .8s var(--ease) both; }
.result-screen.active .result-stats > div { animation: p-rise .6s var(--ease) both; }
.result-screen.active .result-stats > div:nth-child(1) { animation-delay: .35s; }
.result-screen.active .result-stats > div:nth-child(2) { animation-delay: .43s; }
.result-screen.active .result-stats > div:nth-child(3) { animation-delay: .51s; }
.result-screen.active .result-stats > div:nth-child(4) { animation-delay: .59s; }

/* ---------- 按钮：有实体感 ---------- */
.cta-btn {
  border-radius: 12px;
  background: var(--gold);
  letter-spacing: .05em;
  isolation: isolate; overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 -3px 0 rgba(160, 80, 0, .22) inset,
    0 5px 0 #a86b00,
    0 14px 30px rgba(255, 170, 20, .26);
  transition: transform .22s var(--spring), box-shadow .22s var(--ease), filter .2s;
}
.cta-btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .6) 50%, transparent 68%);
  transform: translateX(-130%);
}
.cta-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  background: var(--gold); filter: brightness(1.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 -3px 0 rgba(160, 80, 0, .22) inset, 0 8px 0 #a86b00, 0 20px 40px rgba(255, 170, 20, .34);
}
.cta-btn:hover:not(:disabled)::after { transform: translateX(130%); transition: transform .8s var(--ease); }
.cta-btn:active:not(:disabled) { transform: translateY(3px); filter: brightness(.97); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 2px 0 #a86b00, 0 6px 14px rgba(255, 170, 20, .2); transition-duration: .06s; }
.cta-btn:disabled { background: linear-gradient(180deg, #4a444f, #38333d); color: #8b8491; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 0 #26222b; filter: none; }
.cta-btn.danger-cta { background: linear-gradient(180deg, #ff6372, #ff3b4e 55%, #e0213a); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 5px 0 #8d1422, 0 14px 30px rgba(255, 59, 78, .26); }
.cta-btn.danger-cta:hover:not(:disabled) { background: linear-gradient(180deg, #ff6372, #ff3b4e 55%, #e0213a); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 8px 0 #8d1422, 0 20px 40px rgba(255, 59, 78, .34); }
.ready-btn.is-ready { background: linear-gradient(180deg, #c4ffe2, #9ef7c8 55%, #6fe3a8); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 5px 0 #1f8965, 0 14px 30px rgba(158, 247, 200, .22); animation: p-ready 1.6s ease-in-out infinite; }
@keyframes p-ready { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }

.ghost-btn {
  border-radius: 10px;
  background: var(--glass-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 6px 16px rgba(0, 0, 0, .18);
  font-size: 13px;
  transition: background .2s, border-color .2s, transform .22s var(--spring), box-shadow .2s;
}
.ghost-btn:hover { background: rgba(255, 255, 255, .1); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 12px 24px rgba(0, 0, 0, .28); }
.ghost-btn:active { transform: translateY(1px) scale(.98); transition-duration: .05s; }

.icon-btn, .battle-icon-btn {
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 6px 16px rgba(0, 0, 0, .3);
  transition: background .2s, color .2s, border-color .2s, transform .22s var(--spring);
}
.icon-btn:hover, .battle-icon-btn:hover { transform: translateY(-2px) scale(1.06); }
.icon-btn:active, .battle-icon-btn:active { transform: scale(.94); }
.back-btn { border-radius: 10px; min-height: 40px; padding: 0 16px; font-size: 13px; background: var(--glass-soft); transition: .22s var(--ease); }
.back-btn:hover { transform: translateX(-3px); }

/* 点击涟漪 */
.p-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, .55); transform: translate(-50%, -50%) scale(0); animation: p-ripple .6s var(--ease) forwards; z-index: 0; }
.ghost-btn .p-ripple, .menu-btn .p-ripple { background: rgba(255, 210, 63, .35); }
@keyframes p-ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
.ghost-btn, .menu-btn, .mode-tab, .back-btn { position: relative; overflow: hidden; }

/* ---------- 胶囊 / 徽标 ---------- */
.net-pill {
  min-height: 34px; padding: 0 14px; font-size: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset;
}
.brand-mini { font-size: 12px; }
.brand-mini b { font-size: 15px; }
.brand-dot { width: 24px; height: 24px; box-shadow: inset 0 -4px 0 #dd8e00, 0 0 0 3px rgba(255, 210, 63, .12), 0 4px 14px rgba(255, 190, 30, .35); }
.brand-dot::before, .brand-dot::after { top: 5px; }
.brand-dot::before { left: 5px; } .brand-dot::after { right: 5px; }
.subbar { background: linear-gradient(180deg, rgba(20, 15, 27, .82), rgba(10, 8, 14, .6)); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 12px 30px rgba(0, 0, 0, .25); }
.subbar-title span { font-size: 13px; }
.subbar-title b { font-size: 17px; }

/* ---------- 加载页 ---------- */
.loading-frog { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 0 0 10px rgba(255, 210, 63, .06), 0 0 90px rgba(255, 195, 31, .3), inset 0 -12px 26px rgba(160, 92, 0, .32); }
.loading-frog::before { content: ""; position: absolute; inset: -16px; border-radius: 50%; border: 1px dashed rgba(255, 210, 63, .35); animation: spin 14s linear infinite; }
.loading-title { font-size: 34px; background: linear-gradient(180deg, #fff6d0, #ffd23f 70%, #ff9a1f); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)); }
.loading-sub { font-size: 12px; }
.loading-bar { height: 6px; background: rgba(255, 255, 255, .09); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.loading-bar i { background: linear-gradient(90deg, #ffb01f, #ffe065); position: relative; }
.loading-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%); animation: p-shine 1.4s linear infinite; }
@keyframes p-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.loading-pct { font-size: 13px; }
.loading-foot { font-size: 10px; }

/* =========================================================
   标题页
   ========================================================= */
.title-screen {
  background:
    radial-gradient(ellipse 60% 55% at 22% 88%, rgba(255, 183, 31, .22), transparent 70%),
    radial-gradient(ellipse 50% 50% at 88% 28%, rgba(255, 77, 35, .16), transparent 70%),
    radial-gradient(ellipse 40% 40% at 60% 8%, rgba(150, 90, 255, .1), transparent 70%),
    linear-gradient(150deg, #1a1220 0%, #0c0911 58%, #07050a 100%);
}
.title-sun { width: 760px; height: 760px; right: -14%; top: 2%; animation: p-breathe 9s ease-in-out infinite; }
@keyframes p-breathe { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.title-bg::after {
  content: ""; position: absolute; inset: -10% -10% 0 -10%; pointer-events: none;
  background:
    linear-gradient(112deg, transparent 40%, rgba(255, 214, 110, .055) 47%, transparent 54%),
    linear-gradient(112deg, transparent 56%, rgba(255, 190, 90, .04) 61%, transparent 66%);
  -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 10%, transparent 78%);
  animation: p-rays 14s ease-in-out infinite alternate;
}
@keyframes p-rays { from { transform: translateX(-3%); opacity: .7; } to { transform: translateX(3%); opacity: 1; } }
.big-word { -webkit-text-stroke: 1.5px rgba(255, 244, 209, .075); transition: translate .9s var(--ease); translate: calc(var(--px, 0) * 14px) calc(var(--py, 0) * 8px); }
.title-grid { opacity: .85; }

/* 视差：鼠标移动时，前景/中景/远景以不同幅度位移 */
.title-copy { translate: calc(var(--px, 0) * 5px) calc(var(--py, 0) * 3px); transition: translate .8s var(--ease); }
.title-screen .hero { transition: translate .8s var(--ease); }
.h-frog { translate: calc(var(--px, 0) * -16px) calc(var(--py, 0) * -7px); }
.h-roo { translate: calc(var(--px, 0) * -28px) calc(var(--py, 0) * -10px); }
.menu-card { translate: calc(var(--px, 0) * 4px) calc(var(--py, 0) * 2px); transition: translate .8s var(--ease); }

/* 英雄：地面光斑 + 镜面倒影 */
.hero-fighters::before {
  content: ""; position: absolute; left: 20%; right: 22%; bottom: 0; height: 80%;
  background: radial-gradient(ellipse 55% 42% at 50% 54%, rgba(255, 202, 74, .2), transparent 100%);
}
.hero::before {
  content: ""; position: absolute; left: 50%; bottom: -16px; width: 130%; height: 40px; translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 205, 80, .34), rgba(255, 140, 40, .1) 55%, transparent 72%);
  filter: blur(3px);
}
.hero img { -webkit-box-reflect: below -8px linear-gradient(transparent 62%, rgba(255, 255, 255, .17)); filter: saturate(1.04) contrast(1.05) drop-shadow(0 0 28px rgba(255, 190, 40, .14)); }
.hero-shadow { background: radial-gradient(ellipse, rgba(0, 0, 0, .7), transparent 68%); }

/* 标题字：金属渐变 + 流光 */
.title-copy::before { background: radial-gradient(125% 85% at 0% 50%, rgba(9, 6, 12, .85) 0%, rgba(9, 6, 12, .5) 55%, transparent 82%); }
.sticker { font-size: 12px; padding: 9px 14px 8px; border-radius: 6px; box-shadow: 0 3px 0 rgba(0, 0, 0, .3), 0 10px 24px rgba(255, 190, 30, .2); background: var(--gold); }
.title-kicker { font-size: clamp(13px, 1.2vw, 18px); }
.game-logo span:last-child {
  background: linear-gradient(180deg, #fff6b8 3%, #ffd23f 38%, #ff8a19 70%, #ffc23a 100%);
  background-size: 100% 220%;
  -webkit-background-clip: text; background-clip: text;
  animation: p-logo-sheen 5s ease-in-out infinite;
}
@keyframes p-logo-sheen { 0%, 100% { background-position: 0 0; } 50% { background-position: 0 100%; } }
.game-logo { filter: drop-shadow(8px 12px 0 rgba(0, 0, 0, .4)) drop-shadow(0 0 40px rgba(255, 150, 30, .18)); }
.title-ribbon { font-size: 13px; padding: 8px 16px 8px 10px; border-radius: 0 8px 8px 0; background: linear-gradient(90deg, rgba(255, 210, 63, .18), rgba(255, 210, 63, .02)); }
.title-ribbon span { font-size: 13px; }
.title-desc { font-size: clamp(13px, 1.25vw, 15px); color: #bdb3c4; line-height: 1.95; }
.title-tags span { font-size: 11px; padding: 6px 11px; border-radius: 100px; background: rgba(255, 255, 255, .03); color: #a198a9; transition: .2s; }
.title-tags span:hover { color: var(--yellow); border-color: rgba(255, 210, 63, .5); transform: translateY(-2px); }

/* 菜单卡：玻璃 + 渐变顶边 */
.menu-card {
  border-radius: 20px; border: 1px solid rgba(255, 244, 209, .13);
  background: var(--glass);
  padding: 26px 22px 16px;
  box-shadow: var(--lift);
  backdrop-filter: blur(26px) saturate(1.3);
  overflow: hidden;
}
.menu-card::before { left: 0; right: 0; width: auto; height: 2px; background: linear-gradient(90deg, var(--yellow), rgba(255, 210, 63, .1) 70%, transparent); }
.menu-card::after { display: none; }
.menu-head { padding: 0 6px 16px; }
.menu-head span { font-size: 11px; }
.menu-head b { font-size: 15px; }
.menu-btn { padding: 14px 12px; border-bottom: 0; border-radius: 13px; margin-top: 3px; }
.menu-btn::before { inset: 0; border-radius: 13px; background: linear-gradient(100deg, #ffe066, #ffbd1f); box-shadow: 0 8px 24px rgba(255, 180, 30, .28); }
.menu-btn:hover, .menu-btn:focus-visible { padding-left: 16px; padding-right: 12px; }
.menu-btn.primary { background: linear-gradient(100deg, rgba(255, 210, 63, .15), rgba(255, 210, 63, .02)); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .22); }
.menu-btn.primary:hover, .menu-btn.primary:focus-visible { box-shadow: none; }
.menu-btn:active { transform: scale(.985); transition: transform .06s; }
.menu-index { flex: 0 0 30px; display: grid; place-items: center; height: 22px; border-radius: 6px; font-size: 11px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); }
.menu-btn.primary .menu-index { border-color: rgba(255, 210, 63, .4); background: rgba(255, 210, 63, .1); }
.menu-btn:hover .menu-index, .menu-btn:focus-visible .menu-index { border-color: rgba(12, 9, 16, .25); background: rgba(12, 9, 16, .1); }
.menu-label b { font-size: 21px; }
.menu-label small { font-size: 12px; color: #9c93a5; }
.menu-arrow { font-size: 18px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .04); }
.menu-btn.primary .menu-arrow { background: rgba(255, 210, 63, .14); }
.menu-btn:hover .menu-arrow, .menu-btn:focus-visible .menu-arrow { background: rgba(12, 9, 16, .12); }
.menu-foot { font-size: 11px; padding: 14px 6px 0; }

.ticker-track span { font-size: 12px; }
.title-credit { font-size: 10px; }

/* =========================================================
   联机页
   ========================================================= */
.online-panel {
  border-radius: 22px; border: 1px solid rgba(255, 244, 209, .13);
  background: var(--glass); box-shadow: var(--lift);
  backdrop-filter: blur(26px) saturate(1.3);
}
.online-panel::before, .online-panel::after { display: none; }
.online-panel h2 { font-size: clamp(28px, 3.4vw, 44px); }
.panel-desc { font-size: 14px; color: #b3a9ba; }
.field-label { font-size: 12px; letter-spacing: .1em; }
.text-input, .code-input { border-radius: 12px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4); font-size: 15px; }
.text-input:focus, .code-input:focus { box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4), 0 0 0 3px rgba(255, 210, 63, .16); background: rgba(0, 0, 0, .34); }
.dice-btn { border-radius: 12px; font-size: 19px; transition: transform .3s var(--spring), background .2s, color .2s, border-color .2s; }
.dice-btn:hover { transform: rotate(180deg) scale(1.08); }
.mode-tabs { border-radius: 14px; padding: 4px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }
.mode-tab { border-radius: 10px; min-height: 40px; font-size: 14px; }
.mode-tab:hover:not(.active) { color: var(--cream); background: rgba(255, 255, 255, .05); }
.mode-tab.active { background: linear-gradient(180deg, #fff8e0, #ffe9a8); box-shadow: 0 1px 0 #fff inset, 0 6px 14px rgba(0, 0, 0, .35); }
.cta-btn.big small { font-size: 12px; }
.field-hint { font-size: 12px; color: #8b8394; }
.mini-steps { font-size: 11px; }
.mini-steps b { width: 20px; height: 20px; font-size: 10px; }
.room-code-xl { text-shadow: 0 0 40px rgba(255, 190, 30, .35), 3px 3px 0 rgba(255, 100, 30, .22); }
.room-actions .ghost-btn { font-size: 12px; min-height: 38px; }
.wait-player { border-radius: 14px; min-height: 92px; }
.wait-player b { font-size: 15px; }
.wait-player small { font-size: 11px; }
.private-error { border-radius: 10px; font-size: 13px; }
.online-art-badge { font-size: 12px; border-radius: 6px; box-shadow: 0 6px 18px rgba(158, 247, 200, .25); }
.online-art-caption span { font-size: 12px; }
.online-art-caption b { font-size: 17px; }
.bubble { font-size: 14px; box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.online-bottom { font-size: 12px; }
.online-bottom .text-link { font-size: 12px; }
.p2p-option, .rank-card, .char-winrates, .lobby-room, .quick-status { border-radius: 14px; }
.p2p-copy b { font-size: 13px; }
.p2p-copy small { font-size: 11px; }
.p2p-copy b em { font-size: 10px; }
.lobby-head span { font-size: 10px; }
.lobby-head b { font-size: 15px; }
.lobby-room b { font-size: 14px; }
.lobby-room small { font-size: 12px; }
.lobby-room .lobby-code { font-size: 13px; }
.lobby-empty { font-size: 13px; border-radius: 14px; }
.quick-status b { font-size: 14px; }
.quick-timer { font-size: 11px; }
.rank-info small { font-size: 10px; }
.rank-info b { font-size: 15px; }
.rank-info span { font-size: 11px; }
.rank-score small { font-size: 10px; }
.char-winrates-head b { font-size: 12px; }
.char-winrates-head small, .char-winrate { font-size: 11px; }

/* =========================================================
   选人页
   ========================================================= */
.select-head h2 { font-size: clamp(28px, 3vw, 42px); }
.select-head p { font-size: 13px; color: #9a91a3; }
.select-meta { font-size: 12px; }
.room-chip { border-radius: 8px; font-size: 12px; }
.room-chip b { font-size: 13px; }

.fighter-panel {
  border-radius: 18px; border: 1px solid rgba(255, 244, 209, .1);
  background: var(--glass); box-shadow: var(--lift);
  backdrop-filter: blur(20px);
}
.fighter-panel::before { top: 14px; bottom: 14px; left: 0; width: 3px; border-radius: 0 3px 3px 0; }
.fighter-panel.active { box-shadow: var(--lift), 0 0 0 1px color-mix(in srgb, var(--pc), transparent 55%), 0 0 60px color-mix(in srgb, var(--pc), transparent 82%); }
.fighter-panel.active .panel-tag i { animation: p-pulse 1.4s ease-in-out infinite; }
@keyframes p-pulse { 50% { transform: scale(1.6); opacity: .6; } }
.panel-tag span { font-size: 15px; }
.panel-tag small { font-size: 11px; }
.fighter-panel-face { border-radius: 14px; box-shadow: inset 0 0 40px rgba(0, 0, 0, .35); }
.fighter-panel-face::after { border-radius: 8px; }
.fighter-panel-face img.p-popin { animation: p-pop-in .5s var(--spring) both; }
@keyframes p-pop-in { from { opacity: 0; transform: scale(.7) translateY(14px); } to { opacity: 1; transform: scale(1.05); } }
.select-stamp { font-size: 11px; padding: 5px 9px; border-radius: 4px; }
.fighter-panel-name { font-size: clamp(26px, 2.3vw, 34px); }
.fighter-panel-title { font-size: 12px; }
.fighter-panel-bio { font-size: 12px; line-height: 1.75; color: #a79eb0; }
.stat-list { gap: 9px; }
.stat-list > div { font-size: 12px; }
.stat-list span { width: 34px; }
.stat-list i { height: 6px; background: rgba(0, 0, 0, .4); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.stat-list i b { box-shadow: 0 0 10px color-mix(in srgb, var(--pc), transparent 50%); }
.stat-list em { font-size: 13px; width: 14px; }
.panel-moves small { font-size: 11px; flex-basis: 46px; }
.panel-moves b { font-size: 12px; }

.char-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 244, 209, .12);
  background:
    radial-gradient(ellipse 90% 60% at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--cc, var(--yellow)), transparent 78%), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 40%),
    linear-gradient(160deg, color-mix(in srgb, var(--cc, var(--yellow)), #1b1420 80%), #110d17 82%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 20px 40px rgba(0, 0, 0, .35);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform .35s var(--ease), border-color .25s, box-shadow .3s;
  will-change: transform;
}
.char-card:hover:not(.is-locked) { --ty: -8px; border-color: rgba(255, 246, 209, .35); box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 34px 60px rgba(0, 0, 0, .5), 0 0 60px color-mix(in srgb, var(--cc), transparent 82%); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px); }
.char-card.is-tilting { transition: transform .08s linear, border-color .25s, box-shadow .3s; }
/* 扫光：随鼠标位置的高光 */
.char-card .card-shine {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle 220px at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .22), transparent 65%);
  mix-blend-mode: soft-light;
}
.char-card:hover .card-shine { opacity: 1; }
.card-art img { filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .45)) saturate(1.05); transition: transform .4s var(--ease), filter .3s; }
.char-card:hover:not(.is-locked) .card-art img { transform: translate3d(calc((var(--mx-n, 0)) * -8px), 0, 0) scale(1.02); filter: drop-shadow(0 26px 24px rgba(0, 0, 0, .5)) saturate(1.1) brightness(1.04); }
.card-index { font-size: 12px; top: 13px; left: 15px; }
.card-glow { height: 58%; background: linear-gradient(to top, rgba(7, 5, 10, .96) 8%, rgba(7, 5, 10, .55) 55%, transparent); }
.card-info { left: 16px; right: 16px; bottom: 46px; }
.card-info b { font-size: clamp(20px, 1.9vw, 27px); text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.card-info small { font-size: 11px; }
.card-info em { font-size: 12px; color: #c0b6c5; }
.card-stats { left: 16px; right: 16px; bottom: 14px; gap: 6px; }
.card-stats i { font-size: 11px; padding: 4px 8px; border-radius: 100px; background: rgba(0, 0, 0, .35); color: #d3c9d8; border-color: rgba(255, 255, 255, .14); }
.card-pick-card { font-size: 12px; min-width: 32px; height: 26px; border-radius: 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); animation: p-stamp .4s var(--spring) both; }
@keyframes p-stamp { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(2deg); opacity: 1; } }
.char-card.picked-p1 { box-shadow: inset 0 0 0 2px var(--yellow), 0 0 0 4px rgba(255, 210, 63, .1), 0 24px 50px rgba(0, 0, 0, .45), 0 0 60px rgba(255, 210, 63, .2); }
.char-card.picked-p2 { box-shadow: inset 0 0 0 2px var(--red), 0 0 0 4px rgba(255, 59, 78, .1), 0 24px 50px rgba(0, 0, 0, .45), 0 0 60px rgba(255, 59, 78, .18); }
.char-card.is-locked { filter: grayscale(.9) brightness(.8); }
.char-card.is-locked .card-soon { font-size: 13px; backdrop-filter: blur(6px); }
.char-card:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.select-status { font-size: 13px; }
.select-actions .ghost-btn { font-size: 13px; min-height: 42px; padding: 0 16px; }
.ready-btn { min-height: 48px; min-width: 150px; font-size: 15px; }
.select-controls-strip { font-size: 11px; gap: 14px; color: #8d8496; }
.select-controls-strip kbd { min-width: 22px; height: 21px; font-size: 11px; }
.select-bg-word { -webkit-text-stroke: 1.5px rgba(255, 246, 209, .06); }

/* =========================================================
   战斗页 UI 层
   ========================================================= */
.battle-hint { font-size: 11px; padding: 9px 18px; gap: 14px; border-radius: 100px; background: rgba(8, 6, 11, .55); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 12px 30px rgba(0, 0, 0, .4); color: rgba(255, 255, 255, .7); }
.battle-hint kbd { min-width: 20px; height: 20px; font-size: 10px; }
.net-status { font-size: 11px; padding: 6px 12px; }
.battle-icon-btn { width: 40px; height: 40px; }
.battle-icon-btn svg { width: 17px; height: 17px; }
.battle-overlay { background: radial-gradient(ellipse at center, rgba(8, 5, 12, .55), rgba(4, 3, 6, .85)); backdrop-filter: blur(14px) saturate(.8); }
.pause-card, .confirm-card, .thanks-card {
  border-radius: 22px; background: var(--glass); box-shadow: var(--lift);
  animation: p-card-in .45s var(--spring) both;
}
@keyframes p-card-in { from { opacity: 0; transform: translateY(24px) scale(.92); } to { opacity: 1; transform: none; } }
.pause-card::before { left: 0; right: 0; width: auto; height: 2px; background: linear-gradient(90deg, var(--yellow), transparent 70%); }
.pause-card { overflow: hidden; }
.pause-card h2 { font-size: 36px; }
.pause-card p, .confirm-card p, .thanks-card p { font-size: 14px; }
.pause-online-note { font-size: 12px !important; }
.tbtn { box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 8px 20px rgba(0, 0, 0, .35); }
.tbtn.is-down { box-shadow: 0 0 24px rgba(255, 210, 63, .5); }

/* =========================================================
   结算页
   ========================================================= */
.result-screen { background:
    radial-gradient(ellipse 50% 60% at 22% 52%, rgba(255, 184, 25, .22), transparent 70%),
    radial-gradient(ellipse 40% 40% at 88% 14%, rgba(255, 72, 45, .12), transparent 70%),
    linear-gradient(125deg, #130e18, #08060b); }
.result-bg span { -webkit-text-stroke: 1.5px rgba(255, 210, 63, .07); }
.winner-crown { font-size: 15px; letter-spacing: .32em; text-shadow: 0 0 24px rgba(255, 210, 63, .5); }
.winner-img-wrap::before { background: radial-gradient(circle, rgba(255, 198, 37, .32), transparent 66%); animation: p-breathe 5s ease-in-out infinite; }
.winner-img-wrap::after { background: rgba(0, 0, 0, .6); filter: blur(12px); }
.winner-meta > span { font-size: 13px; }
.winner-meta p { font-size: 14px; color: #bbb0c3; }
.win-pips i { width: 36px; height: 7px; }
.win-pips i.on { background: var(--gold); box-shadow: 0 0 16px rgba(255, 210, 63, .5); }
.result-panel {
  border-radius: 22px; border: 1px solid rgba(255, 244, 209, .13);
  background: var(--glass); box-shadow: var(--lift);
  backdrop-filter: blur(26px) saturate(1.3); overflow: hidden;
}
.result-panel::before { left: 0; right: 0; width: auto; height: 2px; background: linear-gradient(90deg, var(--yellow), transparent 70%); }
.result-panel h2 { background: linear-gradient(180deg, #fff6d0, #ffd23f 80%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .3)); }
.result-stats { border-radius: 16px; overflow: hidden; border: 0; gap: 1px; background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.result-stats > div { background: linear-gradient(160deg, #1d1724, #130f19); min-height: 92px; transition: background .25s; }
.result-stats > div:hover { background: linear-gradient(160deg, #272031, #17121e); }
.result-stats small { font-size: 12px; }
.result-stats b { font-size: 32px; background: linear-gradient(180deg, #fff6d0, #ffd23f); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.result-stats b em { font-size: 11px; -webkit-text-fill-color: #8d8395; }
.result-vs { font-size: 13px; border-radius: 12px; }
.result-actions .cta-btn { font-size: 15px; min-height: 50px; }
.result-actions .ghost-btn { font-size: 13px; min-height: 50px; }
.rematch-status { font-size: 12px; }
.result-foot { font-size: 11px; }
.result-opponent, .result-social { border-radius: 16px; }
.result-opponent-meta small { font-size: 10px; }
.result-opponent-meta b { font-size: 15px; }
.result-opponent-meta span { font-size: 11px; }
.result-opponent .ghost-btn { font-size: 12px; padding: 8px 12px; }
.result-taunts button { font-size: 12px; padding: 7px 12px; transition: .2s var(--spring); }
.result-taunts button:hover { background: rgba(255, 214, 94, .16); transform: translateY(-2px); }
.result-chat-row input { font-size: 13px; border-radius: 10px; padding: 10px 12px; }
.result-social-note { font-size: 11px; }
.result-rank { font-size: 13px; border-radius: 12px; }

/* 胜利彩屑 */
.p-confetti { position: fixed; inset: 0; z-index: 45; pointer-events: none; overflow: hidden; }
.p-confetti i {
  position: absolute; top: -20px; left: var(--x); width: var(--w); height: var(--h);
  background: var(--c); border-radius: 2px; opacity: 0;
  animation: p-fall var(--d) var(--delay) cubic-bezier(.3, .6, .5, 1) forwards;
}
@keyframes p-fall {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--dx), 108vh, 0) rotate(var(--rot)); }
}

/* =========================================================
   弹窗 / toast
   ========================================================= */
.modal-backdrop { background: radial-gradient(ellipse at center, rgba(8, 5, 12, .6), rgba(4, 3, 6, .88)); backdrop-filter: blur(14px) saturate(.85); }
.modal-card { border-radius: 24px; background: var(--glass); box-shadow: var(--lift); animation: p-card-in .45s var(--spring) both; }
.modal-card::before { left: 0; right: 0; width: auto; height: 2px; background: linear-gradient(90deg, var(--yellow), transparent 60%); }
.modal-close { width: 36px; height: 36px; font-size: 26px; background: rgba(255, 255, 255, .05); }
.guide-head h2 { font-size: clamp(26px, 3vw, 38px); }
.guide-head p { font-size: 13px; line-height: 1.85; color: #b0a6b8; }
.guide-col h3 { font-size: 14px; }
.guide-col h3 span { font-size: 11px; border-radius: 4px; }
.key-row { font-size: 12px; min-height: 38px; }
.tip-line i { font-size: 12px; }
.tip-line p { font-size: 12px; line-height: 1.75; color: #a198a9; }
.guide-move { border-radius: 14px; padding: 14px; transition: .2s; }
.guide-move:hover { background: rgba(255, 255, 255, .05); border-color: var(--line-strong); transform: translateY(-2px); }
.guide-move .gm-name { font-size: 13px; }
.guide-move small { font-size: 11px; }
.guide-move b { font-size: 11px; }
.modal-foot { font-size: 12px; }
.small-modal p { font-size: 14px; }
.toast { font-size: 13px; padding: 12px 18px; border-radius: 14px; background: linear-gradient(160deg, rgba(40, 32, 51, .95), rgba(20, 15, 27, .95)); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 18px 40px rgba(0, 0, 0, .5); }

kbd { border-radius: 7px; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 2px 0 rgba(0, 0, 0, .4); }

/* =========================================================
   界面转场：斜切百叶
   ========================================================= */
.p-wipe { position: fixed; inset: 0; z-index: 900; pointer-events: none; display: none; }
.p-wipe.run { display: block; }
.p-wipe i { position: absolute; top: -10%; bottom: -10%; width: 22%; transform: skewX(-14deg) scaleY(0); transform-origin: top; background: linear-gradient(180deg, #ffd23f, #ff9a1f); box-shadow: 0 0 60px rgba(255, 170, 30, .4); }
.p-wipe i:nth-child(1) { left: -6%; }
.p-wipe i:nth-child(2) { left: 16%; }
.p-wipe i:nth-child(3) { left: 38%; }
.p-wipe i:nth-child(4) { left: 60%; }
.p-wipe i:nth-child(5) { left: 82%; }
.p-wipe.run i { animation: p-wipe .62s cubic-bezier(.7, 0, .3, 1) both; }
.p-wipe.run i:nth-child(2) { animation-delay: .04s; }
.p-wipe.run i:nth-child(3) { animation-delay: .08s; }
.p-wipe.run i:nth-child(4) { animation-delay: .12s; }
.p-wipe.run i:nth-child(5) { animation-delay: .16s; }
@keyframes p-wipe {
  0% { transform: skewX(-14deg) scaleY(0); transform-origin: top; }
  45% { transform: skewX(-14deg) scaleY(1); transform-origin: top; }
  55% { transform: skewX(-14deg) scaleY(1); transform-origin: bottom; }
  100% { transform: skewX(-14deg) scaleY(0); transform-origin: bottom; }
}

/* ---------- 响应式补充 ---------- */
@media (max-width: 820px) {
  .menu-card { translate: none; }
  .menu-label b { font-size: 19px; }
  .title-desc { font-size: 13px; }
  .select-controls-strip { display: none; }
  .char-card { transform: none; }
  .char-card:hover:not(.is-locked) { transform: translateY(-4px); }
  .card-info em { font-size: 11px; }
  .modal-card { border-radius: 18px; }
  .battle-icon-btn { width: 36px; height: 36px; }
}
@media (hover: none) {
  .char-card { transform: none; }
  .hero img { -webkit-box-reflect: unset; }
}
@media (prefers-reduced-motion: reduce) {
  .p-wipe, .p-confetti { display: none !important; }
  .title-bg::after { animation: none !important; }
}

/* ---------- 联机页：矮屏自适应（让底部提示条不被挤出屏幕） ---------- */
@media (min-width: 821px) {
  .online-layout { align-items: safe center; overflow-y: auto; min-height: 0; padding: 22px 0 16px; }
  .online-art { height: min(640px, 62vh); }
}
@media (min-width: 821px) and (max-height: 960px) {
  .online-panel { padding: 28px clamp(26px, 3.4vw, 40px); }
  .online-panel h2 { margin: 12px 0 8px; }
  .panel-desc { margin-bottom: 16px; }
  .nick-row { margin-bottom: 14px; }
  .p2p-option { margin-bottom: 10px; padding: 8px 10px; }
  .mode-tabs { margin-bottom: 14px; }
  .cta-btn.big { min-height: 60px; }
  .lobby-rooms-wrap { margin-top: 10px; padding-top: 10px; }
  .lobby-rooms { max-height: 120px; }
  .online-bottom { padding-bottom: 16px; }
}

/* ---------- 手机：顶栏只留最关键的状态，避免挤成竖排 ---------- */
@media (max-width: 820px) {
  .brand-mini { white-space: nowrap; flex: 0 0 auto; }
  .topbar-right { gap: 8px; min-width: 0; }
  .topbar-right .net-pill.latency-pill, .topbar-right .net-pill.online-pill { display: none; }
  .topbar-right .net-pill { min-height: 32px; padding: 0 11px; font-size: 11px; }
  .topbar { gap: 10px; }
}
