/* ============================================================
   5V5 格斗 · 移动端大厅 / 对战
   ============================================================ */

:root {
  --gold: #FFC24A;
  --gold-light: #FFE7A0;
  --gold-deep: #FF7A12;
  --theme: #FF8A3D;
  --ink: #050914;
  --panel: #0B1430;
  --text: #F4F7FF;
  --muted: #90A0C2;
  --cyan: #5AE8FF;
  --red: #FF4D5E;
  --green: #38E0A5;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  background: #02040B;
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .32s ease, transform .45s cubic-bezier(.2, .8, .2, 1), visibility .32s;
}

.screen.is-active {
  visibility: visible;
  opacity: 1;
  transform: none;
}

/* ============================================================
   大厅
   ============================================================ */

.home {
  background: #050914;
  overflow: hidden;
}

.home-art {
  position: absolute;
  inset: -4% -10%;
  background: #0a1430 url("images/gen/arena.jpg") 44% 52% / auto 110% no-repeat;
  filter: saturate(1.16) contrast(1.04) brightness(1.02);
  transform: scale(1.04);
  animation: slowZoom 22s ease-in-out infinite alternate;
  will-change: transform;
}

.home-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 17, .76) 0%, rgba(3, 7, 17, .18) 13%, transparent 30%, transparent 72%, rgba(3, 7, 17, .18) 88%, rgba(3, 7, 17, .76) 100%),
    radial-gradient(74% 42% at 52% 24%, rgba(255, 176, 96, .08), transparent 68%);
}

.home-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(130% 55% at 50% 17%, rgba(88, 155, 255, .12), transparent 66%),
    linear-gradient(180deg, rgba(4, 8, 20, .94) 0%, rgba(4, 8, 20, .58) 9%, rgba(4, 8, 20, .12) 22%, rgba(4, 8, 20, 0) 36%),
    linear-gradient(0deg, #050914 0%, #050914 24%, rgba(5, 9, 20, .97) 32%, rgba(5, 9, 20, .78) 40%, rgba(5, 9, 20, .26) 52%, transparent 64%);
}

.home-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 22% at 50% 86%, rgba(255, 146, 45, .22), transparent 72%),
    linear-gradient(90deg, rgba(2, 5, 14, .5), transparent 14%, transparent 86%, rgba(2, 5, 14, .5));
}

.home-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: calc(var(--safe-top) + 12px) 14px 0;
}

.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  text-align: left;
  padding: 0;
  border-radius: 14px;
  transition: transform .15s ease;
}

.profile:active {
  transform: scale(.97);
}

.avatar-ring {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  padding: 2px;
  border-radius: 15px;
  background: linear-gradient(145deg, #FFE8A8, #FFB12E 45%, #B96400);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 226, 150, .3);
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(8, 12, 24, .55);
}

.lv-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 21px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, #47EFA9, #11A874);
  border: 1.5px solid #0A1326;
  color: #062F1F;
  font-size: 9px;
  font-weight: 900;
  line-height: 13px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.profile-name {
  display: block;
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #FFF;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .75);
}

.profile-sub {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lv-text {
  font-size: 9px;
  font-weight: 700;
  color: #C7D5F5;
  letter-spacing: .3px;
}

.xp-bar {
  display: block;
  width: 70px;
  height: 4px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(5, 10, 24, .72);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6);
}

.xp-bar i {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #42DBFF, #5A8BFF);
  box-shadow: 0 0 8px rgba(80, 180, 255, .8);
}

.home-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  color: #E1EAFF;
  background: rgba(7, 13, 28, .52);
  border: 1px solid rgba(190, 210, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 4px 10px rgba(0, 0, 0, .24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .12s ease, background .15s ease;
}

.icon-btn .mp-icon {
  width: 17px;
  height: 17px;
}

.icon-btn:active {
  transform: scale(.92);
  background: rgba(28, 44, 82, .8);
}

.icon-btn.armed {
  color: #FF8A96;
  border-color: rgba(255, 100, 120, .5);
  background: rgba(70, 12, 24, .7);
}

.wallet {
  display: flex;
  gap: 5px;
}

.cur {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 8px;
  border-radius: 13px;
  background: rgba(6, 11, 25, .62);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cur .mp-icon {
  width: 13px;
  height: 13px;
}

.cur b {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums;
  color: #FFF;
}

.cur-gold {
  border-color: rgba(255, 196, 80, .34);
}

.cur-gold .mp-icon {
  color: #FFC64F;
  filter: drop-shadow(0 0 4px rgba(255, 185, 45, .6));
}

.cur-gem .mp-icon {
  color: #C084FF;
  filter: drop-shadow(0 0 4px rgba(175, 105, 255, .65));
}

.season-badge {
  position: absolute;
  z-index: 4;
  left: 15px;
  top: calc(var(--safe-top) + 112px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 7px;
  border-radius: 4px 12px 12px 4px;
  color: #FFDFA0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(90deg, rgba(14, 24, 48, .88), rgba(14, 24, 48, .3));
  border: 1px solid rgba(255, 205, 115, .26);
  border-left: 2px solid #FFBA3D;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.season-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FFC24A;
  box-shadow: 0 0 8px #FFC24A;
}

.embers {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: 18%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #FFD580;
  opacity: 0;
  box-shadow: 0 0 5px 1px rgba(255, 185, 80, .65);
  animation: emberFloat linear infinite;
}

/* ---------- 大厅底部 ---------- */

.home-bottom {
  position: relative;
  z-index: 6;
  margin-top: auto;
  padding: 0 16px calc(var(--safe-bottom) + 12px);
}

.mode-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.mode-emblem {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #2A1500;
  background: linear-gradient(160deg, #FFE9A8, #FFA92E 62%, #D06A00);
  box-shadow: 0 0 12px rgba(255, 165, 45, .38), inset 0 1px 0 rgba(255, 255, 255, .6);
}

.mode-emblem .mp-icon {
  width: 15px;
  height: 15px;
}

.mode-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.4px;
  color: #FFD98F;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
  white-space: nowrap;
}

.mode-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 205, 120, .42), transparent);
}

.mode-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  letter-spacing: 1px;
  color: #9FB0D2;
  white-space: nowrap;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #44E2A4;
  box-shadow: 0 0 7px #44E2A4;
  animation: livePulse 2s ease-in-out infinite;
}

.team-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 7px;
}

.team-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: #E7EDFF;
}

.team-tip {
  font-size: 8px;
  color: #7E8DAE;
  letter-spacing: .1px;
}

.team-power {
  margin-left: auto;
  font-size: 9px;
  color: #8D9BBA;
  letter-spacing: .3px;
}

.team-power b {
  color: #FFD27A;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.team-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 4px 3px 5px;
  border-radius: 11px;
  color: #FFF;
  background: linear-gradient(180deg, rgba(30, 44, 82, .92), rgba(9, 15, 33, .96));
  border: 1px solid rgba(128, 162, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 6px 14px rgba(0, 0, 0, .32);
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), border-color .16s ease, box-shadow .16s ease;
  touch-action: manipulation;
}

.hero-card:active {
  transform: scale(.95);
}

.hero-card.is-active {
  border-color: rgba(255, 204, 100, .9);
  background: linear-gradient(180deg, rgba(72, 54, 35, .94), rgba(23, 18, 20, .98));
  box-shadow: 0 0 0 1px rgba(255, 204, 100, .55), 0 8px 20px rgba(255, 137, 30, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
  transform: translateY(-2px);
}

.hero-av {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #101B38;
}

.hero-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform .25s ease;
}

.hero-card.is-active .hero-av {
  box-shadow: inset 0 0 0 1px rgba(255, 224, 160, .7);
}

.hero-card.is-active .hero-av img {
  transform: scale(1.1);
}

.hero-crown {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 15px;
  height: 15px;
  padding: 2px;
  border-radius: 50%;
  color: #2A1500;
  background: linear-gradient(150deg, #FFECA8, #FFB02E);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .18s ease, transform .25s cubic-bezier(.2, 1.4, .4, 1);
}

.hero-card.is-active .hero-crown {
  opacity: 1;
  transform: scale(1);
}

.hero-card b {
  display: block;
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #EDF2FF;
}

.hero-card small {
  display: block;
  margin-top: 1px;
  font-size: 8.5px;
  letter-spacing: .5px;
  color: #93A3C3;
}

.hero-card.is-active b {
  color: #FFDA92;
}

.record-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 9.5px;
  color: #93A1C0;
  letter-spacing: .2px;
  white-space: nowrap;
}

.record-line b {
  color: #FFD479;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.record-line .mp-icon {
  width: 12px;
  height: 12px;
  margin-right: 2px;
  color: #FFC24A;
  vertical-align: -2px;
}

.record-dot {
  opacity: .4;
}

.record-best {
  margin-left: auto;
  color: #8290AE;
}

.record-best .mp-icon {
  color: #FF8A3D;
}

.battle-btn-wrap {
  position: relative;
  margin-top: 10px;
  filter: drop-shadow(0 10px 22px rgba(255, 122, 18, .3));
}

.battle-btn-wrap::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -7px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 128, 20, .34);
  filter: blur(9px);
}

.battle-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: clamp(60px, 8.4vh, 74px);
  padding: 0 17px 0 13px;
  overflow: hidden;
  text-align: left;
  clip-path: polygon(18px 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 18px 100%, 0 50%);
  background:
    linear-gradient(104deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 19%),
    linear-gradient(180deg, #FFF3C7 0%, #FFD664 21%, #FFA82C 57%, #EE790A 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .7),
    inset 0 -4px 0 rgba(148, 65, 0, .4),
    inset 0 0 0 1px rgba(255, 238, 180, .7);
  transition: transform .12s ease, filter .12s ease;
  touch-action: manipulation;
}

.battle-btn::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -34%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: skewX(-22deg);
  animation: btnShine 4.2s ease-in-out infinite;
}

.battle-btn:active {
  transform: scale(.975) translateY(2px);
  filter: brightness(.96);
}

.btn-crest {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  color: #FFD67E;
  background: radial-gradient(circle at 35% 28%, #56330E, #231003 68%);
  border: 1.5px solid rgba(255, 244, 197, .75);
  box-shadow: 0 3px 8px rgba(74, 31, 0, .35), inset 0 0 12px rgba(255, 175, 50, .25);
}

.btn-crest .mp-icon {
  width: 25px;
  height: 25px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5));
}

.btn-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.btn-copy b {
  display: block;
  font-size: clamp(21px, 6.2vw, 26px);
  font-weight: 900;
  letter-spacing: 1.2px;
  line-height: 1.08;
  color: #2A1400;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}

.btn-copy small {
  display: block;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .9px;
  color: rgba(61, 30, 0, .72);
}

.btn-go {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  color: #3C1C00;
  background: rgba(63, 27, 0, .15);
  border: 1px solid rgba(78, 34, 0, .2);
}

.btn-go .mp-icon {
  width: 19px;
  height: 19px;
}

.battle-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: .7px;
  color: #7D8CAD;
}

/* ============================================================
   对战
   ============================================================ */

.battle {
  padding: calc(var(--safe-top) + 8px) 12px calc(var(--safe-bottom) + 10px);
  background: #040712;
  overflow: hidden;
}

.battle-bg {
  position: absolute;
  inset: -3%;
  background: #071026 url("images/gen/arena.jpg") 50% 44% / auto 140% no-repeat;
  filter: saturate(1.12) brightness(.38) contrast(1.12) blur(4px);
  transform: scale(1.08);
  animation: battleZoom 24s ease-in-out infinite alternate;
  will-change: transform;
}

.battle-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 36% at 50% 44%, rgba(86, 146, 255, .13), transparent 72%),
    radial-gradient(120% 74% at 50% 46%, transparent 30%, rgba(3, 6, 16, .72) 76%, rgba(3, 6, 16, .97) 100%),
    linear-gradient(180deg, rgba(4, 8, 20, .94) 0%, rgba(4, 8, 20, .35) 20%, rgba(4, 8, 20, .12) 40%, rgba(4, 8, 20, .5) 64%, rgba(4, 8, 20, .86) 82%, rgba(4, 8, 20, .99) 100%);
}

.battle-top {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
}

.timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 110px;
  padding: 3px 16px 4px;
  border-radius: 14px;
  background: rgba(5, 10, 23, .55);
  border: 1px solid rgba(160, 190, 255, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.timer span {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
  color: #FFF;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(110, 180, 255, .55);
}

.timer small {
  font-size: 7px;
  letter-spacing: 2px;
  color: #8EA1C9;
}

.timer.is-low span {
  color: #FF7A86;
  animation: lowTime 1s ease-in-out infinite;
}

.scorebar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 16px;
  min-width: 202px;
  margin-top: 8px;
  padding: 4px 17px;
  border-radius: 22px;
  background: rgba(6, 12, 27, .55);
  border: 1px solid rgba(140, 175, 255, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.score-side {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 48px;
}

.score-side b {
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-side small {
  font-size: 8px;
  letter-spacing: 1px;
  color: #8D9CBB;
}

.score-ally {
  justify-content: flex-end;
}

.score-ally b {
  color: #FFD16C;
  text-shadow: 0 0 10px rgba(255, 183, 52, .45);
}

.score-enemy b {
  color: #FF6E7C;
  text-shadow: 0 0 10px rgba(255, 70, 90, .4);
}

.score-mode {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  border-left: 1px solid rgba(255, 255, 255, .12);
  border-right: 1px solid rgba(255, 255, 255, .12);
  height: 20px;
}

.score-mode .mp-icon {
  width: 13px;
  height: 13px;
  color: #FFC24A;
}

.score-mode b {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .6px;
  color: #E9F0FF;
}

.battle-team {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  flex: 0 0 auto;
}

.enemy-team {
  margin-top: 12px;
}

.ally-team {
  margin-bottom: 2px;
}

.unit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 0;
  color: #FFF;
  touch-action: manipulation;
  transition: opacity .25s ease, filter .25s ease, transform .12s ease;
  -webkit-user-select: none;
  user-select: none;
}

.unit:active {
  transform: scale(.94);
}

.unit-av {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 2px;
  border-radius: 12px;
  background: linear-gradient(155deg, #FFDF97, #FF9A25 55%, #7D3D00);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 217, 143, .28);
  overflow: hidden;
}

.unit-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(6, 10, 20, .55);
  filter: saturate(1.04);
}

.enemy .unit-av {
  background: linear-gradient(155deg, #FF8D8D, #D32644 52%, #4B0817);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 107, 120, .4), 0 0 14px rgba(255, 50, 80, .18);
}

.enemy .unit-av::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 210, 200, .18);
  pointer-events: none;
}

.unit-hp {
  display: block;
  width: 100%;
  height: 5px;
  padding: 1px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(3, 7, 16, .8);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .07);
}

.unit-hp i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #61FFD0, #17CE8F);
  box-shadow: 0 0 6px rgba(40, 230, 160, .6);
  transition: width .18s ease-out;
}

.enemy .unit-hp i {
  background: linear-gradient(90deg, #FFA46E, #FF3B52);
  box-shadow: 0 0 6px rgba(255, 60, 80, .6);
}

.unit-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .1px;
  color: #EEF3FF;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}

.unit-role {
  display: block;
  margin-top: -1px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #A2B0CC;
}

.ally .unit-crown {
  display: none;
}

.ally .unit.is-leader .unit-crown {
  display: block;
}

.unit-crown {
  position: absolute;
  z-index: 3;
  top: -8px;
  left: 50%;
  width: 15px;
  height: 15px;
  margin-left: -7.5px;
  color: #2A1500;
  background: linear-gradient(150deg, #FFF0B0, #FFB12E);
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .5);
}

.ally .unit.is-leader .unit-av {
  background: linear-gradient(155deg, #FFF2BA, #FFC24A 42%, #FF7A12);
  box-shadow: 0 0 0 1px rgba(255, 231, 160, .9), 0 0 16px rgba(255, 168, 50, .5), 0 5px 14px rgba(0, 0, 0, .5);
}

.ally .unit.is-leader .unit-name {
  color: #FFD98E;
}

.unit.is-dead {
  opacity: .34;
  filter: grayscale(1);
}

.unit.is-dead .unit-crown {
  display: none;
}

.enemy-team.is-stunned .unit-av {
  filter: saturate(.5) brightness(.85) hue-rotate(170deg);
  animation: stunnedPulse .5s ease-in-out infinite alternate;
}

.unit.is-dead .unit-av::before {
  content: "KO";
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(4, 7, 16, .66);
  color: #FF6B78;
  font-size: 14px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 50, 70, .8);
}

.unit.is-dead .unit-hp i {
  width: 0 !important;
}

.unit.is-hit .unit-av {
  animation: unitHit .22s ease-out;
}

.unit.is-hit .unit-name {
  color: #FF9AA4;
}

.unit.attack-up {
  animation: lungeUp .24s ease-out;
}

.unit.attack-down {
  animation: lungeDown .24s ease-out;
}

.enemy .unit-av .aim-corner {
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: rgba(255, 200, 200, .75);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}

.aim-tl { top: 3px; left: 3px; border-top-width: 1px !important; border-left-width: 1px !important; }
.aim-tr { top: 3px; right: 3px; border-top-width: 1px !important; border-right-width: 1px !important; }
.aim-bl { bottom: 3px; left: 3px; border-bottom-width: 1px !important; border-left-width: 1px !important; }
.aim-br { bottom: 3px; right: 3px; border-bottom-width: 1px !important; border-right-width: 1px !important; }

.center-zone {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin: 2px 0;
  overflow: hidden;
}

.center-zone::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(46vw, 195px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    repeating-conic-gradient(from 0deg, rgba(130, 180, 255, .12) 0deg 2deg, transparent 2deg 18deg),
    radial-gradient(circle, rgba(80, 140, 255, .12) 0%, rgba(60, 120, 240, .04) 44%, transparent 70%);
  border: 1px solid rgba(140, 185, 255, .12);
  box-shadow: inset 0 0 34px rgba(80, 140, 255, .12), 0 0 34px rgba(60, 120, 255, .06);
  animation: arenaSpin 34s linear infinite;
  pointer-events: none;
}

.center-zone::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(30vw, 124px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(255, 195, 90, .16);
  pointer-events: none;
}

.vs-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) skewX(-8deg);
  font-family: "Arial Black", Impact, var(--font);
  font-size: clamp(52px, 15vw, 72px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -4px;
  line-height: 1;
  color: rgba(213, 228, 255, .105);
  text-shadow: 0 0 34px rgba(80, 130, 255, .2);
  pointer-events: none;
}

.center-beams {
  position: absolute;
  inset: 12% 8%;
  pointer-events: none;
  opacity: .6;
  background:
    linear-gradient(102deg, transparent 46%, rgba(100, 160, 255, .1) 47%, transparent 49%),
    linear-gradient(78deg, transparent 52%, rgba(255, 160, 80, .08) 53%, transparent 55%);
  filter: blur(1px);
}

.combo {
  position: absolute;
  z-index: 5;
  top: 36%;
  left: 50%;
  display: none;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.combo.show {
  display: block;
  animation: comboPop .22s cubic-bezier(.2, 1.4, .4, 1);
}

.combo span {
  display: block;
  font-family: "Arial Black", Impact, var(--font);
  font-size: clamp(38px, 12vw, 52px);
  font-weight: 900;
  font-style: italic;
  line-height: .95;
  letter-spacing: -1px;
  color: #FFD66C;
  text-shadow: 0 2px 0 #A94E00, 0 0 18px rgba(255, 170, 40, .75), 0 4px 16px rgba(0, 0, 0, .6);
}

.combo small {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 5px;
  color: #FFE5AA;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}

.combo.hot span {
  color: #FFF3CC;
  text-shadow: 0 2px 0 #C23E00, 0 0 26px rgba(255, 110, 30, .95), 0 4px 16px rgba(0, 0, 0, .6);
}

.target-hint {
  position: absolute;
  z-index: 4;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 9px;
  letter-spacing: .8px;
  color: #C4D2F1;
  white-space: nowrap;
  background: rgba(5, 10, 24, .62);
  border: 1px solid rgba(140, 175, 255, .2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: hintPulse 2.2s ease-in-out infinite;
  transition: opacity .3s ease;
}

.target-hint.hidden {
  opacity: 0;
  visibility: hidden;
}

.battle-controls {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  margin: 0 -2px;
  padding: 10px 10px 3px;
  border-radius: 17px 17px 0 0;
  background: linear-gradient(180deg, rgba(7, 13, 28, .18) 0%, rgba(6, 11, 24, .82) 22%, rgba(4, 8, 19, .96) 100%);
  border-top: 1px solid rgba(150, 180, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 -14px 34px rgba(0, 0, 0, .22);
}

.energy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #A6B4D2;
}

.energy-head span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.energy-head .mp-icon {
  width: 13px;
  height: 13px;
  color: #FFC24A;
}

.energy-head b {
  color: #FFD16C;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.energy-bar {
  position: relative;
  height: 7px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(2, 6, 15, .8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8), 0 0 0 1px rgba(160, 190, 255, .12);
}

.energy-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3FDBFF 0%, #7AA8FF 45%, #FFD24A 100%);
  box-shadow: 0 0 10px rgba(90, 210, 255, .7);
  transition: width .16s ease-out;
}

.energy-bar.is-full i {
  animation: energyFull 1.2s ease-in-out infinite;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
}

.hint-copy {
  min-width: 0;
}

.hint-copy b {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #DDE6FF;
}

.hint-copy small {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  line-height: 1.45;
  color: #7F8EAD;
  letter-spacing: .1px;
}

.ult-btn {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin-top: -7px;
  border-radius: 50%;
  color: #91A0BE;
  background:
    radial-gradient(circle at 40% 30%, rgba(70, 95, 150, .55), transparent 55%),
    linear-gradient(180deg, #1A2748, #0A1124);
  border: 1.5px solid rgba(140, 172, 255, .28);
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, .1), 0 8px 18px rgba(0, 0, 0, .45);
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  touch-action: manipulation;
}

.ult-btn .mp-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 0;
}

.ult-btn b {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.25;
}

.ult-btn small {
  font-size: 6.5px;
  letter-spacing: .8px;
  opacity: .72;
}

.ult-btn:active {
  transform: scale(.94);
}

.ult-btn.ready {
  color: #351800;
  background:
    radial-gradient(circle at 38% 26%, #FFF7D0 0%, #FFDA79 24%, #FFAE2E 56%, #ED7607 100%);
  border-color: rgba(255, 246, 205, .9);
  box-shadow: 0 0 0 2px rgba(255, 190, 60, .22), 0 0 26px rgba(255, 170, 40, .6), 0 8px 20px rgba(0, 0, 0, .4);
  animation: ultReady 1.6s ease-in-out infinite;
}

.ult-btn.ready small {
  opacity: .78;
}

.ult-pulse {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 192, 70, .55);
  opacity: 0;
  pointer-events: none;
}

.ult-btn.ready .ult-pulse {
  animation: ultRing 1.6s ease-out infinite;
}

.battle-fx {
  position: absolute;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

/* ---------- 战斗特效 ---------- */

.strike-holder {
  position: absolute;
  height: 5px;
  transform-origin: 0 50%;
  pointer-events: none;
}

.strike {
  position: relative;
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 4px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #FFF5D0 68%, #FFF7E0 100%);
  box-shadow: 0 0 8px rgba(255, 220, 130, .95), 0 0 18px rgba(255, 150, 50, .6);
  animation: strikeLine .3s ease-out forwards;
}

.strike-holder .strike.ult-strike {
  height: 5px;
}

.strike.enemy-strike {
  background: linear-gradient(90deg, rgba(255, 120, 120, 0), #FF9A9A 68%, #FFE1E1 100%);
  box-shadow: 0 0 8px rgba(255, 100, 100, .9), 0 0 18px rgba(255, 50, 70, .55);
}

.strike.ult-strike {
  background: linear-gradient(90deg, rgba(255, 195, 70, 0), #FFF4C2 50%, #FFB93D 100%);
  box-shadow: 0 0 10px rgba(255, 220, 120, 1), 0 0 24px rgba(255, 150, 30, .8);
}

.fx-ult-title {
  position: absolute;
  top: 37%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(28px, 9vw, 38px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 4px;
  color: #FFF6CD;
  white-space: nowrap;
  text-shadow: 0 2px 0 #A64A00, 0 0 24px rgba(255, 175, 40, .9), 0 8px 24px rgba(0, 0, 0, .7);
  animation: ultTitleIn 1.1s cubic-bezier(.15, .8, .2, 1) forwards;
  pointer-events: none;
}

.fx-ult-title::before,
.fx-ult-title::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  margin: 0 10px 9px;
  background: linear-gradient(90deg, transparent, #FFD56E);
  vertical-align: middle;
}

.fx-ult-title::after {
  background: linear-gradient(90deg, #FFD56E, transparent);
}

.fx-burst {
  position: absolute;
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;
  border-radius: 50%;
  border: 2px solid rgba(255, 232, 164, .95);
  box-shadow: 0 0 18px rgba(255, 185, 60, .8), inset 0 0 18px rgba(255, 185, 60, .35);
  animation: burstOut .42s cubic-bezier(.1, .8, .2, 1) forwards;
}

.fx-burst.red {
  border-color: rgba(255, 130, 140, .95);
  box-shadow: 0 0 18px rgba(255, 60, 80, .8), inset 0 0 18px rgba(255, 60, 80, .3);
}

.fx-burst.ult {
  width: 130px;
  height: 130px;
  margin: -65px 0 0 -65px;
  border-width: 3px;
}

.fx-dmg {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: "Arial Black", Impact, var(--font);
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.5px;
  color: #FFF;
  text-shadow: 0 2px 0 rgba(70, 25, 0, .9), 0 0 12px rgba(255, 190, 80, .65), 0 3px 9px rgba(0, 0, 0, .65);
  white-space: nowrap;
  animation: dmgFloat .85s cubic-bezier(.15, .7, .3, 1) forwards;
  will-change: transform, opacity;
}

.fx-dmg.crit {
  font-size: 28px;
  color: #FFE07A;
  text-shadow: 0 2px 0 #A63A00, 0 0 18px rgba(255, 140, 30, .95), 0 4px 10px rgba(0, 0, 0, .7);
}

.fx-dmg.hurt {
  color: #FF9AA5;
  font-size: 18px;
  text-shadow: 0 2px 0 rgba(80, 0, 10, .9), 0 0 12px rgba(255, 60, 80, .7);
}

.fx-dmg.crit-label {
  font-size: 12px;
  font-style: normal;
  letter-spacing: 2px;
  color: #FFE49A;
  text-shadow: 0 1px 0 #8B3A00, 0 0 12px rgba(255, 170, 40, .9);
}

.fx-dmg.auto {
  font-size: 13px;
  font-style: normal;
  color: rgba(255, 240, 200, .9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .9);
}

.fx-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #FFE9A8;
  box-shadow: 0 0 10px 2px rgba(255, 180, 60, .85);
  animation: sparkPop .3s ease-out forwards;
}

.fx-ring {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 130, .8);
  animation: ringOut .5s ease-out forwards;
}

.battle.flash::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background: radial-gradient(circle at 50% 46%, rgba(255, 245, 205, .9), rgba(255, 170, 60, .3) 38%, transparent 72%);
  animation: flashScreen .45s ease-out forwards;
}

.battle.shake {
  animation: screenShake .24s linear;
}

.confetti {
  position: fixed;
  z-index: 120;
  top: -14px;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  opacity: .95;
  animation: confettiFall var(--dur, 2.2s) linear forwards;
}

/* ---------- 开战演出 ---------- */

.battle-intro {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(74% 48% at 50% 44%, rgba(255, 146, 58, .2), transparent 70%),
    radial-gradient(100% 72% at 50% 54%, rgba(26, 50, 108, .6), transparent 74%),
    rgba(2, 5, 14, .9);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  transition: opacity .24s ease, visibility .24s;
}

.battle-intro.show {
  visibility: visible;
  opacity: 1;
}

.battle-intro.hide {
  opacity: 0;
}

.intro-backdrop {
  position: absolute;
  inset: -10%;
  background: url("images/gen/arena.jpg") 48% 42% / auto 128% no-repeat;
  filter: blur(18px) saturate(1.3) brightness(.42);
  transform: scale(1.12);
  opacity: .75;
}

.intro-scanline {
  position: absolute;
  inset: 0;
  opacity: .24;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 4px);
  mask-image: linear-gradient(180deg, transparent, #000 26%, #000 74%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 26%, #000 74%, transparent);
}

.intro-stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  padding: 0 14px;
}

.intro-fighter {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  opacity: 0;
}

.intro-fighter.intro-ally {
  transform: translateX(-26px);
}

.intro-fighter.intro-enemy {
  transform: translateX(26px);
}

.battle-intro.show .intro-fighter.intro-ally {
  animation: introAllyIn .55s cubic-bezier(.18, .9, .22, 1.1) .05s forwards;
}

.battle-intro.show .intro-fighter.intro-enemy {
  animation: introEnemyIn .55s cubic-bezier(.18, .9, .22, 1.1) .05s forwards;
}

.intro-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-bottom: 7px;
  padding: 0 9px;
  border-radius: 11px;
  color: #FFD98F;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.4px;
  background: rgba(8, 14, 29, .8);
  border: 1px solid rgba(255, 200, 100, .35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .36);
}

.intro-enemy .intro-tag {
  color: #FFADB8;
  border-color: rgba(255, 104, 124, .4);
}

.intro-portrait {
  position: relative;
  display: block;
  width: min(31vw, 132px);
  aspect-ratio: 1 / 1.06;
  padding: 2px;
  border-radius: 18px;
  background: linear-gradient(155deg, #FFF0B5, #FFC24A 42%, #A75300 82%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .58), 0 0 24px rgba(255, 168, 50, .2), 0 0 0 1px rgba(255, 232, 172, .45);
  transform: rotate(-3deg);
}

.intro-enemy .intro-portrait {
  background: linear-gradient(155deg, #FFD0D5, #FF5C76 42%, #6D0718 82%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .58), 0 0 24px rgba(255, 54, 86, .22), 0 0 0 1px rgba(255, 175, 188, .4);
  transform: rotate(3deg);
}

.intro-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(6, 10, 20, .55);
}

.intro-fighter b {
  display: block;
  max-width: 100%;
  margin-top: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .8px;
  color: #FFE4A8;
  text-shadow: 0 2px 0 rgba(112, 44, 0, .5), 0 0 16px rgba(255, 178, 56, .35);
}

.intro-enemy b {
  color: #FFB1BB;
  text-shadow: 0 2px 0 rgba(94, 0, 18, .55), 0 0 16px rgba(255, 60, 90, .32);
}

.intro-vs {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 0 0 84px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  opacity: 0;
  transform: scale(.5) rotate(-8deg);
}

.battle-intro.show .intro-vs {
  animation: introVsIn .48s cubic-bezier(.2, 1.3, .35, 1) .18s forwards;
}

.intro-vs small {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 5px;
  color: #FFD27A;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}

.intro-vs b {
  font-family: "Arial Black", Impact, var(--font);
  font-size: clamp(38px, 11vw, 48px);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -2px;
  color: #FFF7DE;
  text-shadow: 0 2px 0 #8D3F00, 0 0 24px rgba(255, 142, 36, .9), 0 6px 18px rgba(0, 0, 0, .6);
}

.intro-vs span {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #A8B6D6;
}

.intro-start {
  position: absolute;
  z-index: 3;
  bottom: calc(var(--safe-bottom) + 32px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 82vw;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: #FFE0A0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
  animation: hintPulse 1.1s ease-in-out infinite;
}

.intro-start::before,
.intro-start::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin: 0 8px 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 205, 110, .85));
  vertical-align: middle;
}

.intro-start::after {
  background: linear-gradient(90deg, rgba(255, 205, 110, .85), transparent);
}

@keyframes introAllyIn {
  0% { opacity: 0; transform: translateX(-30px) scale(.92); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes introEnemyIn {
  0% { opacity: 0; transform: translateX(30px) scale(.92); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes introVsIn {
  0% { opacity: 0; transform: scale(.4) rotate(-10deg); }
  65% { opacity: 1; transform: scale(1.14) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* ---------- 结算 ---------- */

.result-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  visibility: hidden;
  opacity: 0;
  background: rgba(2, 5, 14, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity .3s ease, visibility .3s;
}

.result-overlay.show {
  visibility: visible;
  opacity: 1;
}

.result-card {
  position: relative;
  width: min(100%, 330px);
  padding: 23px 19px 18px;
  overflow: hidden;
  text-align: center;
  border-radius: 22px;
  background:
    radial-gradient(120% 54% at 50% -4%, rgba(255, 194, 74, .3), transparent 62%),
    linear-gradient(180deg, #14203F 0%, #0A1022 68%, #070C1A 100%);
  border: 1px solid rgba(255, 205, 120, .36);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .13);
  transform: translateY(18px) scale(.96);
  transition: transform .38s cubic-bezier(.2, .9, .2, 1);
}

.result-overlay.show .result-card {
  transform: none;
}

.result-card::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 235, 175, .9), transparent);
}

.result-card.defeat {
  background:
    radial-gradient(120% 54% at 50% -4%, rgba(255, 70, 95, .25), transparent 62%),
    linear-gradient(180deg, #261426 0%, #0D1020 68%, #070C1A 100%);
  border-color: rgba(255, 120, 138, .34);
}

.result-crest {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 9px;
  border-radius: 50%;
  color: #341900;
  background: linear-gradient(155deg, #FFF2BB, #FFC24A 48%, #EA7605);
  box-shadow: 0 0 0 4px rgba(255, 195, 70, .12), 0 8px 20px rgba(255, 140, 25, .35), inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: crestIn .5s cubic-bezier(.2, 1.4, .4, 1);
}

.result-crest .mp-icon {
  width: 30px;
  height: 30px;
}

.result-card.defeat .result-crest {
  color: #4A0714;
  background: linear-gradient(155deg, #FFC2CA, #FF6B7C 55%, #A50F2C);
  box-shadow: 0 0 0 4px rgba(255, 90, 110, .1), 0 8px 20px rgba(200, 30, 60, .28), inset 0 1px 0 rgba(255, 255, 255, .6);
}

.result-kicker {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #B9C7E8;
  opacity: .7;
}

.result-card h2 {
  margin: 1px 0 3px;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 6px;
  line-height: 1.15;
  color: #FFE09A;
  text-shadow: 0 2px 0 #8E4300, 0 0 26px rgba(255, 180, 50, .45);
}

.result-card.defeat h2 {
  color: #FF9AA6;
  text-shadow: 0 2px 0 #6A0B1B, 0 0 26px rgba(255, 60, 85, .32);
}

.result-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 27px;
  margin-bottom: 4px;
}

.result-stars .mp-icon {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, .14);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
  transition: color .2s ease, transform .2s ease;
}

.result-stars .mp-icon.on {
  color: #FFCE5C;
  filter: drop-shadow(0 0 8px rgba(255, 190, 60, .75));
  transform: scale(1.1);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 10px 0;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.result-stats div {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-stats div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(255, 255, 255, .1);
}

.result-stats b {
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  color: #FFF;
  font-variant-numeric: tabular-nums;
}

.result-stats small {
  font-size: 7.5px;
  letter-spacing: 1px;
  color: #8796B5;
}

.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  margin-bottom: 13px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(255, 188, 60, .1);
  border: 1px solid rgba(255, 195, 75, .32);
  color: #FFDD8F;
  font-size: 9px;
  letter-spacing: .5px;
}

.reward-chip .mp-icon {
  width: 15px;
  height: 15px;
  color: #FFC24A;
}

.reward-chip b {
  font-size: 13px;
  font-weight: 900;
  color: #FFE2A0;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-primary,
.btn-ghost {
  display: grid;
  place-items: center;
  width: 100%;
  height: 47px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  transition: transform .12s ease, filter .12s ease;
}

.btn-primary {
  color: #2B1500;
  background: linear-gradient(180deg, #FFF0B9, #FFC24A 42%, #F58A0C);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 7px 18px rgba(255, 130, 20, .28);
}

.btn-ghost {
  color: #C9D5F0;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(170, 195, 255, .2);
}

.btn-primary:active,
.btn-ghost:active {
  transform: scale(.97);
  filter: brightness(.96);
}

/* ============================================================
   通用浮层
   ============================================================ */

.toast {
  position: fixed;
  z-index: 130;
  top: 16%;
  left: 50%;
  max-width: 84vw;
  padding: 9px 17px;
  border-radius: 20px;
  transform: translate(-50%, -6px);
  visibility: hidden;
  opacity: 0;
  background: rgba(6, 12, 27, .93);
  border: 1px solid rgba(255, 205, 110, .32);
  color: #FFE1A2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  pointer-events: none;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(2, 5, 14, .76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  visibility: hidden;
  opacity: 0;
  transition: opacity .22s ease, visibility .22s;
}

.modal.show {
  visibility: visible;
  opacity: 1;
}

.modal-card {
  width: min(100%, 320px);
  padding: 20px 18px 17px;
  border-radius: 18px;
  background: linear-gradient(180deg, #16223F, #090F20);
  border: 1px solid rgba(255, 205, 120, .3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  transform: translateY(12px) scale(.97);
  transition: transform .25s ease;
}

.modal.show .modal-card {
  transform: none;
}

.modal-card h3 {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #FFE6B0;
}

.modal-card p {
  margin: 0 0 14px;
  font-size: 10px;
  line-height: 1.5;
  color: #8F9EBD;
}

.modal-card input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border-radius: 11px;
  background: rgba(3, 7, 17, .7);
  border: 1px solid rgba(160, 190, 255, .22);
  color: #FFF;
  font-size: 15px;
  letter-spacing: 1px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.modal-card input:focus {
  border-color: rgba(255, 200, 100, .7);
  box-shadow: 0 0 0 3px rgba(255, 180, 60, .12);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.modal-actions .btn-primary,
.modal-actions .btn-ghost {
  height: 43px;
  font-size: 13px;
}

/* ============================================================
   动效
   ============================================================ */

@keyframes arenaSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes slowZoom {
  from { transform: scale(1.04) translateY(0); }
  to { transform: scale(1.1) translateY(-1.2%); }
}

@keyframes battleZoom {
  from { transform: scale(1.04) translateY(0); }
  to { transform: scale(1.1) translateY(-1.4%); }
}

@keyframes btnShine {
  0%, 58% { left: -34%; opacity: 0; }
  64% { opacity: .9; }
  80%, 100% { left: 120%; opacity: 0; }
}

@keyframes emberFloat {
  0% { transform: translate3d(0, 0, 0) scale(.8); opacity: 0; }
  12% { opacity: .75; }
  70% { opacity: .5; }
  100% { transform: translate3d(var(--drift, 20px), -66vh, 0) scale(.2); opacity: 0; }
}

@keyframes livePulse {
  0%, 100% { opacity: .45; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes unitHit {
  0% { transform: translateX(0); filter: brightness(2.4) saturate(.4); }
  35% { transform: translateX(-3px); }
  70% { transform: translateX(2px); }
  100% { transform: translateX(0); filter: none; }
}

@keyframes lungeUp {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-9px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes lungeDown {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(8px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes strikeLine {
  0% { opacity: 0; transform: scaleX(.05); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: scaleX(1); }
}

@keyframes burstOut {
  0% { transform: scale(.15); opacity: 1; }
  100% { transform: scale(1.55); opacity: 0; }
}

@keyframes ringOut {
  0% { transform: scale(.4); opacity: .95; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes sparkPop {
  0% { transform: scale(.2); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes dmgFloat {
  0% { transform: translate(-50%, -30%) scale(.55); opacity: 0; }
  18% { transform: translate(-50%, -55%) scale(1.18); opacity: 1; }
  40% { transform: translate(-50%, -72%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -150%) scale(.92); opacity: 0; }
}

@keyframes ultTitleIn {
  0% { opacity: 0; transform: translate(-50%, -46%) scale(.72); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  30% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1.02); }
}

@keyframes stunnedPulse {
  from { filter: saturate(.4) brightness(.7) hue-rotate(150deg); }
  to { filter: saturate(.75) brightness(1) hue-rotate(180deg); }
}

@keyframes comboPop {
  0% { transform: translate(-50%, -50%) scale(1.4); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
}

@keyframes flashScreen {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes energyFull {
  0%, 100% { box-shadow: 0 0 8px rgba(90, 210, 255, .6); }
  50% { box-shadow: 0 0 16px rgba(255, 210, 80, .95); }
}

@keyframes ultReady {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

@keyframes ultRing {
  0% { transform: scale(.9); opacity: .8; }
  100% { transform: scale(1.28); opacity: 0; }
}

@keyframes hintPulse {
  0%, 100% { opacity: .62; }
  50% { opacity: 1; }
}

@keyframes lowTime {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes crestIn {
  0% { transform: scale(.4) rotate(-16deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes confettiFall {
  0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; }
  100% { transform: translate3d(var(--drift, 0), 105vh, 0) rotate(var(--spin, 540deg)); opacity: .15; }
}

/* ============================================================
   适配
   ============================================================ */

@media (max-height: 720px) {
  .battle-note { display: none; }
  .mode-line { margin-bottom: 8px; }
  .team-head { margin-bottom: 5px; }
  .record-line { margin-top: 7px; }
  .battle-btn-wrap { margin-top: 8px; }
  .battle-btn { height: 58px; }
  .btn-crest { width: 40px; height: 40px; }
  .btn-crest .mp-icon { width: 22px; height: 22px; }
  .btn-copy b { font-size: 22px; }
  .season-badge { top: calc(var(--safe-top) + 104px); }
  .enemy-team { margin-top: 8px; }
  .center-zone { min-height: 48px; }
  .hint-copy small { display: none; }
  .battle-controls { padding: 8px 8px 2px; }
  .ult-btn { width: 76px; height: 76px; }
  .intro-portrait { width: min(28vw, 108px); }
  .intro-fighter b { margin-top: 8px; font-size: 13px; }
  .intro-vs { flex-basis: 70px; }
  .intro-start { bottom: calc(var(--safe-bottom) + 22px); }
}

@media (max-height: 640px) {
  .season-badge { display: none; }
  .hero-card small { display: none; }
  .record-line { display: none; }
  .scorebar { margin-top: 5px; }
  .unit-role { display: none; }
  .unit-name { font-size: 8px; }
  .timer span { font-size: 18px; }
  .battle-btn { height: 54px; }
  .battle-note { display: none; }
  .center-zone { min-height: 34px; }
  .hint-copy b { font-size: 9.5px; }
}

@media (max-width: 352px) {
  .home-top {
    padding-left: 11px;
    padding-right: 11px;
  }

  .profile-name {
    max-width: 70px;
    font-size: 13px;
  }

  .cur {
    padding: 0 6px;
  }

  .cur b {
    font-size: 10px;
  }

  .home-bottom {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-card {
    padding-left: 2px;
    padding-right: 2px;
  }

  .hero-card b {
    font-size: 8.5px;
  }

  .team-tip {
    display: none;
  }
}

@media (min-width: 560px) {
  #app {
    left: 50%;
    right: auto;
    width: 480px;
    transform: translateX(-50%);
    box-shadow: 0 0 90px rgba(0, 0, 0, .85);
    border-left: 1px solid rgba(120, 150, 220, .12);
    border-right: 1px solid rgba(120, 150, 220, .12);
  }

  .home-bottom {
    padding-left: 20px;
    padding-right: 20px;
  }

  .home-top {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
