:root {
  color-scheme: dark;
  --text: #f4f4f4;
  --muted: #c4bdbc;
  --soft: rgba(255, 255, 255, 0.12);
  --panel: rgba(20, 12, 8, 0.78);
  --panel-deep: rgba(13, 8, 5, 0.88);
  --topbar: #242424;
  --accent: #10d461;
  --accent-dark: #06a846;
  --accent-glow: rgba(16, 212, 97, 0.36);
  --danger: #ff6f61;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.01) 36%, rgba(0, 0, 0, 0.13)),
    url("/assets/skyblock-bg.png") center top / cover fixed;
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 40px 0 0;
  z-index: -1;
  background:
    radial-gradient(circle at 58% 25%, rgba(255, 223, 117, 0.10), transparent 24rem),
    rgba(0, 0, 0, 0.02);
  backdrop-filter: saturate(1.26) contrast(1.03);
  content: "";
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  background: linear-gradient(180deg, #2a2a2a, var(--topbar));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 28px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 18px rgba(106, 95, 255, 0.22);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: #bebebe;
  font-size: 0.68rem;
}

.about-button,
.settings-button {
  min-height: 26px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  background: #d5d5d5;
  color: #333;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
}

.settings-button {
  background: #1c1c1c;
  color: #fff;
}

.topbar-spacer {
  flex: 1;
}

.top-search {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(480px, 42vw);
  height: 38px;
  border-radius: 999px;
  padding: 0 0 0 18px;
  background: #1c1c1c;
  color: #d6d6d6;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 22px rgba(0, 0, 0, 0.20);
  transition: width 220ms ease, background 180ms ease, box-shadow 180ms ease;
}

.top-search:focus-within {
  background: #202020;
  box-shadow: inset 0 0 0 1px rgba(16, 212, 97, 0.45), 0 0 24px var(--accent-glow);
}

body:not(.has-result) .top-search {
  visibility: hidden;
}

.search-placeholder {
  position: absolute;
  left: 18px;
  display: flex;
  gap: 5px;
  align-items: center;
  color: #d6d6d6;
  pointer-events: none;
}

.search-placeholder kbd {
  border: 0;
  border-radius: 4px;
  padding: 0 5px;
  background: #111;
  color: #fff;
  font: inherit;
}

.top-search:focus-within .search-placeholder,
.top-search.has-value .search-placeholder {
  display: none;
}

.top-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0 8px 0 0;
  background: transparent;
  color: #d6d6d6;
  text-align: left;
  font-size: 1rem;
  font-weight: 900;
}

.top-search input::placeholder {
  color: #d6d6d6;
  opacity: 1;
}

.top-search button {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 38px;
  min-height: 38px;
  border-radius: 999px;
  padding: 0;
  background: #171717;
  color: #fff;
}

.top-search button span {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.top-search button span::after {
  position: absolute;
  width: 9px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  transform: translate(9px, 13px) rotate(45deg);
  content: "";
}

.app-shell {
  width: 100%;
  margin: 0 auto;
  padding: 22px 0 56px;
}

.lookup-panel {
  width: min(1050px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 6px;
  background: var(--panel-deep);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

body.has-result .lookup-panel {
  display: none;
}

body.has-result .home-grid {
  display: none;
}

.title-block {
  padding: 28px 24px;
  text-align: center;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(1.65rem, 4vw, 2rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 500;
}

h3 {
  display: inline-block;
  border-bottom: 4px solid var(--accent);
  padding-bottom: 4px;
  font-size: 1.45rem;
  text-transform: uppercase;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
}

input {
  width: 100%;
  height: 64px;
  border: 0;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
  outline: none;
  text-align: center;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

input:focus {
  background: rgba(255, 255, 255, 0.18);
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(6, 168, 70, 0.22);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.search-row button {
  margin: 24px 0;
}

.status {
  min-height: 24px;
  padding: 0 24px 20px;
  color: var(--muted);
  text-align: center;
}

.status.error {
  color: var(--danger);
}

.home-grid {
  width: min(1050px, calc(100% - 28px));
  margin: 24px auto 0;
}

.patreon-card,
.favorite-card {
  background: rgba(16, 8, 5, 0.84);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(5px);
}

.patreon-card {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 78px;
  border-radius: 6px;
  padding: 16px 28px;
}

.patreon-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f5f1e8;
  color: #2b2b2b;
  font-weight: 900;
}

.patreon-card strong {
  display: block;
  color: #fff;
}

.patreon-card strong span {
  color: var(--accent);
}

.patreon-card p,
.favorite-card p {
  margin: 3px 0 0;
  color: #ddd6d3;
  font-weight: 800;
}

.favorite-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.favorite-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 108px;
  border-radius: 6px;
  padding: 18px 20px;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.favorite-card:hover {
  transform: translateY(-3px);
  background: rgba(24, 14, 9, 0.9);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(16, 212, 97, 0.18);
}

.favorite-card img {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  image-rendering: pixelated;
}

.favorite-card strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 1.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-panel {
  margin-top: 0;
  animation: profileIn 420ms ease both;
}

.stats-layout {
  display: grid;
  grid-template-columns: 30vw minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.skin-panel {
  position: sticky;
  top: 40px;
  min-height: calc(100vh - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
  cursor: grab;
  perspective: 900px;
  overflow: hidden;
}

.skin-panel img {
  width: min(285px, 78%);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.5)) saturate(1.06);
}

.draggable-avatar {
  cursor: grab;
  touch-action: none;
  user-select: none;
  transform-origin: center bottom;
  will-change: transform, filter;
  transition: filter 180ms ease;
}

.draggable-avatar.is-dragging {
  cursor: grabbing;
  filter: drop-shadow(0 26px 28px rgba(0, 0, 0, 0.58));
  transition: filter 120ms ease;
}

.skin-panel:active {
  cursor: grabbing;
}

.stats-content {
  min-width: 0;
  min-height: calc(100vh - 40px);
  padding: 38px 24px 80px 0;
  background:
    radial-gradient(circle at 42% 10%, rgba(255, 255, 255, 0.14), transparent 19rem),
    radial-gradient(circle at 82% 50%, rgba(16, 212, 97, 0.09), transparent 20rem),
    linear-gradient(90deg, rgba(30, 12, 7, 0.30), rgba(12, 8, 5, 0.45));
  backdrop-filter: blur(1.5px) saturate(1.25);
}

.player-header,
.level-card,
#skills-list,
.show-stats-button,
.summary-strip,
.profile-tabs,
.sections-grid {
  margin-left: 0;
}

.player-header {
  margin-bottom: 18px;
}

.player-header h2 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.action-row button {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.96rem;
  text-transform: none;
  box-shadow: 0 9px 20px rgba(6, 168, 70, 0.18);
}

.profile-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-switcher[hidden] {
  display: none;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.profile-chip:hover,
.profile-chip.active {
  transform: translateY(-1px);
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(6, 168, 70, 0.22);
}

#player-name {
  display: inline-flex;
  gap: 0;
  border-radius: 999px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  font-weight: 900;
  text-transform: uppercase;
}

.profile-on {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

#profile-name {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  font-weight: 900;
}

.uuid {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.level-card {
  margin: 0 0 6px;
}

.show-stats-button {
  width: 100%;
  min-height: 38px;
  margin: 28px 0 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(16, 212, 97, 0.10), rgba(255, 255, 255, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.derived-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px 18px;
  margin-top: 24px;
}

.derived-stats[hidden] {
  display: none;
}

.derived-stat {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  color: #fff;
  font-weight: 900;
}

.derived-stat span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  color: var(--accent);
}

.derived-stat strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 22px 0 26px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}

.summary-strip b {
  color: var(--muted);
}

.summary-strip span {
  color: #fff;
}

.profile-tabs {
  display: flex;
  gap: 0;
  align-items: end;
  overflow-x: auto;
  border-bottom: 2px solid var(--accent);
  margin: 36px 0 26px;
}

.profile-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  border-radius: 0;
  padding: 0 16px 16px;
  background: transparent;
  color: #d8cfcc;
  cursor: pointer;
  font-weight: 900;
  text-transform: none;
}

.profile-tabs button.disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.profile-tabs button:not(.disabled):hover {
  color: #fff;
}

.profile-tabs button.active::after {
  position: absolute;
  right: 8px;
  bottom: -4px;
  left: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  box-shadow: 0 0 18px var(--accent-glow);
  animation: activeTabGlow 1.7s ease-in-out infinite alternate;
}

.sections-grid {
  display: grid;
  gap: 34px;
}

.info-section[hidden] {
  display: none;
}

.info-section {
  min-width: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.info-section:not([hidden]) {
  animation: sectionRise 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  max-height: 500px;
  margin-top: 18px;
  overflow: auto;
  padding-right: 4px;
}

#collections-list {
  display: block;
  max-height: none;
  overflow: visible;
}

.stat-list-bars {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
}

.stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.10);
}

.progress-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon bar";
  gap: 2px 0;
  align-items: center;
  min-width: 0;
  min-height: 42px;
}

.progress-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.progress-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}

.progress-row strong {
  grid-area: title;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-bar {
  position: relative;
  grid-area: bar;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(220, 220, 210, 0.46);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.30);
}

.progress-bar::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #0dae51);
  content: "";
  box-shadow: 0 0 16px rgba(16, 212, 97, 0.24);
}

.progress-bar::after,
.slayer-progress::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.18) 45%, transparent 70%);
  content: "";
  opacity: 0.55;
  transform: translateX(-100%);
  animation: barSheen 2.9s ease-in-out infinite;
}

.progress-xp {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 42px;
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}

.stat-row-bar {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
}

.stat-row-bar::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill);
  background: linear-gradient(90deg, var(--accent), #0ca64d);
  content: "";
}

.stat-row span,
.stat-row strong {
  position: relative;
  z-index: 1;
}

.stat-row span {
  min-width: 0;
  color: #fff;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.stat-row strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  margin: 18px 0 0;
  color: var(--muted);
}

.collection-summary {
  margin: 18px 0 22px;
  color: var(--muted);
  font-weight: 900;
}

.collection-group {
  margin-top: 22px;
}

.collection-group h4 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1.25rem;
  text-transform: uppercase;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.collection-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "icon name"
    "icon amount"
    "bar bar";
  gap: 2px 10px;
  min-height: 72px;
  overflow: hidden;
  border-radius: 7px;
  padding: 10px;
  background: rgba(16, 9, 6, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.collection-card:hover {
  transform: translateY(-3px);
  background: rgba(20, 11, 7, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26), inset 0 0 0 1px rgba(16, 212, 97, 0.16);
}

.gear-section h4 {
  margin: 26px 0 10px;
  color: #fff;
  font-size: 1.35rem;
}

.gear-section p {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 900;
}

.gear-section p strong {
  color: #ffb000;
}

.gear-grid {
  display: grid;
  grid-template-columns: repeat(4, 72px);
  gap: 12px;
  overflow: visible;
}

.gear-grid-wardrobe {
  grid-template-columns: repeat(var(--wardrobe-columns, 4), 56px);
  grid-auto-flow: row;
  width: max-content;
}

.gear-grid-weapons {
  grid-template-columns: repeat(auto-fill, 56px);
  max-width: 560px;
}

.gear-grid > span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: rgba(18, 10, 7, 0.72);
  color: #fff;
  font-weight: 900;
}

.gear-grid-wardrobe > span {
  background: #b500bd;
}

.armor-card {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 7px;
  padding: 0;
  background:
    radial-gradient(circle at 30% 0, rgba(255, 176, 0, 0.18), transparent 58%),
    #d89100;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.armor-card[data-rarity="special"],
.armor-card[data-rarity="very-special"] {
  background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.18), transparent 58%), #e53935;
}

.armor-card[data-rarity="mythic"] {
  background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.18), transparent 58%), #d328d9;
}

.armor-card[data-rarity="legendary"] {
  background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.18), transparent 58%), #d89100;
}

.armor-card[data-rarity="epic"] {
  background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.18), transparent 58%), #9b18d9;
}

.armor-card[data-rarity="rare"] {
  background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.18), transparent 58%), #3158e8;
}

.armor-card[data-rarity="uncommon"] {
  background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.18), transparent 58%), #42d96b;
}

.armor-card[data-rarity="common"] {
  background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.18), transparent 58%), #f2f2f2;
}

.armor-card[data-rarity="empty"] {
  background: rgba(12, 10, 10, 0.74);
}

.armor-card[data-rarity="common"] .armor-icon {
  color: #1c1c1c;
}

.armor-card:hover,
.armor-card:focus-visible {
  z-index: 80;
  transform: translateY(-3px);
  filter: brightness(1.08) saturate(1.08);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 176, 0, 0.18);
}

.armor-card.enchanted::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, transparent 15%, rgba(255, 83, 255, 0.36) 34%, transparent 52%),
    linear-gradient(45deg, rgba(70, 78, 255, 0.32), transparent 42%, rgba(255, 54, 225, 0.28));
  mix-blend-mode: screen;
  opacity: 0.72;
  pointer-events: none;
  z-index: 2;
  animation: enchantGlint 5s ease-in-out infinite;
  content: "";
}

.armor-card.empty {
  opacity: 0.72;
}

.item-count {
  position: absolute;
  right: 5px;
  bottom: 3px;
  z-index: 4;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 2px 0 #000, 0 0 5px #000;
  pointer-events: none;
}

.wardrobe-card {
  width: 56px;
  height: 56px;
}

.wardrobe-card .armor-icon {
  width: 56px;
  height: 56px;
}

.wardrobe-card .armor-icon img {
  width: 42px;
  height: 42px;
}

.weapon-card {
  width: 56px;
  height: 56px;
}

.weapon-card .armor-icon {
  width: 56px;
  height: 56px;
}

.weapon-card .armor-icon img {
  width: 44px;
  height: 44px;
}

.wardrobe-card.empty {
  opacity: 1;
}

.wardrobe-card.empty .armor-icon::before {
  display: block;
  width: 30px;
  height: 30px;
  background: #f2f2f2;
  content: "";
}

.wardrobe-card.empty .armor-icon.empty-helmet::before {
  clip-path: polygon(16% 18%, 84% 18%, 84% 52%, 70% 52%, 70% 34%, 30% 34%, 30% 52%, 16% 52%);
}

.wardrobe-card.empty .armor-icon.empty-chestplate::before {
  clip-path: polygon(22% 12%, 38% 12%, 44% 26%, 56% 26%, 62% 12%, 78% 12%, 90% 34%, 78% 44%, 78% 88%, 22% 88%, 22% 44%, 10% 34%);
}

.wardrobe-card.empty .armor-icon.empty-leggings::before {
  clip-path: polygon(20% 10%, 80% 10%, 80% 46%, 66% 46%, 66% 90%, 52% 90%, 52% 46%, 48% 46%, 48% 90%, 34% 90%, 34% 46%, 20% 46%);
}

.wardrobe-card.empty .armor-icon.empty-boots::before {
  clip-path: polygon(20% 14%, 42% 14%, 42% 68%, 62% 68%, 62% 86%, 20% 86%, 20% 14%, 58% 14%, 80% 14%, 80% 68%, 94% 68%, 94% 86%, 58% 86%);
}

.armor-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 7px;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  overflow: hidden;
}

.armor-icon img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  image-rendering: pixelated;
}

.armor-card-copy {
  display: none;
}

.armor-card strong {
  display: block;
  min-width: 0;
  color: #fff;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.armor-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.armor-tooltip {
  position: absolute;
  top: -296px;
  left: calc(100% + 10px);
  z-index: 999;
  width: min(430px, calc(100vw - 40px));
  overflow: hidden;
  border-radius: 7px;
  background: rgba(10, 10, 10, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  isolation: isolate;
  transform: translateY(10px) scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease;
}

.armor-card:nth-child(n + 3) .armor-tooltip {
  right: calc(100% + 10px);
  left: auto;
}

.armor-card:hover .armor-tooltip,
.armor-card:focus-visible .armor-tooltip {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.armor-tooltip-header {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 12px 22px;
  background: #df9400;
}

.armor-tooltip-header[data-rarity="special"],
.armor-tooltip-header[data-rarity="very-special"] {
  background: #e53935;
}

.armor-tooltip-header[data-rarity="mythic"] {
  background: #d328d9;
}

.armor-tooltip-header[data-rarity="legendary"] {
  background: #df9400;
}

.armor-tooltip-header[data-rarity="epic"] {
  background: #9b18d9;
}

.armor-tooltip-header[data-rarity="rare"] {
  background: #3158e8;
}

.armor-tooltip-header[data-rarity="uncommon"] {
  background: #42d96b;
}

.armor-tooltip-header[data-rarity="common"] {
  background: #f2f2f2;
}

.armor-tooltip-header[data-rarity="common"] strong {
  color: #171717;
}

.armor-tooltip-header .tooltip-icon {
  width: 42px;
  height: 42px;
}

.armor-tooltip-header .tooltip-icon img {
  width: 38px;
  height: 38px;
}

.armor-tooltip-header strong {
  color: #fff;
  font-size: 1.12rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.armor-tooltip-body {
  max-height: none;
  padding: 22px 24px 24px;
  overflow: visible;
}

.armor-lore {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  color: #d9d4d2;
  font-size: 0.94rem;
  font-weight: 800;
  list-style: none;
}

.armor-lore li {
  min-height: 1.15em;
  overflow-wrap: anywhere;
}

.armor-lore .lore-spacer {
  min-height: 10px;
  line-height: 10px;
}

.armor-item-value {
  margin: 16px 0 0;
  color: #d9d4d2;
  font-size: 0.94rem;
  font-weight: 900;
}

.armor-item-value b {
  color: #d9d4d2;
}

.armor-item-value span {
  color: #ffb000;
}

.gear-bonus {
  grid-column: 1 / -1;
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.gear-bonus.static {
  margin-bottom: 12px;
}

.gear-bonus b {
  color: var(--muted);
}

.bonus-cd {
  color: #6f8dff;
}

.bonus-def {
  color: #43ff72;
}

.bonus-hp {
  color: #ff4d56;
}

.bonus-str {
  color: #ff5d68;
}

.bonus-int {
  color: #48dff3;
}

.bonus-spd,
.bonus-mf {
  color: #fff;
}

.weapon-active {
  margin-top: 0;
  font-size: 0.9rem;
}

.weapon-active strong {
  color: #ffb000;
}

.armor-empty-copy {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.collection-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 212, 97, 0.18), transparent var(--fill));
  opacity: 0.75;
  content: "";
}

.collection-icon,
.collection-card strong,
.collection-card span,
.collection-card i {
  position: relative;
  z-index: 1;
}

.collection-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 900;
}

.collection-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}

.collection-card strong {
  grid-area: name;
  align-self: end;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-card span:not(.collection-icon) {
  grid-area: amount;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.collection-card i {
  grid-area: bar;
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.collection-card i::before {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  content: "";
}

.slayer-grid {
  max-width: 920px;
  margin-top: 18px;
}

.bestiary-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.bestiary-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  min-height: 132px;
  padding: 22px 24px;
  border: 1px solid rgba(36, 224, 122, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 82% 38%, rgba(36, 224, 122, 0.22), transparent 13rem),
    linear-gradient(135deg, rgba(12, 18, 28, 0.82), rgba(25, 41, 34, 0.56));
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bestiary-hero::before {
  position: absolute;
  inset: -40% auto auto -20%;
  width: 42%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: rotate(18deg);
  animation: bestiarySweep 5.5s ease-in-out infinite;
  content: "";
}

.bestiary-hero span {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bestiary-hero strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 950;
  line-height: 0.95;
}

.bestiary-hero p {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-weight: 850;
}

.bestiary-hero-icon {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(36, 224, 122, 0.24), rgba(24, 189, 255, 0.13));
  box-shadow: 0 18px 46px rgba(36, 224, 122, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.bestiary-hero-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
}

.bestiary-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.bestiary-summary span {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 14, 24, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.bestiary-summary b {
  color: #9fb0c5;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.bestiary-summary strong {
  overflow: hidden;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bestiary-group h4 {
  margin: 24px 0 12px;
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 950;
  text-transform: uppercase;
}

.bestiary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.bestiary-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon name tier"
    "icon kills tier"
    "bar bar bar";
  gap: 3px 12px;
  align-items: center;
  overflow: hidden;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(12, 18, 28, 0.72), rgba(6, 10, 18, 0.48)),
    radial-gradient(circle at 0 0, rgba(36, 224, 122, 0.12), transparent 10rem);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.bestiary-card:hover {
  border-color: rgba(36, 224, 122, 0.42);
  transform: translateY(-3px);
  box-shadow: 0 22px 68px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(36, 224, 122, 0.16);
}

.bestiary-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
  font-weight: 950;
}

.bestiary-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}

.bestiary-card strong {
  grid-area: name;
  overflow: hidden;
  color: #fff;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bestiary-card span:not(.bestiary-icon) {
  grid-area: kills;
  color: #a8b3c5;
  font-size: 0.88rem;
  font-weight: 850;
}

.bestiary-card b {
  grid-area: tier;
  align-self: center;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(36, 224, 122, 0.15);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
}

.bestiary-card i {
  grid-area: bar;
  display: block;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.24);
}

.bestiary-card i::before {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 14px rgba(36, 224, 122, 0.45);
  content: "";
}

.slayer-summary,
.slayer-bonus {
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 900;
}

.slayer-summary b,
.slayer-bonus b {
  color: var(--muted);
}

.slayer-bonus span {
  color: #fff;
}

.slayer-bonus .bonus-cd {
  color: #6f8dff;
}

.slayer-bonus .bonus-hp {
  color: #ff4d56;
}

.slayer-bonus .bonus-int {
  color: #48dff3;
}

.slayer-bonus .bonus-spd {
  color: #ffffff;
}

.slayer-bonus .bonus-str {
  color: #ff6b72;
}

.slayer-bonus .bonus-vit {
  color: #ff37f3;
}

.slayer-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
}

.slayer-card {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.08), transparent 58%),
    rgba(16, 9, 6, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 190ms ease, box-shadow 190ms ease, background 190ms ease;
}

.slayer-card:hover {
  transform: translateY(-4px);
  background:
    radial-gradient(circle at 50% 0, rgba(16, 212, 97, 0.12), transparent 62%),
    rgba(18, 10, 6, 0.74);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(16, 212, 97, 0.18);
}

.slayer-title {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--accent);
  min-height: 50px;
  padding: 12px 18px;
  color: #fff;
  font-size: 1.08rem;
  text-transform: uppercase;
}

.slayer-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: transparent;
  font-size: 1.25rem;
}

.slayer-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}

.slayer-tiers {
  display: grid;
  grid-template-columns: repeat(var(--tier-columns, 6), minmax(0, 1fr));
  gap: 8px;
  padding: 26px 18px 12px;
  text-align: center;
}

.slayer-tiers b {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
}

.slayer-tiers strong {
  display: block;
  margin-top: 6px;
  color: #fff;
}

.slayer-level {
  margin: 12px 0 10px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.slayer-progress {
  position: relative;
  height: 16px;
  overflow: hidden;
  background: rgba(220, 220, 210, 0.46);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.34);
}

.slayer-progress::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill);
  background: var(--accent);
  content: "";
  box-shadow: 0 0 16px rgba(16, 212, 97, 0.24);
}

.slayer-progress span {
  position: relative;
  z-index: 1;
  display: block;
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
  text-shadow: 0 1px 2px #000;
}

.inventory-section {
  min-height: 360px;
}

.inventory-tabs {
  display: flex;
  gap: 0;
  align-items: end;
  overflow-x: auto;
  margin: 18px 0 8px;
  border-radius: 5px 5px 0 0;
  border-bottom: 1px solid var(--accent);
  padding: 10px 14px 0;
  background: rgba(13, 8, 5, 0.72);
}

.inventory-tabs button {
  position: relative;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 0;
  padding: 0 11px 10px;
  background: transparent;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0.78;
}

.inventory-tabs button:hover,
.inventory-tabs button.active {
  opacity: 1;
  transform: none;
  box-shadow: none;
}

.inventory-tabs button.active::after {
  position: absolute;
  right: 4px;
  bottom: -5px;
  left: 4px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  box-shadow: 0 0 18px var(--accent-glow);
}

.inventory-tabs img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
}

.inventory-tabs .missing-icon::before {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--accent);
  content: "";
}

.inventory-search-wrap {
  display: flex;
  justify-content: center;
  padding: 14px 0 6px;
}

.inventory-search-wrap[hidden] {
  display: none;
}

.inventory-search-wrap input {
  width: min(180px, 80%);
  height: 32px;
  border-radius: 6px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 800;
}

.inventory-grid-shell {
  min-height: 250px;
  border-radius: 0 0 5px 5px;
  padding: 18px 18px 16px;
  background: rgba(13, 8, 5, 0.56);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(var(--inventory-columns, 9), 58px);
  grid-auto-rows: 58px;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  min-height: 58px;
  margin: 0 auto;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  overflow: visible;
}

.inventory-grid.is-search-results {
  border-color: transparent;
}

.inventory-card {
  width: 58px;
  height: 58px;
  border-radius: 4px;
}

.inventory-card .armor-icon {
  width: 58px;
  height: 58px;
}

.inventory-card .armor-icon img {
  width: 44px;
  height: 44px;
}

.inventory-card.empty {
  opacity: 1;
}

.inventory-card.empty .armor-icon::before {
  display: none;
}

.inventory-separator {
  grid-column: 1 / -1;
  height: 18px;
}

.inventory-empty {
  grid-column: 1 / -1;
  align-self: center;
  margin: 0;
  text-align: center;
}

.pets-list {
  max-width: 980px;
  margin-top: 18px;
}

.pets-summary {
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 900;
}

.pets-summary p {
  margin: 2px 0;
}

.pets-summary strong {
  color: var(--muted);
}

.pets-list h4 {
  margin: 22px 0 10px;
  color: #fff;
  font-size: 1.08rem;
}

.active-pet-card {
  display: flex;
  gap: 12px;
  align-items: center;
  width: max-content;
  max-width: 100%;
}

.active-pet-card .pet-icon {
  flex: 0 0 auto;
}

.active-pet-card strong {
  color: #ffb000;
  font-size: 1.05rem;
  text-transform: capitalize;
}

.active-pet-card p {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 900;
}

.pet-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
}

.pet-card:not(.active-pet-card) {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.pet-icon {
  width: 54px;
  height: 54px;
  color: #111;
  overflow: hidden;
}

.pet-icon .armor-icon,
.pet-icon img,
.pet-icon > img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  object-position: center;
  image-rendering: pixelated;
}

.active-pet-card .pet-icon img,
.active-pet-card .pet-icon > img {
  width: 50px;
  height: 50px;
}

.pet-icon-fallback {
  display: inline-grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pet-card b {
  color: #fff;
  font-size: 0.84rem;
  font-weight: 950;
}

.minions-list {
  max-width: 1280px;
  margin-top: 18px;
}

.minion-summary {
  width: max-content;
  max-width: 100%;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 14, 24, 0.42);
  color: var(--muted);
  font-weight: 900;
}

.minion-summary p {
  margin: 2px 0;
}

.minion-summary strong {
  color: var(--muted);
}

.minion-group {
  margin-top: 20px;
}

.minion-group h4 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.minion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.minion-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 7px;
  padding: 8px;
  background: rgba(7, 10, 16, 0.42);
  opacity: 0.48;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.minion-card.unlocked {
  opacity: 0.92;
  background: rgba(12, 18, 28, 0.62);
}

.minion-card.maxed {
  background: linear-gradient(180deg, rgba(36, 224, 122, 0.18), rgba(9, 14, 24, 0.60));
  box-shadow: inset 0 0 0 1px rgba(36, 224, 122, 0.18);
}

.minion-card:hover {
  transform: translateY(-2px);
  opacity: 1;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(36, 224, 122, 0.16);
}

.minion-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  font-weight: 900;
}

.minion-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}

.minion-card strong {
  min-width: 0;
  overflow: hidden;
  color: #d8dce5;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minion-card.unlocked strong {
  color: #fff;
}

.minion-card.maxed strong {
  color: #ffeb74;
}

.loading-overlay {
  position: fixed;
  inset: 40px 0 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(7px);
}

.loading-overlay[hidden] {
  display: none;
}

.loader-card {
  display: grid;
  justify-items: center;
  width: min(360px, calc(100% - 32px));
  border-radius: 8px;
  padding: 30px;
  background: rgba(16, 8, 5, 0.88);
  box-shadow: 0 26px 100px rgba(0, 0, 0, 0.55);
  animation: loaderPop 420ms ease both;
}

.loader-card strong {
  margin-top: 18px;
  color: #fff;
  font-size: 1.45rem;
}

.loader-card p {
  margin: 6px 0 20px;
  color: var(--muted);
  font-weight: 800;
}

.loader-cube {
  position: relative;
  width: 78px;
  height: 78px;
  animation: cubeSpin 1.2s linear infinite;
}

.loader-cube span {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18);
}

.loader-cube span:nth-child(1) {
  top: 0;
  left: 0;
}

.loader-cube span:nth-child(2) {
  top: 0;
  right: 0;
  animation: pulseBlock 900ms ease infinite 120ms;
}

.loader-cube span:nth-child(3) {
  bottom: 0;
  left: 0;
  animation: pulseBlock 900ms ease infinite 240ms;
}

.loader-cube span:nth-child(4) {
  right: 0;
  bottom: 0;
  animation: pulseBlock 900ms ease infinite 360ms;
}

.loader-bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.loader-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: loadingSweep 1.1s ease-in-out infinite;
}

@keyframes profileIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sectionRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes activeTabGlow {
  from {
    box-shadow: 0 0 10px rgba(16, 212, 97, 0.22);
  }
  to {
    box-shadow: 0 0 22px rgba(16, 212, 97, 0.52);
  }
}

@keyframes barSheen {
  0% {
    transform: translateX(-100%);
  }
  45%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes bestiarySweep {
  0%,
  62% {
    transform: translateX(-30%) rotate(18deg);
    opacity: 0;
  }
  74% {
    opacity: 1;
  }
  100% {
    transform: translateX(360%) rotate(18deg);
    opacity: 0;
  }
}

@keyframes enchantGlint {
  0%,
  74% {
    background-position: -120px 0, 0 0;
    opacity: 0.18;
  }
  86% {
    opacity: 0.78;
  }
  100% {
    background-position: 120px 0, 0 0;
    opacity: 0.18;
  }
}

@keyframes loaderPop {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@keyframes pulseBlock {
  50% {
    transform: scale(0.78);
    opacity: 0.7;
  }
}

@keyframes loadingSweep {
  0% {
    transform: translateX(-110%);
  }
  50% {
    transform: translateX(85%);
  }
  100% {
    transform: translateX(260%);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .settings-button {
    display: none;
  }

  .stats-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .skin-panel {
    position: static;
    min-height: 220px;
  }

  .stats-content {
    padding: 24px 12px 56px;
  }

  .top-search {
    display: none;
  }

  .stat-list,
  .stat-list-bars {
    grid-template-columns: 1fr;
  }

  .derived-stats {
    grid-template-columns: 1fr;
  }

  .favorite-grid {
    grid-template-columns: 1fr;
  }

  .progress-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }
}

/* Astral premium theme pass */
:root {
  --text: #f8fafc;
  --muted: #cbd5e1;
  --panel: rgba(12, 18, 28, 0.64);
  --panel-deep: rgba(8, 13, 22, 0.82);
  --topbar: rgba(12, 16, 24, 0.88);
  --accent: #24e07a;
  --accent-dark: #15b961;
  --accent-glow: rgba(36, 224, 122, 0.38);
  --cyan: #42d7ff;
  --gold: #ffbe3d;
  --line: rgba(255, 255, 255, 0.11);
  --glass: rgba(10, 15, 24, 0.58);
  --glass-strong: rgba(9, 14, 23, 0.78);
}

body {
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.18), rgba(8, 12, 20, 0.44)),
    linear-gradient(90deg, rgba(4, 8, 14, 0.06), rgba(4, 8, 14, 0.18)),
    url("/assets/skyblock-bg.png") center top / cover fixed;
}

body::before {
  inset: 40px 0 0;
  background:
    radial-gradient(circle at 22% 24%, rgba(66, 215, 255, 0.14), transparent 21rem),
    radial-gradient(circle at 72% 18%, rgba(255, 190, 61, 0.13), transparent 24rem),
    linear-gradient(90deg, rgba(3, 7, 13, 0.14), rgba(3, 7, 13, 0.02) 34%, rgba(3, 7, 13, 0.22));
  backdrop-filter: saturate(1.2) contrast(1.06);
}

.topbar {
  height: 46px;
  padding: 0 12px;
  background:
    linear-gradient(180deg, rgba(31, 41, 55, 0.92), var(--topbar));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px) saturate(1.35);
}

.brand-logo {
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 24px rgba(66, 215, 255, 0.32);
}

.brand strong {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.about-button {
  background: rgba(255, 255, 255, 0.84);
  color: #111827;
}

.settings-button {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.top-search {
  height: 34px;
  width: min(500px, 42vw);
  background: rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 0 1px var(--line), 0 12px 30px rgba(0, 0, 0, 0.18);
}

.top-search button {
  width: 62px;
  height: 34px;
  min-height: 34px;
  background: rgba(255, 255, 255, 0.06);
}

.lookup-panel {
  width: min(1080px, calc(100% - 32px));
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(12, 18, 28, 0.82), rgba(7, 10, 17, 0.72));
  box-shadow: 0 28px 110px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px) saturate(1.25);
}

.title-block {
  padding: 34px 24px 28px;
}

.search-row input {
  background: rgba(255, 255, 255, 0.10);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

button,
.profile-chip {
  background: linear-gradient(180deg, #2bea86, #10bd62);
  box-shadow: 0 12px 26px rgba(16, 189, 98, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

button:hover,
.profile-chip:hover,
.profile-chip.active {
  background: linear-gradient(180deg, #47f39b, #14c96a);
  box-shadow: 0 16px 36px rgba(16, 189, 98, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.home-grid {
  width: min(1080px, calc(100% - 32px));
}

.patreon-card,
.favorite-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.70), rgba(9, 14, 24, 0.62));
  box-shadow: 0 22px 74px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px) saturate(1.22);
}

.favorite-card:hover {
  background: linear-gradient(180deg, rgba(18, 29, 49, 0.82), rgba(10, 16, 27, 0.74));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(36, 224, 122, 0.24);
}

.stats-layout {
  grid-template-columns: minmax(310px, 30vw) minmax(0, 1fr);
}

.skin-panel {
  top: 46px;
  min-height: calc(100vh - 46px);
  background:
    radial-gradient(circle at 48% 38%, rgba(36, 224, 122, 0.10), transparent 18rem),
    linear-gradient(90deg, rgba(2, 6, 12, 0.12), rgba(2, 6, 12, 0));
}

.skin-panel img {
  width: min(305px, 80%);
  filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.56)) saturate(1.08);
}

.stats-content {
  min-height: calc(100vh - 46px);
  padding: 38px 26px 80px 0;
  background:
    linear-gradient(90deg, rgba(12, 18, 28, 0.48), rgba(12, 18, 28, 0.28)),
    radial-gradient(circle at 44% 8%, rgba(255, 255, 255, 0.13), transparent 20rem),
    radial-gradient(circle at 76% 48%, rgba(36, 224, 122, 0.10), transparent 20rem);
  backdrop-filter: blur(3px) saturate(1.2);
}

.player-header,
.level-card,
#skills-list,
.derived-stats,
.show-stats-button,
.summary-strip,
.profile-tabs,
.sections-grid {
  border-radius: 12px;
}

.player-header {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(9, 14, 24, 0.34));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#player-name,
#profile-name {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.action-row button {
  min-height: 32px;
  padding: 0 13px;
}

.profile-chip {
  min-height: 32px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 0 1px var(--line);
}

.level-card,
#skills-list,
.summary-strip,
.derived-stats {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(9, 14, 24, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#skills-list {
  margin-top: 14px;
}

.show-stats-button {
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(36, 224, 122, 0.16), rgba(66, 215, 255, 0.10));
}

.summary-strip {
  gap: 8px 16px;
  margin-top: 16px;
}

.summary-strip span {
  color: #f8fafc;
}

.summary-strip b {
  color: #a8b3c5;
}

.profile-tabs {
  gap: 4px;
  margin-top: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-bottom: 1px solid rgba(36, 224, 122, 0.72);
  background: rgba(9, 14, 24, 0.54);
  backdrop-filter: blur(12px) saturate(1.2);
}

.profile-tabs button {
  min-height: 48px;
  padding: 0 14px 12px;
  color: #d9e2ef;
}

.profile-tabs button.active {
  color: #fff;
}

.profile-tabs button.active::after {
  right: 10px;
  bottom: -5px;
  left: 10px;
  height: 7px;
}

.sections-grid {
  padding: 22px 24px 32px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(9, 14, 24, 0.46), rgba(7, 10, 16, 0.26));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

h3 {
  border-bottom: 0;
  position: relative;
  padding-bottom: 9px;
  letter-spacing: 0.01em;
}

h3::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 18px var(--accent-glow);
  content: "";
}

.progress-row {
  min-height: 48px;
}

.progress-icon {
  background: linear-gradient(180deg, #2bea86, #10bd62);
  box-shadow: 0 8px 20px rgba(16, 189, 98, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.progress-bar,
.slayer-progress {
  background: rgba(226, 232, 240, 0.38);
}

.progress-bar::before,
.slayer-progress::before {
  background: linear-gradient(90deg, #24e07a, #18bdff);
}

.collection-card,
.slayer-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 18, 28, 0.68), rgba(8, 13, 22, 0.50));
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gear-section h4,
.pets-list h4,
.collection-group h4 {
  color: #f8fafc;
}

.armor-card {
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.armor-card:hover,
.armor-card:focus-visible {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.armor-tooltip {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(5, 8, 14, 0.95);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.armor-tooltip-header {
  min-height: 76px;
}

.inventory-tabs {
  border: 1px solid var(--line);
  border-bottom-color: rgba(36, 224, 122, 0.74);
  background: rgba(8, 13, 22, 0.64);
}

.inventory-grid-shell {
  border: 1px solid var(--line);
  border-top: 0;
  background: rgba(8, 13, 22, 0.36);
}

.inventory-grid {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.10);
}

.pets-summary {
  width: max-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 14, 24, 0.42);
}

.active-pet-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 14, 24, 0.36);
}

@media (max-width: 820px) {
  .stats-content {
    padding: 18px 12px 56px;
  }

  .player-header,
  .level-card,
  #skills-list,
  .summary-strip,
  .profile-tabs,
  .sections-grid {
    border-radius: 10px;
  }

  .sections-grid {
    padding: 18px 14px 28px;
  }

  .bestiary-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bestiary-hero {
    align-items: flex-start;
    padding: 18px;
  }

  .bestiary-hero-icon {
    width: 72px;
    height: 72px;
  }

  .bestiary-hero-icon img {
    width: 52px;
    height: 52px;
  }
}
