
.pbtl {
  --pbtl-gold: #ffd700;
  --pbtl-bg: #151515;
  --pbtl-panel: #202020;
  --pbtl-panel-2: #2a2a2a;
  --pbtl-border: #3a3a3a;
  --pbtl-text: #ffffff;
  --pbtl-col-width: 140px;
  --pbtl-gap: 12px;
  --pbtl-grid-width: calc((7 * var(--pbtl-col-width)) + (6 * var(--pbtl-gap)));
  width: 100%;
}

.pbtl-filters,
.pbtl-table-wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.pbtl-toolbar-row {
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

.pbtl-myheroes-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 5px;
}

.pbtl-myheroes-pill__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.pbtl-myheroes-pill__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pbtl-myheroes-pill.is-active {
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.55) inset;
}

.pbtl-filters {
  margin-bottom: 18px;
}

.pbtl-filters {
  display: flex;
  flex-direction: column;
}

.pbtl-toolbar-row .pbtl-myheroes-pill {
  min-width: 168px;
}

.pbtl-filter-strip,
.pbtl-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pbtl-filter-strip {
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 12px;
}

.pbtl-search-row {
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: nowrap;
}

.pbtl-filter-icon,
.pbtl-awakening-btn {
  appearance: none;
  border: 2px solid transparent;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0;
}

.pbtl-filter-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pbtl-filter-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pbtl-filter-icon--lord {
  background: transparent;
}

.pbtl-filter-icon--lord img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pbtl-filter-icon.is-active,
.pbtl-filter-icon:hover,
.pbtl-reset-btn:hover {
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 6px rgba(255,255,255,0.22);
}

.pbtl-filter-icon.is-active,
.pbtl-filter-icon--lord.is-active {
  border-color: var(--pbtl-gold);
  box-shadow: 0 0 8px rgba(255,215,0,0.45);
}

.pbtl-search-input {
  width: min(100%, 1000px);
  max-width: 1000px;
  flex: 1 1 auto;
  min-width: 0;
}

.pbtl-mobile-awakening-row {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
}

.pbtl-mobile-awakening-heading {
  width: 95%;
  margin: 0 auto;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.pbtl-mobile-awakening-select {
  width: 95%;
  max-width: 95%;
  min-height: 44px;
  margin: 0 auto;
}

.pbtl-reset-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.pbtl-table-wrap {
  width: 100%;
  position: relative;
}

.pbtl-awakening-header,
.pbtl-row {
  width: min(100%, var(--pbtl-grid-width));
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: var(--pbtl-col-width) repeat(6, var(--pbtl-col-width));
  gap: var(--pbtl-gap);
  align-items: center;
}

.pbtl-awakening-header {
  margin-bottom: 18px;
}

.pbtl-hero-heading {
  width: var(--pbtl-col-width);
  text-align: center;
  color: var(--pbtl-gold);
  font-weight: 700;
}

.pbtl-awakening-btn {
  width: var(--pbtl-col-width);
  min-height: 50px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2b2b2b 0%, #232323 100%);
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.pbtl-awakening-btn:hover {
  border-color: rgba(255, 215, 0, 0.65);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
  transform: translateY(-1px);
}

.pbtl-awakening-btn.is-active {
  background: var(--pbtl-gold);
  color: #111;
  border-color: var(--pbtl-gold);
}

.pbtl-awakening-header,
.pbtl-mobile-awakening-row {
  opacity: 1;
  visibility: visible;
  max-height: 220px;
  overflow: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease, max-height 0.35s ease, margin 0.35s ease, padding 0.35s ease;
}

.pbtl.pbtl-myheroes-mode .pbtl-awakening-header,
.pbtl.pbtl-myheroes-mode .pbtl-mobile-awakening-row {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.pbtl-results {
  width: 100%;
  transition: opacity 0.2s ease;
}

.pbtl-is-loading .pbtl-results {
  opacity: 0.35;
  pointer-events: none;
}

.pbtl-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pbtl-row {
  border-radius: 16px;
  box-sizing: border-box;
}

.pbtl-bp-grid {
  display: contents;
}

.pbtl-hero-card {
  grid-column: 1;
  position: relative;
  display: block;
  height: 140px;
  width: var(--pbtl-col-width);
  border-radius: 10px;
  overflow: hidden;
  background: #1e1e1e;
  border: 2px solid var(--pbtl-gold);
  text-decoration: none;
}

.pbtl-hero-card:hover {
  box-shadow: 0 0 10px rgba(255,215,0,0.45);
}

.pbtl-rank-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: auto;
  padding: 4px 8px;
  border-radius: 0 0 3px 0;
  background: #ffffff;
  border: 0;
  color: #000000;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  pointer-events: none;
}

.pbtl-hero-card-bg,
.pbtl-hero-portrait-wrap,
.pbtl-hero-portrait {
  position: absolute;
  inset: 0;
}

.pbtl-hero-card-bg {
  background: radial-gradient(circle at top center, rgba(255,215,0,0.12), rgba(0,0,0,0) 55%), #171717;
  background-image: var(--pbtl-rarity-bg), radial-gradient(circle at top center, rgba(255,215,0,0.12), rgba(0,0,0,0) 55%);
  background-size: cover, auto;
  background-position: center;
}

.pbtl-hero-portrait-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.pbtl-hero-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.pbtl-hero-card h4 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 10px 8px 8px;
  text-align: center;
  font-size: 15px;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.08));
}

.pbtl-bp-slot {
  min-height: 140px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2b2b2b 0%, #232323 100%);
  border: 2px solid #3e3e3e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
}

.pbtl-bp-slot.is-user-rank {
  border-color: var(--pbtl-gold);
  box-shadow: 0 0 10px rgba(255,215,0,0.32);
}

.pbtl-bp-slot-label {
  display: none;
}

.pbtl-bp-number {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--pbtl-text);
}

.pbtl-loader,
.pbtl-empty-state {
  width: min(100%, var(--pbtl-grid-width));
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 18px;
  color: #fff;
}

.pbtl-loader {
  position: absolute;
  inset: 0;
  width: auto;
  margin: 0;
  padding: 0;
  display: block;
  background: rgba(0, 0, 0, 0.18);
  z-index: 5;
}

.pbtl-loader[hidden] {
  display: none;
}

.pbtl-loader__inner {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid rgba(255, 215, 0, 0.45);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
  font-weight: 700;
}

.pbtl-loader__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: var(--pbtl-gold);
  animation: pbtl-spin 0.8s linear infinite;
}

@keyframes pbtl-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .pbtl {
    --pbtl-col-width: 126px;
    --pbtl-gap: 10px;
  }

  .pbtl-bp-number {
    font-size: 20px;
  }
}


@media (max-width: 991px) {
  .pbtl-toolbar-row {
    justify-content: stretch;
  }

  .pbtl-toolbar-row .pbtl-myheroes-pill {
    width: 95%;
    min-width: 0;
  }
}

@media (max-width: 991px) {
  .pbtl-awakening-header {
    display: none;
  }

  .pbtl-row {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
    box-sizing: border-box;
  }

  .pbtl-hero-card {
    flex: 0 0 120px;
    width: 120px;
    max-width: 120px;
    min-height: 130px;
    height: auto;
    justify-self: auto;
  }

  .pbtl-hero-card h4 {
    font-size: 16px;
    padding: 6px 6px 6px;
  }

  .pbtl-bp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 130px;
    height: 130px;
    align-self: stretch;
  }

  .pbtl-bp-slot {
    min-height: 0;
    height: auto;
    gap: 2px;
    border-radius: 8px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.4);
  }

  .pbtl-bp-slot-label {
    display: block;
    font-size: 11px;
    color: var(--pbtl-gold);
    line-height: 1;
  }

  .pbtl-bp-number {
    font-size: 18px;
    line-height: 1.2;
    text-align: center;
  }

  .pbtl-bp-slot.is-user-rank {
    border-color: var(--pbtl-gold);
    box-shadow: 0 0 8px rgba(255,215,0,.8);
  }

  .pbtl-filter-icon {
    width: 48px;
    height: 48px;
  }

  .pbtl-search-row {
    gap: 10px;
    align-items: stretch;
  }

  .pbtl-search-input {
    width: auto;
  }

  .pbtl-reset-btn {
    min-width: 88px;
  }

  .pbtl-toolbar-row {
    margin-bottom: 10px;
  }
}


@media (max-width: 768px) {
  .pbtl-awakening-header {
    display: none;
  }

  .pbtl-mobile-awakening-row {
    display: flex;
  }
}

.pbtl-load-more-wrap {
  width: min(100%, var(--pbtl-grid-width));
  margin: 18px auto 0;
  display: flex;
  justify-content: center;
}

.pbtl-load-more-btn {
  min-width: 220px;
}

@media (max-width: 991px) {
  .pbtl-filters {
    padding-left: 5px;
    padding-right: 5px;
  }

  .pbtl-toolbar-row .pbtl-myheroes-pill {
    width: 100%;
  }
}
