@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&display=swap');

:root {
  --m-bg-a: #08152f;
  --m-bg-b: #34144b;
  --m-surface: #ffffff;
  --m-surface-soft: #f5f8ff;
  --m-line: #d6dff7;
  --m-text: #1d2a4f;
  --m-muted: #5a678f;
  --m-primary: #1e4ed8;
  --m-radius: 14px;
  --m-shadow: 0 18px 36px rgba(7, 18, 38, 0.18);
}

body.pba-modern {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--m-text);
  background:
    radial-gradient(circle at 0% -15%, #2049a7 0%, transparent 40%),
    radial-gradient(circle at 100% -25%, #702f8f 0%, transparent 38%),
    linear-gradient(180deg, var(--m-bg-a), var(--m-bg-b));
}

body.pba-modern .container {
  width: min(1320px, calc(100% - 24px));
}

body.pba-modern .content,
body.pba-modern .inside,
body.pba-modern .shoutbox,
body.pba-modern .registerFields {
  background: linear-gradient(180deg, #ffffff, #f8faff);
  border: 1px solid rgba(208, 220, 248, 0.95);
  border-radius: 18px;
  box-shadow: var(--m-shadow);
}

body.pba-modern .content,
body.pba-modern .inside {
  padding: clamp(16px, 2.2vw, 28px);
}

body.pba-modern .navbar-default {
  border: 0;
  box-shadow: none;
  background: transparent;
}

body.pba-modern #main-navigation_parent {
  background: linear-gradient(180deg, rgba(7, 17, 37, 0.78), rgba(13, 28, 56, 0.78));
  border: 1px solid rgba(131, 153, 214, 0.5);
  border-radius: var(--m-radius);
  backdrop-filter: blur(5px);
}

body.pba-modern .navbar .nav {
  margin: 10px 8px;
  background: transparent;
  box-shadow: none;
}

body.pba-modern .navbar-default .navbar-nav > li > a {
  color: #edf3ff;
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 13px;
}

body.pba-modern .navbar-default .navbar-nav > .active > a,
body.pba-modern .navbar-default .navbar-nav > .active > a:focus,
body.pba-modern .navbar-default .navbar-nav > .active > a:hover,
body.pba-modern .navbar-default .navbar-nav > li > a:focus,
body.pba-modern .navbar-default .navbar-nav > li > a:hover,
body.pba-modern .navbar-default .navbar-nav > .open > a,
body.pba-modern .navbar-default .navbar-nav > .open > a:focus,
body.pba-modern .navbar-default .navbar-nav > .open > a:hover {
  color: #fff;
  text-shadow: none;
  box-shadow: none;
  background: linear-gradient(180deg, #2963f2, #1b45bf);
}

body.pba-modern .dropdown-menu {
  border-radius: 10px;
  border: 1px solid #2c3b6c;
  background: #111a35;
}

body.pba-modern .dropdown-menu > li > a {
  color: #edf3ff;
}

body.pba-modern .dropdown-menu > li > a:hover,
body.pba-modern .dropdown-menu > li > a:focus {
  background: #1b45bf;
}

body.pba-modern .pba_logo {
  margin: 18px auto 12px;
  text-align: center;
}

body.pba-modern .pba_logo img {
  width: min(460px, 90vw);
  height: auto;
}

body.pba-modern .heading {
  background: linear-gradient(180deg, #1c4fd5, #143898);
  color: #fff;
  border-radius: 12px;
}

body.pba-modern .alert {
  border: 0;
  border-radius: var(--m-radius);
}

body.pba-modern .alert-info {
  background: linear-gradient(180deg, #d8efff, #cce6ff);
  color: #174e77;
}

body.pba-modern .alert-warning {
  background: linear-gradient(180deg, #ffe8c1, #ffd99f);
  color: #6e4207;
}

body.pba-modern .form-control,
body.pba-modern .picker {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid #ced9f8;
  box-shadow: none;
}

body.pba-modern .form-control:focus,
body.pba-modern .picker:focus {
  border-color: #3162db;
  box-shadow: 0 0 0 3px rgba(49, 98, 219, 0.16);
}

body.pba-modern .btn {
  border: 0;
  border-radius: 10px;
  font-weight: 700;
}

body.pba-modern .btn-success {
  background: linear-gradient(180deg, #20b16a, #138954);
}

body.pba-modern .btn-warning {
  background: linear-gradient(180deg, #f4b03c, #e49011);
  color: #fff;
}

body.pba-modern .btn-danger {
  background: linear-gradient(180deg, #ef4c4c, #d92d20);
}

body.pba-modern .list-group-item {
  border-radius: 10px;
  border: 1px solid var(--m-line);
  margin-bottom: 8px;
}

body.pba-modern .footer {
  min-width: 0;
  color: rgba(242, 248, 255, 0.9);
}

body.pba-modern iframe {
  border-radius: 10px;
  border: 1px solid #d4ddf8;
}

body.pba-modern-login .content {
  max-width: 980px;
  margin: 0 auto;
}

body.pba-modern-login .pba_logo img {
  width: min(520px, 94vw);
  max-height: none;
}

body.pba-modern-login .nav-tabs {
  border-bottom: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

body.pba-modern-login .nav-tabs > li {
  float: none;
  display: block;
}

body.pba-modern-login .nav-tabs > li > a {
  border: 1px solid #d4ddf4;
  border-radius: 999px;
  background: #f6f8ff;
  color: #243562;
  font-weight: 700;
  padding: 8px 16px;
}

body.pba-modern-login .nav-tabs > li.active > a,
body.pba-modern-login .nav-tabs > li.active > a:focus,
body.pba-modern-login .nav-tabs > li.active > a:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, #1e4ed8, #173ca4);
}

body.pba-modern-login .form-signin {
  max-width: 480px;
  margin: 14px auto 0;
  padding: 18px;
  border-radius: var(--m-radius);
  border: 1px solid var(--m-line);
  background: #fff;
}

@media (max-width: 991px) {
  body.pba-modern #main-navigation_parent {
    border-radius: 12px;
  }

  body.pba-modern .navbar .nav {
    margin: 0;
  }
}

@media (max-width: 767px) {
  body.pba-modern .container {
    width: calc(100% - 16px);
  }

  body.pba-modern .navbar-header {
    padding: 8px 10px 0;
  }

  body.pba-modern .navbar-toggle,
  body.pba-modern .navbar-default .navbar-toggle {
    margin: 0;
    border: 1px solid rgba(173, 192, 241, 0.55);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(18, 34, 69, 0.95), rgba(10, 23, 49, 0.95));
  }

  body.pba-modern .navbar-default .navbar-toggle .icon-bar {
    background-color: #eef4ff;
  }

  body.pba-modern .navbar-collapse {
    margin: 8px 10px 10px;
    padding: 10px;
    border-top: 1px solid rgba(152, 175, 232, 0.35);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(11, 23, 49, 0.96), rgba(15, 30, 60, 0.96));
  }

  body.pba-modern .navbar-collapse.in {
    overflow-y: visible;
  }

  body.pba-modern .navbar-nav,
  body.pba-modern .navbar-right {
    float: none !important;
    margin: 0 !important;
  }

  body.pba-modern .navbar-nav > li {
    float: none;
  }

  body.pba-modern .navbar-default .navbar-nav > li > a {
    padding: 12px 14px;
  }

  body.pba-modern .navbar-default .navbar-nav .open .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin: 6px 0 10px;
    padding: 6px 0;
    border: 1px solid #2c3b6c;
    border-radius: 10px;
    background: #101a35;
    box-shadow: none;
  }

  body.pba-modern .navbar-default .navbar-nav .open .dropdown-menu > li > a {
    padding: 10px 14px;
    color: #edf3ff;
  }

  body.pba-modern .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
  body.pba-modern .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
    background: #1b45bf;
    color: #fff;
  }

  body.pba-modern .content,
  body.pba-modern .inside,
  body.pba-modern .shoutbox {
    border-radius: 14px;
    padding: 14px;
  }

  body.pba-modern .pba_logo img {
    width: min(360px, 96vw);
  }

  body.pba-modern-login .pba_logo img {
    width: min(420px, 96vw);
  }
}

body.pba-modern .trade-search-page {
  display: block;
}

body.pba-modern .trade-search-hero {
  margin: 8px 0 18px;
  padding: 14px;
  border: 1px solid var(--m-line);
  border-radius: 14px;
  background: var(--m-surface-soft);
}

body.pba-modern .trade-search-hero__image {
  text-align: center;
}

body.pba-modern .trade-search-hero__image img {
  max-width: 88px;
  width: 100%;
  height: auto;
}

body.pba-modern .trade-search-hero__content p {
  margin: 8px 0;
  font-size: 16px;
}

body.pba-modern .trade-search-hero__link {
  padding-left: 0;
  font-weight: 700;
}

body.pba-modern .trade-search-filters {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--m-line);
  background: #fff;
}

body.pba-modern .trade-search-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

body.pba-modern .trade-search-form__field label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--m-text);
}

body.pba-modern .trade-search-form__field .chosen-container {
  width: 100% !important;
}

body.pba-modern .trade-search-form__actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.pba-modern .trade-search-hint {
  margin: 10px 0 14px;
  text-align: center;
  color: var(--m-muted);
}

body.pba-modern .trade-card {
  margin: 0 0 16px;
  border: 1px solid var(--m-line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  position: relative;
}

body.pba-modern .trade-card__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--m-line);
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
}

body.pba-modern .trade-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: #1e4ed8;
}

body.pba-modern .trade-card:nth-of-type(2n) {
  background: #f8fffc;
  border-color: #cdeede;
}

body.pba-modern .trade-card:nth-of-type(2n) .trade-card__header {
  background: linear-gradient(180deg, #edfff6, #def8eb);
  border-bottom-color: #cdeede;
}

body.pba-modern .trade-card:nth-of-type(2n)::before {
  background: #1a9a5f;
}

body.pba-modern .trade-card:nth-of-type(3n)::before {
  background: #8b3fd6;
}

body.pba-modern .trade-card__header h3 {
  margin: 0;
  font-size: 18px;
}

body.pba-modern .trade-card__header h3 span {
  color: var(--m-muted);
  font-weight: 600;
  font-size: 14px;
}

body.pba-modern .trade-card__header p {
  margin: 6px 0 0;
}

body.pba-modern .trade-card__sub-link {
  display: inline-block;
  margin-top: 6px;
}

body.pba-modern .trade-card__money {
  margin-top: 8px !important;
  font-weight: 800;
  color: #136f43;
}

body.pba-modern .trade-card__table-wrap {
  padding: 10px 12px;
  overflow-x: auto;
}

body.pba-modern .trade-card__table-wrap .table {
  margin-bottom: 0;
}

body.pba-modern .trade-card__actions {
  padding: 0 14px 14px;
}

body.pba-modern .trade-pagination-wrap {
  text-align: center;
}

@media (max-width: 767px) {
  body.pba-modern .trade-search-form__grid {
    grid-template-columns: 1fr;
  }

  body.pba-modern .trade-card__header h3 {
    font-size: 16px;
  }
}

body.pba-modern .rarity-page .rarity-filter-table {
  max-width: 760px;
  margin: 10px auto 16px;
  border: 1px solid var(--m-line);
  border-radius: 14px;
  background: #f9fbff;
}

body.pba-modern .rarity-page .rarity-filter-table td {
  padding: 18px 14px !important;
}

body.pba-modern .rarity-page .rarity-search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

body.pba-modern .rarity-page .rarity-search-form .ts-wrapper {
  width: min(340px, 100%) !important;
}

body.pba-modern .rarity-page .rarity-search-form .ts-control {
  min-height: 46px;
  border: 3px solid #223a86;
  border-radius: 0;
  background: linear-gradient(180deg, #fdfefe, #dfe9ff);
  box-shadow:
    0 0 0 2px #95b4ff inset,
    0 4px 0 #162d6d;
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 0.2px;
}

body.pba-modern .rarity-page .rarity-search-form .ts-control input {
  font-family: "Courier New", monospace;
  font-weight: 700;
}

body.pba-modern .rarity-page .rarity-search-form .ts-wrapper.focus .ts-control {
  border-color: #1e4ed8;
  box-shadow:
    0 0 0 2px #c6d7ff inset,
    0 4px 0 #102459;
}

body.pba-modern .rarity-page .rarity-search-form .ts-dropdown {
  border: 3px solid #223a86;
  border-radius: 0;
  box-shadow: 0 10px 18px rgba(5, 18, 48, 0.22);
  background: #f3f7ff;
  font-family: "Courier New", monospace;
}

body.pba-modern .rarity-page .rarity-search-form .ts-dropdown .option {
  border-bottom: 1px solid #ccd9fa;
  padding: 9px 12px;
  font-weight: 700;
  color: #1b2f67;
}

body.pba-modern .rarity-page .rarity-search-form .ts-dropdown .option:last-child {
  border-bottom: 0;
}

body.pba-modern .rarity-page .rarity-search-form .ts-dropdown .active,
body.pba-modern .rarity-page .rarity-search-form .ts-dropdown .option:hover {
  background: linear-gradient(180deg, #2f63f4, #1b46c0);
  color: #fff;
}

body.pba-modern .rarity-page .table-responsive-custom {
  width: 100%;
  overflow: visible;
  padding-bottom: 8px;
}

body.pba-modern .rarity-page table.rarity-grid {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  margin-bottom: 8px;
}

body.pba-modern .rarity-page table.rarity-grid tbody,
body.pba-modern .rarity-page table.rarity-grid tr {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

body.pba-modern .rarity-page td.pokedexlineup {
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  border: 1px solid #d9e4ff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(27, 44, 86, 0.06);
  padding: 10px !important;
  width: auto;
  flex: 0 0 calc((100% - 60px) / 6);
  max-width: calc((100% - 60px) / 6);
  height: auto !important;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

body.pba-modern .rarity-page td.pokedexlineup > span {
  height: auto !important;
  margin-bottom: 10px;
  font-weight: 700;
  color: #1e3f87;
}

body.pba-modern .rarity-page td.pokedexlineup .rarity-special-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-bottom: 10px;
}

body.pba-modern .rarity-page td.pokedexlineup .rarity-special-label img {
  display: block;
  max-width: 52px;
  height: auto;
  image-rendering: pixelated;
}

body.pba-modern .rarity-page td.pokedexlineup div.centerbox {
  border-color: #c8d8ff;
  background-color: #eff4ff;
  border-radius: 10px;
}

/* Temporary preview: show rarity sprites at 2x size */
body.pba-modern .rarity-page td.pokedexlineup div.centerbox img {
  transform: scale(1.4);
  transform-origin: center center;
  image-rendering: pixelated;
}

/* Pokedex page uses the same block styles, but should keep original sprite scale */
body.pba-modern .pokedex-page td.pokedexlineup div.centerbox img {
  transform: none;
  max-width: 100px;
  height: auto;
}

body.pba-modern .rarity-page td.pokedexlineup > div:last-child {
  margin-top: 10px;
  line-height: 1.4;
  font-size: 13px;
}

/* Center legacy table outputs on pokedex page */
body.pba-modern .pokedex-page .table-responsive-custom,
body.pba-modern .pokedex-page table.table-striped {
  margin-left: auto;
  margin-right: auto;
}

body.pba-modern .pokedex-page .pokedex-meta,
body.pba-modern .pokedex-page .pokedex-evolution {
  text-align: center;
}

body.pba-modern .pokedex-page .pokedex-meta {
  max-width: 920px;
  margin: 0 auto 14px;
  line-height: 1.55;
}

body.pba-modern .pokedex-page .pokedex-stats-table th,
body.pba-modern .pokedex-page .pokedex-stats-table td {
  text-align: center;
}

body.pba-modern .pokedex-page .pokedex-stats-table {
  max-width: 860px;
  margin: 14px auto 16px !important;
  border: 2px solid #bfd2ff;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fbff;
  box-shadow: 0 8px 16px rgba(20, 45, 96, 0.08);
}

body.pba-modern .pokedex-page .pokedex-stats-table th {
  background: linear-gradient(180deg, #2e63ef, #1d48bf);
  color: #fff;
  font-size: 19px;
  letter-spacing: 0.3px;
}

body.pba-modern .pokedex-page .pokedex-stats-table td {
  font-size: 18px;
  font-weight: 800;
  color: #1d2f5d;
}

body.pba-modern .pokedex-page .pokedex-found-heading {
  margin: 18px auto 10px;
  padding: 12px 16px;
  max-width: 560px;
  border-radius: 10px;
  border: 1px solid #c9dbff;
  background: linear-gradient(180deg, #eaf2ff, #dbe8ff);
  color: #183a82;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

body.pba-modern .pokedex-page .pokedex-found-list {
  list-style: none;
  margin: 0 auto 16px;
  padding: 0;
  max-width: 760px;
  text-align: center;
}

body.pba-modern .pokedex-page .pokedex-found-list li {
  margin: 8px 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #d6e2ff;
  background: #f8fbff;
  font-weight: 600;
}

body.pba-modern .pokedex-page .pokedex-found-list li span {
  display: inline-block;
  margin-left: 8px;
  color: #2b4f9d;
}

/* Force pokedex special variants into stable rows, even with legacy table markup */
body.pba-modern .pokedex-page table.rarity-grid {
  width: 100%;
  margin: 0 auto;
}

body.pba-modern .pokedex-page table.rarity-grid tbody {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

body.pba-modern .pokedex-page table.rarity-grid tr {
  display: contents !important;
}

body.pba-modern .pokedex-page table.rarity-grid td.pokedexlineup {
  display: flex !important;
  flex-direction: column;
  flex: 0 0 calc((100% - 50px) / 6);
  max-width: calc((100% - 50px) / 6);
  margin: 0 !important;
}

@media (max-width: 1199px) {
  body.pba-modern .pokedex-page table.rarity-grid td.pokedexlineup {
    flex-basis: calc((100% - 30px) / 4);
    max-width: calc((100% - 30px) / 4);
  }
}

@media (max-width: 991px) {
  body.pba-modern .pokedex-page table.rarity-grid td.pokedexlineup {
    flex-basis: calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
  }
}

@media (max-width: 767px) {
  body.pba-modern .pokedex-page table.rarity-grid td.pokedexlineup {
    flex-basis: calc((100% - 10px) / 2);
    max-width: calc((100% - 10px) / 2);
  }
}

body.pba-modern .rarity-page .rarity-nav-links,
body.pba-modern .rarity-page .rarity-back-link {
  text-align: center;
  margin: 8px 0;
}

body.pba-modern .rarity-page .rarity-nav-links a,
body.pba-modern .rarity-page .rarity-back-link a {
  font-weight: 700;
}

@media (max-width: 1199px) {
  body.pba-modern .rarity-page td.pokedexlineup {
    flex-basis: calc((100% - 36px) / 4);
    max-width: calc((100% - 36px) / 4);
  }
}

@media (max-width: 991px) {
  body.pba-modern .rarity-page td.pokedexlineup {
    flex-basis: calc((100% - 24px) / 3);
    max-width: calc((100% - 24px) / 3);
  }
}

@media (max-width: 767px) {
  body.pba-modern .rarity-page .rarity-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  body.pba-modern .rarity-page td.pokedexlineup {
    flex-basis: calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
    min-height: 250px;
    padding: 8px !important;
  }

  body.pba-modern .rarity-page td.pokedexlineup > div:last-child {
    font-size: 12px;
    line-height: 1.35;
  }

  body.pba-modern .rarity-page td.pokedexlineup div.centerbox {
    height: 120px;
    width: 100%;
  }

  body.pba-modern .rarity-page .rarity-search-form .btn {
    width: 100%;
  }
}

body.pba-modern .itemshop-page .itemshop-form {
  margin-top: 10px;
}

body.pba-modern .itemshop-page .itemshop-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

body.pba-modern .itemshop-page .itemshop-controls .btn {
  border-radius: 999px;
}

body.pba-modern .itemshop-page .itemshop-controls .btn.is-active {
  background: linear-gradient(180deg, #2f63f4, #1c47c0);
  color: #fff;
}

body.pba-modern .itemshop-page .itemshop-category {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #d7e3ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

body.pba-modern .itemshop-page .itemshop-category.is-hidden {
  display: none;
}

body.pba-modern .itemshop-page .itemshop-category h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  color: #1f3f8c;
}

body.pba-modern .itemshop-page .itemshop-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.pba-modern .itemshop-page .itemshop-card {
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

body.pba-modern .itemshop-page .itemshop-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

body.pba-modern .itemshop-page .itemshop-card__head strong {
  font-size: 14px;
  line-height: 1.3;
}

body.pba-modern .itemshop-page .itemshop-card__price {
  margin: 8px 0;
  font-weight: 700;
  color: #1f3f8c;
}

body.pba-modern .itemshop-page .itemshop-card__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

body.pba-modern .itemshop-page .itemshop-card__actions .form-control {
  max-width: 64px;
  text-align: center;
}

@media (max-width: 1199px) {
  body.pba-modern .itemshop-page .itemshop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body.pba-modern .itemshop-page .itemshop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.pba-modern .mypokemon-page .heading {
  margin-bottom: 18px;
}

body.pba-modern .mypokemon-page .mypokemon-hero {
  align-items: center;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #d7e3ff;
  border-radius: 16px;
  background: linear-gradient(135deg, #edf4ff, #fdfefe);
}

body.pba-modern .mypokemon-page .mypokemon-hero__art {
  text-align: center;
}

body.pba-modern .mypokemon-page .mypokemon-hero__art img {
  max-width: 88px;
  height: auto;
  image-rendering: pixelated;
}

body.pba-modern .mypokemon-page .mypokemon-hero__content {
  text-align: center;
}

body.pba-modern .mypokemon-page .mypokemon-hero__lead {
  max-width: 700px;
  margin: 0 auto 14px;
  color: var(--m-text);
  font-size: 18px;
  line-height: 1.55;
}

body.pba-modern .mypokemon-page .mypokemon-hero__cta {
  min-width: 230px;
}

body.pba-modern .mypokemon-page .mypokemon-bonus-note {
  margin: 0 auto 18px;
  padding: 16px 18px;
  border: 1px solid #d6e2ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fbff, #eef4ff);
  color: var(--m-text);
  line-height: 1.65;
  text-align: center;
}

body.pba-modern .mypokemon-page .mypokemon-filter-shell {
  margin: 0 auto 20px;
  border: 1px solid var(--m-line);
  border-radius: 16px;
  background: #f9fbff;
  box-shadow: 0 10px 20px rgba(18, 39, 84, 0.06);
}

body.pba-modern .mypokemon-page .mypokemon-filter-form {
  padding: 20px;
}

body.pba-modern .mypokemon-page .mypokemon-filter-form::before {
  content: "Filter Collection";
  display: block;
  margin-bottom: 16px;
  color: #1c3f95;
  font-size: 18px;
  font-weight: 800;
}

body.pba-modern .mypokemon-page .mypokemon-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

body.pba-modern .mypokemon-page .mypokemon-filter-field--wide {
  grid-column: span 2;
}

body.pba-modern .mypokemon-page .mypokemon-filter-field label:first-child,
body.pba-modern .mypokemon-page .mypokemon-filter-field > label {
  display: block;
  margin-bottom: 8px;
  color: #1e3f87;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.pba-modern .mypokemon-page .mypokemon-filter-field .form-control {
  min-height: 46px;
  border: 3px solid #223a86;
  border-radius: 0;
  background: linear-gradient(180deg, #fdfefe, #dfe9ff);
  box-shadow:
    0 0 0 2px #95b4ff inset,
    0 4px 0 #162d6d;
  font-family: "Courier New", monospace;
  font-weight: 700;
  color: #1d2a4f;
}

body.pba-modern .mypokemon-page .mypokemon-filter-field .form-control:focus {
  border-color: #1e4ed8;
  box-shadow:
    0 0 0 2px #c6d7ff inset,
    0 4px 0 #102459;
}

body.pba-modern .mypokemon-page .mypokemon-choice-row,
body.pba-modern .mypokemon-page .mypokemon-toggle-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.pba-modern .mypokemon-page .mypokemon-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 2px solid #bfd2ff;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  font-weight: 700;
  color: var(--m-text);
  margin: 0;
  min-width: 180px;
}

body.pba-modern .mypokemon-page .mypokemon-check input {
  margin: 0;
  accent-color: #1e4ed8;
}

body.pba-modern .mypokemon-page .mypokemon-filter-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  gap: 10px;
  flex-wrap: wrap;
}

body.pba-modern .mypokemon-page .mypokemon-filter-actions .btn {
  min-width: 220px;
}

body.pba-modern .mypokemon-page .mypokemon-filter-reset {
  border-radius: 12px;
  border: 1px solid #c7d5f7;
  background: #fff;
  color: #29478f;
  font-weight: 700;
}

body.pba-modern .mypokemon-page .mypokemon-filter-reset:hover,
body.pba-modern .mypokemon-page .mypokemon-filter-reset:focus {
  background: #eef4ff;
  color: #163c9c;
}

body.pba-modern .mypokemon-page .mypokemon-loading {
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid #d6e0f7;
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fbff, #eef4ff);
  color: var(--m-text);
}

body.pba-modern .mypokemon-page .mypokemon-results table.table {
  width: 100%;
  margin: 0 0 14px;
  border: 1px solid #dbe4fb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

body.pba-modern .mypokemon-page .mypokemon-results table.table thead th {
  background: linear-gradient(180deg, #1c4fd5, #163c9c);
  color: #fff;
  border-bottom: 0;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.pba-modern .mypokemon-page .mypokemon-results table.table th,
body.pba-modern .mypokemon-page .mypokemon-results table.table td {
  vertical-align: middle;
  border-top: 1px solid #e7eefc;
  padding: 12px 10px;
}

body.pba-modern .mypokemon-page .mypokemon-results table.table tbody tr:nth-child(even) {
  background: #f8fbff;
}

body.pba-modern .mypokemon-page .mypokemon-results table.table img {
  image-rendering: pixelated;
}

body.pba-modern .mypokemon-page .mypokemon-results center {
  display: block;
  text-align: center;
  color: var(--m-text);
}

body.pba-modern .mypokemon-page .mypokemon-results .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
}

body.pba-modern .mypokemon-page .mypokemon-results .pagination > li {
  display: inline-flex;
}

body.pba-modern .mypokemon-page .mypokemon-results .pagination > li > a,
body.pba-modern .mypokemon-page .mypokemon-results .pagination > li > span {
  border: 1px solid #bfd2ff;
  border-radius: 10px;
  color: #1d3f95;
  background: #f8fbff;
  font-weight: 700;
}

body.pba-modern .mypokemon-page .mypokemon-results .pagination > li > a:hover,
body.pba-modern .mypokemon-page .mypokemon-results .pagination > li > span:hover {
  background: linear-gradient(180deg, #2f63f4, #1b46c0);
  border-color: #1b46c0;
  color: #fff;
}

@media (max-width: 991px) {
  body.pba-modern .mypokemon-page .mypokemon-filter-grid {
    grid-template-columns: 1fr;
  }

  body.pba-modern .mypokemon-page .mypokemon-filter-field--wide {
    grid-column: auto;
  }
}

@media (max-width: 767px) {
  body.pba-modern .mypokemon-page .mypokemon-hero {
    padding: 16px;
  }

  body.pba-modern .mypokemon-page .mypokemon-hero__lead {
    font-size: 16px;
  }

  body.pba-modern .mypokemon-page .mypokemon-filter-form {
    padding: 16px;
  }

  body.pba-modern .mypokemon-page .mypokemon-choice-row,
  body.pba-modern .mypokemon-page .mypokemon-toggle-stack {
    flex-direction: column;
  }

  body.pba-modern .mypokemon-page .mypokemon-check,
  body.pba-modern .mypokemon-page .mypokemon-filter-actions .btn {
    width: 100%;
  }

  body.pba-modern .mypokemon-page .mypokemon-results {
    overflow-x: auto;
  }

  body.pba-modern .mypokemon-page .mypokemon-results table.table {
    min-width: 760px;
  }
}

body.pba-modern .pokemon-profile-page .heading {
  margin-bottom: 16px;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-hero,
body.pba-modern .pokemon-profile-page .pokemon-profile-section {
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid #d7e3ff;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  box-shadow: 0 10px 22px rgba(18, 39, 84, 0.06);
}

body.pba-modern .pokemon-profile-page .pokemon-profile-section--compact {
  max-width: 920px;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-sprite-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-sprite {
  max-width: min(260px, 100%);
  height: auto;
  image-rendering: pixelated;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-table {
  width: 100%;
  margin: 0;
  border: 1px solid #dbe4fb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-table th {
  background: linear-gradient(180deg, #1c4fd5, #163c9c);
  color: #fff;
  border-bottom: 0;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-table th,
body.pba-modern .pokemon-profile-page .pokemon-profile-table td {
  vertical-align: middle;
  border-top: 1px solid #e7eefc;
  padding: 12px 14px;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-table--info td:first-child {
  width: 220px;
  font-weight: 800;
  color: #1f3f8c;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-copy {
  margin: 0 0 14px;
  text-align: center;
  line-height: 1.6;
  color: var(--m-text);
}

body.pba-modern .pokemon-profile-page .pokemon-profile-inline-form {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: center;
  flex-wrap: wrap;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-inline-form label {
  margin: 0;
  font-weight: 700;
  color: #1f3f8c;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-inline-form .form-control {
  width: min(260px, 100%);
}

body.pba-modern .pokemon-profile-page .pokemon-profile-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

body.pba-modern .pokemon-profile-page .pokemon-profile-nickname-box {
  padding: 18px;
  border: 1px solid #dbe4fb;
  border-radius: 14px;
  background: #fff;
}

body.pba-modern .pokemon-profile-page .pokemon-skillshop-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

body.pba-modern .pokemon-profile-page .pokemon-skillshop-head img {
  max-width: 110px;
  height: auto;
}

body.pba-modern .pokemon-profile-page .pokemon-skillshop-money {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid #cddafe;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbff, #eaf1ff);
  color: #1f3f8c;
  font-weight: 800;
}

body.pba-modern .pokemon-profile-page progress {
  width: min(280px, 100%);
  height: 14px;
  margin-right: 8px;
}

@media (max-width: 767px) {
  body.pba-modern .pokemon-profile-page .pokemon-profile-hero,
  body.pba-modern .pokemon-profile-page .pokemon-profile-section {
    padding: 16px;
  }

  body.pba-modern .pokemon-profile-page .pokemon-profile-table {
    display: block;
    overflow-x: auto;
  }

  body.pba-modern .pokemon-profile-page .pokemon-profile-table--info td:first-child {
    width: 150px;
  }

  body.pba-modern .pokemon-profile-page .pokemon-profile-inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  body.pba-modern .pokemon-profile-page .pokemon-profile-inline-form .form-control,
  body.pba-modern .pokemon-profile-page .pokemon-profile-inline-form .btn {
    width: 100%;
  }
}

body.pba-modern .trainer-profile-page table.profilespecific {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  margin: 0 auto 16px;
}

body.pba-modern .trainer-profile-page table.profilespecific tbody {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

body.pba-modern .trainer-profile-page table.profilespecific tbody td {
  flex: 0 0 calc((100% - 60px) / 6);
  max-width: calc((100% - 60px) / 6);
  min-width: 0;
  padding: 0 !important;
  border-top: 0;
  background: transparent;
  vertical-align: top;
}

body.pba-modern .trainer-profile-page table.profilespecific tbody td > div {
  height: 100%;
}

@media (max-width: 1399px) {
  body.pba-modern .trainer-profile-page table.profilespecific tbody td {
    flex-basis: calc((100% - 48px) / 5);
    max-width: calc((100% - 48px) / 5);
  }
}

@media (max-width: 1199px) {
  body.pba-modern .trainer-profile-page table.profilespecific tbody td {
    flex-basis: calc((100% - 36px) / 4);
    max-width: calc((100% - 36px) / 4);
  }
}

@media (max-width: 991px) {
  body.pba-modern .trainer-profile-page table.profilespecific tbody td {
    flex-basis: calc((100% - 24px) / 3);
    max-width: calc((100% - 24px) / 3);
  }
}

@media (max-width: 767px) {
  body.pba-modern .trainer-profile-page table.profilespecific tbody td {
    flex-basis: calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
  }
}

@media (max-width: 520px) {
  body.pba-modern .trainer-profile-page table.profilespecific tbody td {
    flex-basis: 100%;
    max-width: 100%;
  }
}
