.portal-arena {
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: 30px;
  display: grid;
  gap: 20px;
}

.pa-hero {
  min-height: 370px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns:
    1.05fr .95fr;
  border:
    1px solid
    color-mix(
      in srgb,
      var(--region-accent) 52%,
      #31566d
    );
  border-radius: 28px;
  background:
    radial-gradient(
      circle at 20% 25%,
      rgba(49,221,255,.14),
      transparent 38%
    ),
    radial-gradient(
      circle at 88% 22%,
      rgba(255,205,70,.09),
      transparent 32%
    ),
    linear-gradient(
      120deg,
      #071a2a 0%,
      #08131c 58%,
      #17150c
    );
}

.pa-hero__copy {
  padding:
    clamp(
      42px,
      5vw,
      70px
    );
  position: relative;
  z-index: 5;
  align-self: center;
}

.pa-breadcrumb {
  margin-bottom: 28px;
  display: flex;
  gap: 12px;
  color: #7f98a6;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.pa-breadcrumb a,
.pa-footer a {
  color: #4edff8;
  text-decoration: none;
}

.pa-breadcrumb span {
  opacity: .4;
}

.pa-hero h1 {
  margin: 12px 0 8px;
  font-size:
    clamp(
      4rem,
      7vw,
      7rem
    );
  line-height: .88;
  letter-spacing: -.075em;
  font-weight: 950;
}

.pa-hero h1 span {
  display: block;
  color: #ffd45c;
}

.pa-hero p {
  max-width: 680px;
  color: #9aafba;
  font-size: 1.02rem;
  line-height: 1.65;
}

.pa-tags {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pa-tags span {
  padding: 6px 10px;
  border: 1px solid #184252;
  border-radius: 999px;
  background: #06161f;
  color: #6e929f;
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.pa-hero__stage {
  position: relative;
  min-height: 370px;
}

.pa-hero-orbit {
  width: 285px;
  height: 285px;
  position: absolute;
  left: 50%;
  top: 49%;
  transform:
    translate(-50%,-50%);
  border: 1px solid
    rgba(54,218,255,.45);
  border-radius: 50%;
  box-shadow:
    0 0 0 36px
      rgba(255,203,70,.03),
    0 0 80px
      rgba(39,208,255,.13);
}

.pa-hero-mon {
  position: absolute;
  z-index: 4;
  object-fit: contain;
  filter:
    drop-shadow(
      0 25px 26px
      rgba(0,0,0,.48)
    );
}

.pa-hero-mon--main {
  width:
    clamp(
      185px,
      19vw,
      290px
    );
  height:
    clamp(
      185px,
      19vw,
      290px
    );
  left: 23%;
  top: 17%;
}

.pa-hero-mon--side {
  width:
    clamp(
      120px,
      12vw,
      180px
    );
  height:
    clamp(
      120px,
      12vw,
      180px
    );
  right: 8%;
  top: 33%;
}

.pa-hero-versus {
  width: 68px;
  height: 68px;
  position: absolute;
  z-index: 8;
  left: 53%;
  top: 48%;
  transform:
    translate(-50%,-50%);
  display: grid;
  place-items: center;
  border: 1px solid #ffd45c;
  border-radius: 50%;
  background: #07131a;
  color: #ffd45c;
  font-size: 1.6rem;
}

.pa-hero-word {
  position: absolute;
  right: -30px;
  bottom: -60px;
  color:
    rgba(255,255,255,.035);
  font-size:
    clamp(
      8rem,
      14vw,
      15rem
    );
  font-weight: 950;
  letter-spacing: -.1em;
  pointer-events: none;
}

.pa-trainer {
  min-height: 84px;
  padding: 16px 23px;
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid #1a3947;
  border-radius: 18px;
  background: #071720;
}

.pa-avatar {
  width: 49px;
  height: 49px;
  flex: 0 0 49px;
  display: grid;
  place-items: center;
  border: 2px solid #48dff8;
  border-radius: 50%;
  font-weight: 950;
}

.pa-trainer__name {
  flex: 1;
}

.pa-trainer span {
  display: block;
  color: #66818e;
  font-size: .59rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.pa-trainer strong {
  display: block;
  margin-top: 4px;
}

.pa-trainer__coins,
.pa-trainer__sync {
  min-width: 140px;
  padding-left: 22px;
  border-left: 1px solid #1d3743;
  text-align: right;
}

.pa-trainer__coins strong {
  color: #ffd45c;
}

.pa-trainer__sync strong {
  color: #48dfa4;
}

.pa-trainer--logged-out {
  justify-content: space-between;
}

.pa-trainer--logged-out a,
.pa-login-button {
  padding: 11px 16px;
  border: 1px solid #3eddf5;
  border-radius: 9px;
  background: rgba(48,210,240,.08);
  color: #58e5f8;
  text-decoration: none;
  font-size: .7rem;
  font-weight: 950;
}

.pa-message {
  min-height: 0;
}

.pa-message:not(:empty) {
  padding: 12px 16px;
  border: 1px solid #1b3946;
  border-radius: 10px;
  background: #06131a;
  color: #79bcd4;
  font-weight: 850;
}

.pa-message[data-type="error"] {
  border-color:
    rgba(255,85,90,.5);
  color: #ff7379;
}

.pa-message[data-type="success"] {
  border-color:
    rgba(70,220,155,.48);
  color: #55dda5;
}

.pa-status-strip {
  display: grid;
  grid-template-columns:
    1.5fr 1fr 1fr 1fr 1fr;
  gap: 8px;
}

.pa-status-strip article {
  padding: 15px;
  border: 1px solid #193845;
  border-radius: 12px;
  background: #07161e;
}

.pa-status-strip span {
  display: block;
  color: #627d89;
  font-size: .53rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.pa-status-strip strong {
  display: block;
  margin-top: 5px;
  color: #eff7fa;
  font-size: .8rem;
}

.pa-main {
  display: grid;
  grid-template-columns:
    minmax(0, 2.25fr)
    minmax(320px, .8fr);
  gap: 18px;
  align-items: start;
}

.pa-left,
.pa-side {
  display: grid;
  gap: 14px;
}

.pa-battle-panel,
.pa-side-card,
.pa-history-panel,
.pa-rank-card {
  border: 1px solid #193947;
  border-radius: 18px;
  background: #071720;
}

.pa-battle-panel {
  overflow: hidden;
}

.pa-battle-panel > header {
  min-height: 74px;
  padding: 17px 21px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid #17313d;
}

.pa-battle-panel h2 {
  margin: 5px 0 0;
  font-size: 1.3rem;
}

.pa-hazard {
  text-align: right;
}

.pa-hazard span {
  color: #69828f;
  font-size: .53rem;
  font-weight: 900;
}

.pa-hazard strong {
  display: block;
  margin-top: 4px;
  color: #ff8d58;
}

.pa-battlefield {
  min-height: 610px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at center,
      rgba(66,86,94,.20),
      transparent 58%
    ),
    linear-gradient(
      145deg,
      #291711,
      #1e1312 50%,
      #11171c
    );
}

.pa-field-grid {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(
      rgba(255,120,70,.2) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,120,70,.2) 1px,
      transparent 1px
    );
  background-size: 52px 52px;
}

.pa-field-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform:
    translate(-50%,-50%);
  border:
    2px solid
    rgba(255,95,55,.16);
  border-radius: 50%;
}

.pa-field-ring--1 {
  width: 60%;
  aspect-ratio: 1;
}

.pa-field-ring--2 {
  width: 35%;
  aspect-ratio: 1;
}

.pa-field-core {
  width: 70px;
  height: 70px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform:
    translate(-50%,-50%);
  border: 2px solid
    rgba(255,100,60,.3);
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(255,120,70,.13),
      transparent 70%
    );
}

.pa-fighter-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.pa-fighter {
  width: 132px;
  position: absolute;
  transform:
    translate(-50%,-50%);
  transition:
    left .14s linear,
    top .14s linear,
    opacity .2s ease,
    filter .2s ease;
  text-align: center;
}

.pa-fighter__name {
  min-width: 125px;
  margin-bottom: -4px;
  padding: 4px 6px;
  border: 1px solid #28506a;
  border-radius: 5px;
  background:
    rgba(4,13,20,.92);
  box-shadow:
    0 4px 12px
    rgba(0,0,0,.34);
}

.pa-fighter.is-ai
.pa-fighter__name {
  border-color: #83692a;
  background:
    rgba(29,24,9,.92);
}

.pa-fighter__name strong,
.pa-fighter__name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pa-fighter__name strong {
  color: #edf7fa;
  font-size: .57rem;
}

.pa-fighter__name span {
  margin-top: 2px;
  color: #58d9ef;
  font-size: .48rem;
  font-weight: 900;
}

.pa-fighter.is-ai
.pa-fighter__name span {
  color: #e7bf54;
}

.pa-fighter__sprite {
  width: 82px;
  height: 82px;
  object-fit: contain;
  image-rendering: pixelated;
  filter:
    drop-shadow(
      0 10px 8px
      rgba(0,0,0,.55)
    );
}

.pa-fighter__hp {
  width: 88px;
  height: 6px;
  margin: -4px auto 0;
  overflow: hidden;
  border: 1px solid #22343d;
  border-radius: 999px;
  background: #02090d;
}

.pa-fighter__hp i {
  display: block;
  height: 100%;
  background: #56df9b;
  transition: width .18s linear;
}

.pa-fighter.is-low
.pa-fighter__hp i {
  background: #efc15b;
}

.pa-fighter.is-critical
.pa-fighter__hp i {
  background: #ff575e;
  box-shadow:
    0 0 8px #ff575e;
}

.pa-fighter.is-dead {
  opacity: .2;
  filter: grayscale(1);
}

.pa-fighter__stats {
  margin-top: 3px;
  display: flex;
  justify-content: center;
  gap: 7px;
  color: #728894;
  font-size: .43rem;
  font-weight: 900;
}

.pa-event-flash {
  position: absolute;
  z-index: 100;
  left: 50%;
  top: 30px;
  min-width: 260px;
  padding: 12px 24px;
  transform:
    translateX(-50%)
    translateY(-12px);
  border: 1px solid #45dff6;
  border-radius: 8px;
  background:
    rgba(3,16,25,.94);
  opacity: 0;
  text-align: center;
  pointer-events: none;
}

.pa-event-flash.show {
  animation:
    arenaFlash 1.1s ease;
}

.pa-event-flash strong,
.pa-event-flash span {
  display: block;
}

.pa-event-flash strong {
  color: #57e5fa;
  font-size: 1rem;
}

.pa-event-flash span {
  margin-top: 4px;
  color: #a8bdc7;
  font-size: .58rem;
}

@keyframes arenaFlash {
  0% {
    opacity: 0;
    transform:
      translateX(-50%)
      translateY(-12px)
      scale(.96);
  }

  12%,
  72% {
    opacity: 1;
    transform:
      translateX(-50%)
      translateY(0)
      scale(1);
  }

  100% {
    opacity: 0;
  }
}

.pa-field-meta {
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid #17313d;
  color: #657e8a;
  font-size: .52rem;
  font-weight: 900;
}

.pa-field-meta i.live {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: #4be1a3;
  box-shadow:
    0 0 9px #4be1a3;
}

.pa-side-card {
  padding: 18px;
}

.pa-side-card h3 {
  margin: 8px 0;
}

.pa-side-card p {
  color: #8298a3;
  font-size: .72rem;
  line-height: 1.5;
}

.pa-side-card p strong {
  color: #ecf5f8;
}

.pa-picker {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #28506a;
  border-radius: 9px;
  background: #04101a;
  color: #fff;
}

.pa-button-row {
  margin-top: 9px;
  display: flex;
  gap: 8px;
}

.pa-button-row button {
  flex: 1;
  min-height: 42px;
  border: 1px solid #294d60;
  border-radius: 9px;
  background: #102638;
  color: #b9d7e5;
  font-weight: 950;
  cursor: pointer;
}

.pa-button-row button.primary {
  border-color: #38cfea;
  background:
    linear-gradient(
      135deg,
      #25bad8,
      #3d79cf
    );
  color: #04121c;
}

.pa-button-row button.gold {
  border-color: #d3a634;
  background:
    linear-gradient(
      135deg,
      #f2c657,
      #cf8b2b
    );
  color: #221607;
}

.pa-button-row button:disabled {
  opacity: .4;
  cursor: default;
}

.pa-big-clock {
  margin-top: 12px;
  color: #ffd45c;
  text-align: center;
  font-size: 1.9rem;
  font-weight: 950;
}

.pa-lobby-note {
  margin-top: 7px;
  color: #6f8a97;
  font-size: .63rem;
  line-height: 1.45;
}

.pa-slots {
  margin-top: 11px;
  display: grid;
  grid-template-columns:
    1fr 1fr;
  gap: 6px;
}

.pa-slot {
  min-height: 51px;
  padding: 8px;
  border: 1px solid #193b4b;
  border-radius: 7px;
  background: #06131b;
}

.pa-slot strong,
.pa-slot span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pa-slot strong {
  font-size: .62rem;
}

.pa-slot span {
  margin-top: 3px;
  color: #6d8b98;
  font-size: .51rem;
}

.pa-slot.is-ai {
  opacity: .48;
  border-style: dashed;
}

.pa-tournament-card {
  border-color: #6e5720;
  background:
    linear-gradient(
      145deg,
      #151208,
      #221908
    );
}

.pa-tournament-card
.portal-kicker {
  color: #ffd45c;
}

.pa-tournament-meta {
  color: #cfbc85 !important;
}

.pa-mini-title {
  margin-top: 15px;
  padding-top: 11px;
  border-top: 1px solid #4d3c16;
  color: #5ee5fa;
  font-size: .58rem;
  font-weight: 950;
}

.pa-tournament-board {
  display: grid;
}

.pa-tournament-board article {
  padding: 8px 0;
  display: grid;
  grid-template-columns:
    28px 1fr auto;
  gap: 6px;
  border-bottom: 1px solid #3a3016;
  font-size: .63rem;
}

.pa-tournament-board b {
  color: #f1c552;
  font-size: .58rem;
}

.pa-leaderboard {
  margin-top: 12px;
  display: grid;
}

.pa-leaderboard a {
  min-height: 38px;
  padding: 7px 0;
  display: grid;
  grid-template-columns:
    28px minmax(0,1fr)
    auto auto auto;
  gap: 5px;
  align-items: center;
  border-bottom: 1px solid #17313c;
  color: #dceaf0;
  text-decoration: none;
  font-size: .58rem;
}

.pa-leaderboard a > span {
  color: #6d8794;
}

.pa-leaderboard a > b,
.pa-leaderboard a > em,
.pa-leaderboard a > i {
  font-style: normal;
  font-size: .52rem;
}

.pa-leaderboard a > b {
  color: #ffd45c;
}

.pa-leaderboard a > em {
  color: #62dfee;
}

.pa-leaderboard a > i {
  color: #ff9b55;
}

.pa-combat-bottom {
  display: grid;
  grid-template-columns:
    1.25fr .75fr;
  gap: 14px;
}

.pa-combat-feed,
.pa-rank-card {
  padding: 16px;
}

.pa-combat-feed {
  min-height: 180px;
  display: grid;
  grid-template-columns:
    repeat(2,1fr);
  gap: 6px;
  border: 1px solid #193947;
  border-radius: 18px;
  background: #071720;
}

.pa-combat-feed article {
  padding: 9px;
  border: 1px solid #16323e;
  border-radius: 8px;
  background: #05131a;
}

.pa-combat-feed article > span {
  color: #607d89;
  font-size: .47rem;
  font-weight: 900;
}

.pa-combat-feed article strong {
  display: block;
  margin-top: 3px;
  color: #5ee2f6;
  font-size: .65rem;
}

.pa-combat-feed article p {
  margin: 3px 0 0;
  color: #8197a2;
  font-size: .56rem;
}

.pa-top-grid {
  display: grid;
  grid-template-columns:
    1fr 1fr;
  gap: 10px;
}

.pa-rank-card > div {
  margin-top: 9px;
  display: grid;
}

.pa-rank-card article {
  padding: 7px 0;
  display: grid;
  grid-template-columns:
    24px minmax(0,1fr) auto;
  gap: 5px;
  border-bottom: 1px solid #19303b;
  font-size: .57rem;
}

.pa-rank-card article > span {
  color: #6f8793;
}

.pa-rank-card article b {
  color: #ffd45c;
  font-size: .52rem;
}

.pa-history-panel {
  padding: 21px;
}

.pa-history-panel > header {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.pa-history-panel h2 {
  margin: 6px 0 0;
}

.pa-history-panel > header > span {
  color: #607c88;
  font-size: .54rem;
  font-weight: 900;
}

.pa-history {
  margin-top: 15px;
  display: grid;
  grid-template-columns:
    repeat(3,1fr);
  gap: 8px;
}

.pa-history article {
  padding: 12px;
  display: grid;
  gap: 4px;
  border: 1px solid #183440;
  border-radius: 9px;
  background: #06131a;
}

.pa-history article span {
  color: #617b88;
  font-size: .48rem;
  font-weight: 900;
}

.pa-history article strong {
  font-size: .68rem;
}

.pa-history article b {
  color: #55dff5;
  font-size: .55rem;
}

.pa-history article em,
.pa-history article i {
  color: #778e99;
  font-size: .51rem;
  font-style: normal;
}

.pa-history article i {
  color: #ffd45c;
}

.pa-empty {
  padding: 14px 0;
  color: #607c88;
  font-size: .62rem;
}

.pa-footer {
  padding: 5px 2px 20px;
  display: flex;
  justify-content: space-between;
  color: #617c88;
  font-size: .59rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.pa-loading {
  min-height: 600px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 15px;
  color: #78929d;
  font-weight: 900;
}

.pa-loading span {
  width: 40px;
  height: 40px;
  border: 3px solid #173744;
  border-top-color: #4ddff7;
  border-radius: 50%;
  animation:
    portalArenaSpin
    .8s linear infinite;
}

@keyframes portalArenaSpin {
  to {
    transform:
      rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .pa-main {
    grid-template-columns: 1fr;
  }

  .pa-side {
    grid-template-columns:
      repeat(2,1fr);
  }

  .pa-side-card:last-child {
    grid-column: 1 / 3;
  }
}

@media (max-width: 900px) {
  .portal-arena {
    padding: 16px;
  }

  .pa-hero {
    grid-template-columns: 1fr;
  }

  .pa-hero__stage {
    min-height: 280px;
  }

  .pa-status-strip {
    grid-template-columns:
      repeat(2,1fr);
  }

  .pa-battlefield {
    min-height: 520px;
  }

  .pa-combat-bottom {
    grid-template-columns: 1fr;
  }

  .pa-history {
    grid-template-columns:
      repeat(2,1fr);
  }
}

@media (max-width: 650px) {
  .pa-hero__copy {
    padding: 28px 22px;
  }

  .pa-hero__stage {
    min-height: 230px;
  }

  .pa-hero-mon--main {
    width: 160px;
    height: 160px;
  }

  .pa-hero-mon--side {
    width: 105px;
    height: 105px;
  }

  .pa-trainer {
    flex-wrap: wrap;
  }

  .pa-trainer__coins,
  .pa-trainer__sync {
    width: 100%;
    padding:
      10px 0 0;
    border-top:
      1px solid #1d3743;
    border-left: 0;
    text-align: left;
  }

  .pa-status-strip {
    grid-template-columns: 1fr;
  }

  .pa-side {
    grid-template-columns: 1fr;
  }

  .pa-side-card:last-child {
    grid-column: auto;
  }

  .pa-battlefield {
    min-height: 480px;
  }

  .pa-fighter {
    width: 105px;
  }

  .pa-fighter__sprite {
    width: 64px;
    height: 64px;
  }

  .pa-fighter__name {
    min-width: 100px;
  }

  .pa-top-grid,
  .pa-history {
    grid-template-columns: 1fr;
  }

  .pa-combat-feed {
    grid-template-columns: 1fr;
  }

  .pa-footer {
    flex-direction: column;
    gap: 10px;
  }
}

/* =========================================================
   ARENA V1.4 FOLLOWER FRAME FIX
   ========================================================= */

.pa-fighter__sprite {
  display: block;
  width: 80px;
  height: 78px;
  margin: 0 auto;
  object-fit: initial;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 8px rgba(0,0,0,.55));
}

.pa-fighter.is-human .pa-fighter__sprite {
  filter:
    drop-shadow(0 10px 8px rgba(0,0,0,.55))
    drop-shadow(0 0 4px rgba(67,231,255,.22));
}

.pa-fighter.is-ai .pa-fighter__sprite {
  filter:
    drop-shadow(0 10px 8px rgba(0,0,0,.55))
    drop-shadow(0 0 4px rgba(255,216,92,.16));
}

@media (max-width:650px) {
  .pa-fighter__sprite {
    width: 72px;
    height: 70px;
  }
}
