.battle-tool-shell {
  gap: 24px;
}

.battle-hero-panel {
  display: grid;
  gap: 18px;
  align-items: start;
}

.battle-hero-copy {
  display: grid;
  gap: 10px;
}

.battle-kicker,
.battle-center-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffb869;
}

.battle-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.battle-callout {
  border-color: rgba(255, 184, 105, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 184, 105, 0.16), rgba(255, 109, 72, 0.08)),
    rgba(16, 22, 30, 0.72);
}

.battle-arena {
  display: grid;
  gap: 18px;
}

.battle-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.84fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.battle-fighter-card,
.battle-center-panel,
.battle-round-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 27, 39, 0.94), rgba(10, 16, 24, 0.92));
  box-shadow: var(--shadow-soft);
}

.battle-fighter-card {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.battle-fighter-card::before,
.battle-center-panel::before,
.battle-round-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%);
}

.battle-fighter-card-player {
  border-color: rgba(106, 189, 255, 0.34);
}

.battle-fighter-card-player::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 178, 255, 0.28), transparent 68%);
  pointer-events: none;
}

.battle-fighter-card-server {
  border-color: rgba(255, 146, 104, 0.36);
}

.battle-fighter-card-server::after {
  content: "";
  position: absolute;
  inset: -110px auto auto -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 130, 92, 0.24), transparent 68%);
  pointer-events: none;
}

.battle-side-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
}

.battle-fighter-card h3,
.battle-center-panel h3,
.battle-round-card h4 {
  margin: 0;
}

.battle-side-subtitle,
.battle-verdict,
.battle-round-description,
.battle-round-note,
.battle-progress-label {
  margin: 0;
  color: var(--muted);
}

.battle-center-panel {
  padding: 24px;
  display: grid;
  gap: 18px;
  align-content: start;
  justify-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 189, 105, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(19, 30, 42, 0.96), rgba(10, 16, 24, 0.94));
}

.battle-versus-badge {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--button-text);
  background:
    linear-gradient(180deg, rgba(255, 186, 108, 0.96), rgba(255, 115, 75, 0.9));
  box-shadow:
    0 0 0 8px rgba(255, 186, 108, 0.1),
    0 18px 44px rgba(0, 0, 0, 0.34);
  animation: battle-versus-pulse 2.4s ease-in-out infinite;
}

@keyframes battle-versus-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 8px rgba(255, 186, 108, 0.1),
      0 18px 44px rgba(0, 0, 0, 0.34);
  }

  50% {
    transform: scale(1.04);
    box-shadow:
      0 0 0 12px rgba(255, 186, 108, 0.12),
      0 20px 52px rgba(0, 0, 0, 0.4);
  }
}

.battle-mode-picker {
  width: 100%;
  display: grid;
  gap: 10px;
}

.battle-mode-option {
  width: 100%;
}

.battle-mode-option span {
  justify-content: center;
  width: 100%;
}

.battle-control-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.battle-progress-shell {
  width: 100%;
  display: grid;
  gap: 10px;
}

.battle-progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

.battle-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #69beff, #ffb869);
  box-shadow: 0 0 22px rgba(105, 190, 255, 0.28);
  transition: width 260ms ease;
}

.battle-log-shell {
  position: relative;
  overflow: hidden;
}

.battle-log {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
}

.battle-log li {
  color: var(--text);
}

.battle-rounds-panel {
  display: grid;
  gap: 16px;
}

.battle-profile-panel {
  display: grid;
  gap: 16px;
}

.battle-round-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.battle-round-card {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.battle-round-card.is-active {
  border-color: rgba(255, 184, 105, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 184, 105, 0.14), var(--shadow-soft);
}

.battle-round-card.is-player-win {
  border-color: rgba(104, 191, 255, 0.44);
}

.battle-round-card.is-server-win {
  border-color: rgba(255, 125, 89, 0.42);
}

.battle-round-card.is-tie {
  border-color: rgba(178, 189, 203, 0.34);
}

.battle-round-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.battle-round-index {
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.battle-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.battle-result-badge.is-player-win {
  background: rgba(88, 178, 255, 0.2);
  color: #d9efff;
}

.battle-result-badge.is-server-win {
  background: rgba(255, 133, 96, 0.2);
  color: #ffe5dd;
}

.battle-result-badge.is-tie {
  background: rgba(180, 190, 201, 0.16);
}

.battle-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.battle-stat-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  display: grid;
  gap: 4px;
}

.battle-stat-card strong {
  font-size: 1rem;
}

.battle-stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.battle-meter {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.battle-meter-fill-player,
.battle-meter-fill-server {
  height: 100%;
}

.battle-meter-fill-player {
  background: linear-gradient(90deg, rgba(84, 174, 255, 0.4), rgba(84, 174, 255, 0.88));
  transform-origin: left center;
}

.battle-meter-fill-server {
  background: linear-gradient(90deg, rgba(255, 136, 95, 0.88), rgba(255, 136, 95, 0.4));
  transform-origin: right center;
  justify-self: end;
}

.battle-round-note strong {
  color: var(--text);
}

html[data-theme="light"] .battle-fighter-card,
html[data-theme="light"] .battle-center-panel,
html[data-theme="light"] .battle-round-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 252, 0.94));
}

html[data-theme="light"] .battle-callout {
  background:
    linear-gradient(135deg, rgba(255, 184, 105, 0.16), rgba(255, 109, 72, 0.08)),
    rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .battle-result-badge.is-player-win {
  color: #13406c;
}

html[data-theme="light"] .battle-result-badge.is-server-win {
  color: #78331b;
}

@media (max-width: 1140px) {
  .battle-stage {
    grid-template-columns: 1fr;
  }

  .battle-round-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .battle-center-panel,
  .battle-fighter-card,
  .battle-round-card {
    padding: 18px;
  }

  .battle-stat-grid {
    grid-template-columns: 1fr;
  }

  .battle-control-row {
    width: 100%;
  }

  .battle-control-row > * {
    width: 100%;
  }

  .battle-versus-badge {
    width: 76px;
    height: 76px;
    font-size: 1.3rem;
  }
}
