.site-nav a[aria-current="page"] {
  color: var(--text);
}

.heroes-hero {
  padding: 82px 0 64px;
  background:
    radial-gradient(circle at 82% 20%, rgba(85, 212, 157, .10), transparent 29%),
    radial-gradient(circle at 18% 12%, rgba(245, 173, 66, .12), transparent 34%);
}

.heroes-hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
}

.heroes-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.heroes-overview > div {
  min-width: 0;
  padding: 24px 18px;
  text-align: center;
}

.heroes-overview > div + div {
  border-left: 1px solid var(--line);
}

.heroes-overview span,
.heroes-overview strong {
  display: block;
}

.heroes-overview span {
  color: var(--muted);
  font-size: .74rem;
}

.heroes-overview strong {
  margin-top: 6px;
  color: var(--accent);
  font-size: 1.8rem;
}

.hero-directory-section {
  padding-top: 68px;
}

.directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.directory-heading > p {
  margin-bottom: 2px;
  color: var(--muted);
}

.hero-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(145px, 1fr)) auto;
  gap: 13px;
  align-items: end;
  padding: 20px;
}

.hero-filter-reset {
  min-width: 126px;
}

.hero-directory {
  display: grid;
  gap: 36px;
  margin-top: 34px;
}

.hero-group {
  min-width: 0;
}

.hero-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.hero-group-heading h3 {
  margin: 0;
  font-size: 1.45rem;
}

.hero-group-heading span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.hero-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero-directory-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-directory-card:hover {
  border-color: rgba(245, 173, 66, .55);
  transform: translateY(-2px);
}

.hero-card-button {
  display: grid;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.hero-card-image-wrap {
  position: relative;
  aspect-ratio: 1.35 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 30%, rgba(245, 173, 66, .18), transparent 44%),
    #0a1322;
}

.hero-card-image,
.hero-profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 950;
}

.hero-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.hero-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hero-card-title-row h4 {
  margin: 0;
  font-size: 1.12rem;
}

.hero-card-type {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.hero-rarity-badge,
.hero-type-badge,
.hero-generation-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .035em;
}

.hero-rarity-badge.mythic {
  color: var(--accent);
  border-color: rgba(245, 173, 66, .45);
}

.hero-rarity-badge.epic {
  color: #c7a7ff;
  border-color: rgba(199, 167, 255, .45);
}

.hero-rarity-badge.rare {
  color: #82c9ff;
  border-color: rgba(130, 201, 255, .45);
}

.hero-card-tags,
.hero-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #0a1322;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 750;
}

.hero-card-open {
  margin-top: auto;
  color: var(--accent);
  font-size: .77rem;
  font-weight: 900;
}

.hero-dialog {
  width: min(1040px, calc(100% - 28px));
  max-height: min(92vh, 940px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  overflow: auto;
  background: var(--background);
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .6);
}

.hero-dialog::backdrop {
  background: rgba(3, 8, 16, .82);
  backdrop-filter: blur(5px);
}

.hero-dialog-shell {
  position: relative;
  min-height: 300px;
}

.hero-dialog-close {
  position: sticky;
  z-index: 8;
  top: 12px;
  float: right;
  width: 42px;
  height: 42px;
  margin: 12px 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 19, 34, .96);
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.hero-profile-header {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 28px;
  padding: 32px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 18%, rgba(245, 173, 66, .12), transparent 38%),
    var(--surface);
}

.hero-profile-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0a1322;
}

.hero-profile-title {
  padding-right: 42px;
}

.hero-profile-title h2 {
  margin-top: 5px;
}

.hero-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
}

.hero-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-stat,
.hero-gear-stat {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0a1322;
}

.hero-stat span,
.hero-stat strong,
.hero-gear-stat span,
.hero-gear-stat strong {
  display: block;
}

.hero-stat span,
.hero-gear-stat span {
  color: var(--muted);
  font-size: .7rem;
}

.hero-stat strong,
.hero-gear-stat strong {
  margin-top: 4px;
  color: var(--accent);
  font-size: 1.08rem;
}

.hero-profile-body {
  padding: 28px 32px 36px;
}

.hero-detail-section + .hero-detail-section {
  margin-top: 28px;
}

.hero-detail-section h3 {
  margin-bottom: 12px;
}

.hero-detail-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.hero-detail-tab {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 11px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.hero-detail-tab.active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.hero-mode-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 16px;
}

.hero-mode-heading h3,
.hero-mode-heading p {
  margin-bottom: 0;
}

.hero-mode-heading > p {
  max-width: 440px;
  color: var(--muted);
  font-size: .82rem;
  text-align: right;
}

.hero-skill-grid,
.hero-gear-skills {
  display: grid;
  gap: 14px;
}

.hero-skill-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.hero-skill-topline {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 15px;
  align-items: start;
}

.hero-skill-icon-wrap {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a1322;
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 950;
}

.hero-skill-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-skill-number {
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 950;
}

.hero-skill-card h4 {
  margin: 2px 0 6px;
}

.hero-skill-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .9rem;
}

.hero-level-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.hero-level-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: #0a1322;
  font-size: .79rem;
}

.hero-level-table th,
.hero-level-table td {
  padding: 10px 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.hero-level-table th:first-child {
  min-width: 155px;
  text-align: left;
}

.hero-level-table thead th {
  color: var(--accent);
  font-weight: 900;
}

.hero-level-table tbody th {
  color: var(--muted);
  font-weight: 800;
}

.hero-level-table tr:last-child > * {
  border-bottom: 0;
}

.hero-level-table tr > *:last-child {
  border-right: 0;
}

.hero-max-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.hero-max-effects > div {
  min-width: 135px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a1322;
}

.hero-max-effects span,
.hero-max-effects strong {
  display: block;
}

.hero-max-effects span {
  color: var(--muted);
  font-size: .69rem;
}

.hero-max-effects strong {
  margin-top: 3px;
  color: var(--accent);
  font-size: .98rem;
}

.hero-gear-header {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.hero-gear-header h3 {
  margin: 2px 0 7px;
}

.hero-gear-header p:last-child {
  margin: 0;
  color: var(--muted);
}

.hero-gear-image {
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a1322;
}

.hero-gear-image img {
  width: 100%;
  height: 150px;
  object-fit: contain;
}

.hero-gear-image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 150px;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 950;
  text-align: center;
}

.hero-gear-image-missing {
  color: var(--muted);
  font-size: .84rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero-gear-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.hero-gear-skills > section {
  min-width: 0;
}

.hero-gear-skill-label {
  margin: 0 0 7px 3px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.hero-unavailable {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  color: var(--muted);
  text-align: center;
}

.hero-verified-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: .72rem;
  text-align: right;
}

@media (max-width: 1060px) {
  .hero-filter-panel { grid-template-columns: repeat(3, 1fr); }
  .hero-search-field { grid-column: span 2; }
  .hero-filter-reset { width: 100%; }
  .hero-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .heroes-hero-grid { grid-template-columns: 1fr; }
  .heroes-overview { max-width: 520px; }
  .hero-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-profile-header { grid-template-columns: 190px 1fr; }
  .hero-gear-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .heroes-hero { padding: 60px 0 48px; }
  .heroes-overview { grid-template-columns: 1fr; }
  .heroes-overview > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .directory-heading { align-items: flex-start; flex-direction: column; }
  .hero-filter-panel, .hero-card-grid { grid-template-columns: 1fr; }
  .hero-search-field { grid-column: auto; }
  .hero-profile-header { grid-template-columns: 1fr; padding: 24px 20px; }
  .hero-profile-image-wrap { width: min(100%, 280px); margin-inline: auto; }
  .hero-profile-title { padding-right: 0; }
  .hero-profile-stats, .hero-gear-stats { grid-template-columns: 1fr; }
  .hero-profile-body { padding: 24px 20px 30px; }
  .hero-mode-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .hero-mode-heading > p { text-align: left; }
  .hero-skill-topline { grid-template-columns: 56px 1fr; }
  .hero-skill-icon-wrap { width: 56px; height: 56px; }
  .hero-gear-header { grid-template-columns: 1fr; }
  .hero-gear-image { width: min(100%, 240px); }
}
