.ae-pvp {
  --pvp-panel: rgba(29, 21, 43, .86);
  --pvp-card: rgba(54, 41, 75, .72);
  --pvp-line: rgba(255, 255, 255, .11);
  --pvp-muted: #b9afc8;
  --pvp-purple: #c9a7ff;
  --pvp-gold: #ffd37b;
  color: #fff;
}

.ae-pvp *, .ae-pvp-modal * { box-sizing: border-box; }
.ae-pvp button, .ae-pvp input, .ae-pvp-modal button { font: inherit; }

.ae-pvp__intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 2px 28px;
}

.ae-pvp__eyebrow {
  color: #ffbf7d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
}

.ae-pvp__intro h1 {
  margin: 7px 0 10px;
  font-size: clamp(42px, 12vw, 72px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.055em;
}

.ae-pvp__intro h1 strong { color: var(--pvp-purple); }
.ae-pvp__intro p {
  max-width: 550px;
  margin: 0;
  color: var(--pvp-muted);
  font-size: 14px;
  line-height: 1.6;
}

.ae-pvp__live {
  display: flex;
  align-items: center;
  flex: none;
  gap: 7px;
  margin-top: 3px;
  padding: 8px 11px;
  border: 1px solid rgba(110, 244, 170, .25);
  border-radius: 99px;
  color: #8ef3bc;
  font-size: 9px;
  font-weight: 900;
}
.ae-pvp__live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8ef3bc;
  box-shadow: 0 0 10px #8ef3bc;
}

.ae-pvp__leagues {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 30px;
}
.ae-pvp__leagues button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--pvp-line);
  border-radius: 17px;
  background: rgba(255,255,255,.045);
  color: #fff;
  text-align: left;
  transition: transform .2s, border-color .2s, background .2s;
}
.ae-pvp__leagues button:hover { transform: translateY(-2px); }
.ae-pvp__leagues button.is-active {
  border-color: rgba(201, 167, 255, .7);
  background: linear-gradient(135deg, rgba(114,78,153,.55), rgba(53,38,72,.7));
  box-shadow: 0 12px 35px rgba(8,5,15,.18);
}
.ae-pvp__league-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  background: rgba(201, 167, 255, .13);
  color: var(--pvp-purple);
}
.ae-pvp__leagues b, .ae-pvp__leagues small { display: block; }
.ae-pvp__leagues b { font-size: 13px; }
.ae-pvp__leagues small { margin-top: 4px; color: var(--pvp-muted); font-size: 9px; }

.ae-pvp__toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.ae-pvp__toolbar h2 { margin: 4px 0 0; font-size: 27px; font-weight: 900; }
.ae-pvp__toolbar > span { color: var(--pvp-muted); font-size: 11px; font-weight: 700; }

.ae-pvp__search { position: relative; display: block; margin-bottom: 16px; }
.ae-pvp__search > span:first-child {
  position: absolute;
  left: 17px;
  top: 8px;
  color: var(--pvp-muted);
  font-size: 26px;
}
.ae-pvp__search input {
  width: 100%;
  height: 52px;
  padding: 0 18px 0 49px;
  border: 1px solid var(--pvp-line);
  border-radius: 16px;
  outline: none;
  background: rgba(10, 7, 16, .32);
  color: #fff;
}
.ae-pvp__search input:focus { border-color: rgba(201, 167, 255, .75); }
.ae-pvp__search input::placeholder { color: #948a9f; }

.ae-pvp__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.ae-pvp-card {
  display: grid;
  grid-template-columns: 36px 82px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  min-height: 108px;
  padding: 9px 12px 9px 8px;
  border: 1px solid var(--pvp-line);
  border-radius: 19px;
  background: linear-gradient(120deg, rgba(57,43,78,.88), rgba(34,26,48,.9));
  color: #fff;
  text-align: left;
  box-shadow: 0 10px 30px rgba(7,4,12,.1);
  transition: transform .18s, border-color .18s;
}
.ae-pvp-card:hover { transform: translateY(-2px); border-color: rgba(201,167,255,.45); }
.ae-pvp-card__rank { color: #9d93aa; font-size: 11px; font-weight: 900; text-align: center; }
.ae-pvp-card:nth-child(-n+3) .ae-pvp-card__rank { color: var(--pvp-gold); }
.ae-pvp-card__sprite { width: 78px; height: 78px; object-fit: contain; }
.ae-pvp-card__info { min-width: 0; padding-left: 4px; }
.ae-pvp-card__info h3 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ae-pvp-card__info p { margin: 4px 0 7px; color: var(--pvp-muted); font-size: 9px; }
.ae-pvp-types { display: flex; flex-wrap: wrap; gap: 4px; }
.ae-pvp-types span {
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  color: #ddd6e6;
  font-size: 8px;
  font-weight: 800;
}
.ae-pvp-card__numbers { display: flex; align-items: flex-end; flex-direction: column; margin-left: 8px; }
.ae-pvp-card__numbers b { color: var(--pvp-purple); font-size: 13px; }
.ae-pvp-card__numbers small { margin-top: 4px; font-size: 9px; }
.ae-pvp-card__numbers em { margin-top: 5px; color: var(--pvp-muted); font-size: 8px; font-style: normal; }

.ae-pvp__status { padding: 65px 10px; color: var(--pvp-muted); text-align: center; }
.ae-pvp__status[hidden] { display: none; }
.ae-pvp__spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  border: 2px solid rgba(255,255,255,.16);
  border-top-color: var(--pvp-purple);
  border-radius: 50%;
  vertical-align: -3px;
  animation: ae-pvp-spin .7s linear infinite;
}
@keyframes ae-pvp-spin { to { transform: rotate(360deg); } }

.ae-pvp__method {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 191, 125, .18);
  border-radius: 16px;
  background: rgba(255, 191, 125, .055);
}
.ae-pvp__method b { font-size: 12px; }
.ae-pvp__method p { margin: 6px 0 0; color: var(--pvp-muted); font-size: 10px; line-height: 1.55; }

.ae-pvp-modal {
  position: fixed;
  z-index: 9998;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #fff;
}
.ae-pvp-modal__scrim { position: absolute; inset: 0; border: 0; background: rgba(5,3,9,.88); backdrop-filter: blur(8px); }
.ae-pvp-modal__sheet {
  position: relative;
  width: min(100%, 620px);
  max-height: 92dvh;
  overflow: hidden;
  border: 1px solid rgba(201,167,255,.28);
  border-radius: 27px;
  background: #1a1226;
  box-shadow: 0 30px 90px #000;
}
.ae-pvp-modal__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 205px;
  padding: 27px;
  overflow: hidden;
  background: linear-gradient(140deg, #543a70, #281a37);
}
.ae-pvp-modal__head > div { position: relative; z-index: 2; max-width: 65%; }
.ae-pvp-modal__head small { color: #ffd49d; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.ae-pvp-modal__head h2 { margin: 6px 0; font-size: 32px; font-weight: 900; line-height: 1; }
.ae-pvp-modal__head p { margin: 0; color: #d7ccdf; font-size: 11px; }
.ae-pvp-modal__pokemon { position: absolute; right: -5px; bottom: -8px; width: 190px; height: 190px; object-fit: contain; }
.ae-pvp-modal__close {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 16px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(16,11,25,.45);
  color: #fff;
  font-size: 25px;
}
.ae-pvp-modal__body { max-height: calc(92dvh - 205px); overflow-y: auto; padding: 24px 21px 42px; }
.ae-pvp-modal__body section + section { margin-top: 26px; }
.ae-pvp-modal__label { color: #ffbf7d; font-size: 9px; font-weight: 900; letter-spacing: .17em; }
.ae-pvp-modal__body h3 { margin: 5px 0 14px; font-size: 19px; font-weight: 900; }
.ae-pvp-ivs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ae-pvp-ivs div { padding: 14px; border: 1px solid var(--pvp-line); border-radius: 14px; background: rgba(255,255,255,.045); text-align: center; }
.ae-pvp-ivs small, .ae-pvp-ivs b { display: block; }
.ae-pvp-ivs small { color: var(--pvp-muted); font-size: 8px; }
.ae-pvp-ivs b { margin-top: 4px; color: var(--pvp-purple); font-size: 22px; }
.ae-pvp-summary { display: flex; justify-content: space-around; margin-top: 10px; padding: 13px; border: 1px solid var(--pvp-line); border-radius: 14px; }
.ae-pvp-summary span { display: flex; align-items: center; flex-direction: column; }
.ae-pvp-summary small { color: var(--pvp-muted); font-size: 8px; }
.ae-pvp-summary b { margin-top: 4px; font-size: 12px; }
.ae-pvp-move { display: flex; align-items: center; min-height: 62px; border-bottom: 1px solid var(--pvp-line); }
.ae-pvp-move > i { display: grid; width: 38px; height: 38px; margin-right: 11px; place-items: center; border-radius: 11px; background: rgba(255,255,255,.07); font-style: normal; }
.ae-pvp-move > span { display: flex; flex: 1; flex-direction: column; }
.ae-pvp-move small { color: var(--pvp-muted); font-size: 8px; }
.ae-pvp-move b { margin-top: 3px; font-size: 12px; }
.ae-pvp-move em { padding: 5px 7px; border-radius: 7px; background: rgba(255,211,109,.1); color: #ffd36d; font-size: 7px; font-style: normal; font-weight: 900; }
.ae-pvp-note { margin: 16px 0 0; color: var(--pvp-muted); font-size: 10px; line-height: 1.55; }
body.ae-pvp-lock { overflow: hidden; }

@media (max-width: 850px) {
  .ae-pvp__list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .ae-pvp__intro { padding-top: 10px; }
  .ae-pvp__live { margin-top: 2px; padding: 7px 9px; font-size: 8px; }
  .ae-pvp__leagues { gap: 7px; }
  .ae-pvp__leagues button { align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px 8px; }
  .ae-pvp__league-icon { width: 31px; height: 31px; }
  .ae-pvp__leagues b { font-size: 10px; }
  .ae-pvp__leagues small { font-size: 7px; }
  .ae-pvp-card { grid-template-columns: 31px 69px minmax(0, 1fr) auto; min-height: 94px; padding-right: 9px; }
  .ae-pvp-card__sprite { width: 66px; height: 66px; }
  .ae-pvp-card__numbers em { display: none; }
  .ae-pvp-modal { align-items: flex-end; padding: 0; }
  .ae-pvp-modal__sheet { max-height: 94dvh; border-radius: 27px 27px 0 0; }
  .ae-pvp-modal__body { max-height: calc(94dvh - 205px); }
}
