@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Manrope:wght@300;400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #06070c;
  --panel: #0f1422;
  --panel-dark: #0b0f1a;
  --accent: #ffb36b;
  --accent-2: #6f59f4;
  --accent-3: #2fbb76;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.32);
  --success: #47d18c;
  --danger: #ff6b6b;
  --shadow-glow: 0 0 0 1px rgba(148, 163, 184, 0.15), 0 18px 40px rgba(5, 7, 12, 0.6);
  --shadow-aura: 0 0 28px rgba(124, 92, 255, 0.28);
  --gradient-hero: radial-gradient(circle at 12% 18%, rgba(110, 92, 255, 0.12), transparent 38%),
    radial-gradient(circle at 88% 12%, rgba(255, 179, 107, 0.12), transparent 36%),
    radial-gradient(circle at 52% 88%, rgba(47, 187, 118, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(9, 12, 20, 0.98), rgba(6, 7, 12, 0.98));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 1.5px;
}

body {
  background: var(--gradient-hero);
  color: var(--text);
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
}

.glass-panel {
  background: rgba(15, 20, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(16px);
}

.bulga-section-small {
  background: rgba(15, 20, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 24px;
}


#equipment-list .equipment__slot--fairy {
  order: 99;
}

@media (min-width: 768px) {
  .bulga-section-small {
    padding: 32px;
  }
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(148, 163, 184, 0.85);
  transition: color 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
}

.bulga-header__nav .nav-link::after {
  content: "—";
  margin-left: 12px;
  color: rgba(148, 163, 184, 0.5);
}

.bulga-header__nav .nav-link:last-child::after {
  content: "";
  margin-left: 0;
}

.hb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.2s ease;

}

.hb-button:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.hb-button.primary {
  background: linear-gradient(135deg, rgba(255, 179, 107, 0.92), rgba(111, 89, 244, 0.92));
  color: #0b0f1a;
  box-shadow: var(--shadow-aura);
}

.hb-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 26, 42, 0.6);
  padding: 16px;
  box-shadow: var(--shadow-glow);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(226, 232, 240, 0.8);
}

.stat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(27, 35, 54, 0.6);
  padding: 8px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(226, 232, 240, 0.7);
}

.stat-value {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.media-frame {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 15, 26, 0.6);
  box-shadow: var(--shadow-glow);
}

.media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-toggle {
  list-style: none;
}

.nav-toggle::-webkit-details-marker {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(6, 7, 12, 0.82);
  backdrop-filter: blur(12px);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.site-header__outer {
  width: 100%;
  padding: 16px;
}

.site-header__panel {
  border-radius: 24px;
  padding: 16px;
  width: 100%;
}

.site-header__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  flex: 0 1 320px;
  min-width: 0;
}

.site-header__logo {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 179, 107, 0.95), rgba(111, 89, 244, 0.95));
  padding: 2px;
  display: inline-flex;
}

.site-header__logo-inner {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--panel-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.site-header__eyebrow {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.site-header__subtitle {
  display: block;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__nav {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__menu {
  position: relative;
}

.site-header__logout {
  display: none;
}

.site-header__drawer {
  display: none;
  margin-top: 12px;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 15, 26, 0.85);
  box-shadow: var(--shadow-glow);
}

.header-hero-inline {
  display: none;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.has-session .header-hero-inline {
  display: flex;
}

.header-hero-inline__pill {
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.header-hero-inline__pill .stat-value {
  font-size: 13px;
}

.site-header__menu[open] .site-header__drawer {
  display: grid;
}

.page {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

.page.min-h-screen {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1152px;
  margin: 0 auto;
  padding: 12px 12px 72px;
}

body.is-loading .panel--login,
body.is-loading .panel--hero {
  display: none;
}

.hub-loading {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

body.is-loading .hub-loading {
  display: flex;
}

.hub-loading__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 26px;
  border-radius: 16px;
  background: rgba(15, 20, 34, 0.82);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(10px);
  font-size: 15px;
  color: var(--muted);
}

.hub-loading__spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.35);
  border-top-color: var(--accent);
  animation: hub-spin 0.9s linear infinite;
}

@keyframes hub-spin {
  to {
    transform: rotate(360deg);
  }
}

.page.is-centered .main {
  min-height: calc(100vh - 160px);
  align-items: center;
  justify-content: center;
}

.has-session .page.is-centered .main {
  min-height: auto;
  align-items: stretch;
  justify-content: flex-start;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(15, 20, 34, 0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 32px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 40;
}

.topbar__menu {
  position: relative;
}

.topbar__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.topbar__toggle::marker,
.topbar__toggle::-webkit-details-marker {
  display: none;
}

.topbar__burger {
  position: relative;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}

.topbar__burger::before,
.topbar__burger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.topbar__burger::before {
  top: -6px;
}

.topbar__burger::after {
  top: 6px;
}

.topbar__links {
  display: none;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 220px;
  padding: 12px;
  background: rgba(11, 15, 26, 0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.topbar__menu[open] .topbar__links {
  display: flex;
}

.mobile-core-actions {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(480px, calc(100% - 32px));
  z-index: 45;
}

.mobile-core-actions__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
}

.mobile-core-actions__link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mobile-core-actions__link:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.mobile-core-actions__menu {
  position: relative;
  flex: 1;
}

.mobile-core-actions__link--menu {
  list-style: none;
}

.mobile-core-actions__link--menu::-webkit-details-marker {
  display: none;
}

.mobile-core-actions__label {
  white-space: nowrap;
}

.mobile-core-actions__burger {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-core-actions__burger::before,
.mobile-core-actions__burger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-core-actions__burger::before {
  top: -6px;
}

.mobile-core-actions__burger::after {
  top: 6px;
}

.mobile-core-actions__drawer {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  min-width: 220px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 15, 26, 0.92);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(12px);
  gap: 10px;
  flex-direction: column;
}

.mobile-core-actions__menu[open] .mobile-core-actions__drawer {
  display: flex;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.brand__logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 179, 107, 0.95), rgba(111, 89, 244, 0.95));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0b0d12;
  box-shadow: var(--shadow-aura);
}

.brand__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand__subtitle {
  font-size: 13px;
  color: var(--muted);
}


.panel {
  background: linear-gradient(135deg, rgba(20, 26, 42, 0.9), rgba(9, 12, 20, 0.96));
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(12px);
}

.panel__header {
  margin-bottom: 20px;
}

.panel__header--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel__header h1,
.panel__header h2,
.panel__header h3 {
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 6px;
}

.panel__header p {
  color: var(--muted);
  font-size: 14px;
}

.panel__subtitle {
  margin: 18px 0 10px;
  font-weight: 600;
  font-size: 16px;
}

.code-block {
  background: rgba(11, 13, 18, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.table-wrapper {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(11, 13, 18, 0.65);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
}

.data-table thead {
  background: rgba(17, 22, 32, 0.9);
  color: var(--text);
}

.data-table tbody tr {
  border-top: 1px solid var(--border);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(17, 22, 32, 0.4);
}

.panel--login {
  max-width: 980px;
  width: 100%;
}

.has-session .panel--login {
  display: none;
}

.auth-layout {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.auth-content {
  flex: 1;
  min-width: 0;
}

.auth-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(244, 201, 93, 0.15), rgba(164, 101, 255, 0.08));
  border-radius: 16px;
  border: 1px solid rgba(244, 201, 93, 0.15);
  padding: 16px;
}

.auth-visual img {
  width: min(320px, 100%);
  height: auto;
  object-fit: contain;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.field input {
  background: var(--panel-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.field textarea {
  background: var(--panel-dark);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  min-height: 140px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255, 179, 107, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 179, 107, 0.18);
  transform: translateY(-1px);
}

.field .select {
  background: var(--panel-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text);
}

.login-form__actions {
  display: flex;
  gap: 12px;
}

.login-form__links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.login-form__hint {
  font-size: 13px;
  color: var(--muted);
}

.login-form__hint.is-error {
  color: var(--danger);
}

.recaptcha-container {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

.recaptcha-container--center {
  justify-content: center;
}

.is-hidden {
  display: none !important;
}

.button {
  border-radius: 12px;
  padding: 10px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}

.button--small {
  padding: 8px 14px;
  font-size: 11px;
}

.button--primary {
  background: linear-gradient(135deg, rgba(255, 179, 107, 0.92), rgba(111, 89, 244, 0.92));
  color: #0b0d12;
  box-shadow: var(--shadow-aura);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.button--link {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button--link:hover {
  text-decoration: underline;
}

.login-form__section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 8px;
}

.login-form__section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 12, 0.78);
  display: flex;
  align-items: flex-start;
  overflow-y: auto;
  justify-content: center;
  padding: 24px;
  z-index: 120;
}

.modal__card {
  width: min(420px, 90vw);
  background: linear-gradient(135deg, rgba(20, 26, 42, 0.95), rgba(9, 12, 20, 0.98));
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(12px);
  padding: 20px;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal__card--wide {
  width: min(760px, 96vw);
  max-height: 82vh;
}

.modal__card--battle {
  width: min(520px, 92vw);
  max-height: 78vh;
}

.modal__card--forge {
  width: min(480px, 92vw);
  max-height: 82vh;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal__title {
  font-size: 18px;
  font-weight: 700;
}

.modal__message {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  font-family: "Cinzel", "Times New Roman", serif;
  letter-spacing: 0.02em;
}

.modal__image {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(11, 13, 18, 0.5);
  padding: 8px;
}

.battle-modal__image {
  max-height: 150px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal__actions--space {
  justify-content: space-between;
  align-items: center;
}

.forge-modal__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

.equip-modal__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 0;
}

@keyframes smooth-fade-in {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    /* Спира на точното място */
  }
}

.modal {
  animation: smooth-fade-in 0.5s ease-out forwards;
}


.panel--hero {
  display: none;
}

.panel--hero.is-visible {
  display: block;
}

.has-session .panel--hero {
  display: block;
}

.badge {
  background: rgba(255, 179, 107, 0.15);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}


.badge--level {
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fde68a;
}

.bulga-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 179, 107, 0.15);
  color: var(--accent);
  border: 1px solid rgba(255, 179, 107, 0.35);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.set-badge-row {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

.set-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.set-badge--match {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.5);
}

.set-badge--full {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
  animation: set-badge-pulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 12px 0 rgba(248, 113, 113, 0.4);
}

@keyframes set-badge-pulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 12px 0 rgba(248, 113, 113, 0.4);
  }

  50% {
    opacity: 0.5;
    box-shadow: 0 0 20px 6px rgba(248, 113, 113, 0.25);
  }
}

.hero-card {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px;
  background: rgba(15, 20, 34, 0.75);
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(12px);
}

.hero-card__portrait {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 240px;
}

.hero-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 179, 107, 0.35), rgba(111, 89, 244, 0.35));
  display: grid;
  place-items: center;
  font-size: 32px;
}

.hero-card__meta h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.hero-card__meta p {
  color: var(--muted);
  font-size: 14px;
}

.hero-card__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  flex: 1;
}

.hero-consumables {
  background: rgba(15, 20, 34, 0.75);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 18px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(12px);
}

.hero-consumables__header h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.hero-consumables__header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-consumables__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.consumable-card {
  background: rgba(20, 26, 42, 0.7);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.consumable-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.consumable-card__title {
  font-weight: 600;
}

.consumable-card__count {
  font-size: 12px;
  color: var(--accent);
  background: rgba(255, 179, 107, 0.18);
  padding: 2px 8px;
  border-radius: 999px;
}

.consumable-card__description {
  font-size: 13px;
  color: var(--muted);
}

.stat {
  background: rgba(20, 26, 42, 0.7);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat__icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.stat__label {
  font-size: 12px;
  color: var(--muted);
}

.stat__value {
  font-size: 16px;
  font-weight: 600;
}

.stat__bar {
  background: #1e2433;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.stat__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4cd47b, #f4c95d);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.rules {
  gap: 24px;
}

.ranking {
  gap: 24px;
}

.ranking-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
}

.ranking-hero__highlights {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  text-align: center;
}

.ranking-hero__image {
  width: clamp(200px, 100vw, 300px) !important;
  height: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(12, 16, 26, 0.7);
  padding: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 20px;
}

/* Dungeon biome selector */
.dungeon-select {
  position: relative;
}

.dungeon-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 17, 0.85);
  color: #e5e7eb;
  font-weight: 600;
  cursor: pointer;
}

.dungeon-select__thumb {
  width: 48px;
  height: 36px;
  border-radius: 0.6rem;
  background: #111827 url("/static/images/forest.png") center/cover no-repeat;
  flex-shrink: 0;
}

.dungeon-select__label {
  flex: 1;
  text-align: left;
}

.dungeon-select__chevron {
  color: #9ca3af;
}

.dungeon-select__list {
  position: absolute;
  inset-inline: 0;
  margin: 0;
  padding: 0.35rem 0.35rem 0.5rem;
  border-radius: 0.9rem;
  background: rgba(8, 10, 17, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
  z-index: 30;
  display: none;
}

.dungeon-select__list.is-open {
  display: block;
}

.dungeon-select__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.65rem;
  border-radius: 0.75rem;
  cursor: pointer;
  color: #e5e7eb;
}

.dungeon-select__option img {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.dungeon-select__option:hover,
.dungeon-select__option:focus {
  background: rgba(255, 255, 255, 0.06);
}

.dungeon-code-input {
  width: 100%;
  max-width: 220px;
}

.donation-hero__media {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.donation-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 14px 32px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  margin-top: 20px;
}

@media (min-width: 900px) {
  .donation-hero__media {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 22px;
  }

  .donation-hero__cta {
    min-width: 220px;
    text-align: center;
  }
}

.ranking-hero__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.ranking-hero__value {
  font-size: 15px;
  font-weight: 600;
}

.ranking-hero__highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 60px;
  margin-top: 20px;
}

.ranking-hero__highlights>div {
  flex: 1;
  text-align: center;
}


.ranking__loading {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.ranking-card__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.ranking-card__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
}

.ranking-card__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ranking-card__actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ranking-sort--active {
  background: linear-gradient(135deg, rgba(244, 201, 93, 0.2), rgba(164, 101, 255, 0.2));
  border-color: rgba(244, 201, 93, 0.6);
  color: var(--text);
}

.ranking-total__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ranking-total__label {
  display: flex;
  /* text + number on one line */
  align-items: center;
  gap: 12px;

  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Make the number stand out clearly. */
.ranking-total__value {
  font-size: clamp(28px, 4vw, 44px);
  /* larger, but not excessive */
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);

  line-height: 1;
  margin: 0;

  animation: ranking-blink 1.2s steps(2, start) infinite;
}

.ranking-total__note {
  color: var(--muted);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .ranking-total__value {
    animation: none;
  }
}

@keyframes ranking-blink {

  0%,
  48% {
    opacity: 1;
  }

  52%,
  100% {
    opacity: 0.2;
  }
}

.ecosystem {
  gap: 24px;
}

.ecosystem-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.ecosystem__loading {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.ecosystem-card__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ecosystem-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ecosystem-stat {
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px;
  background: rgba(16, 19, 28, 0.7);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ecosystem-stat__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.ecosystem-stat__value {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  margin: 0;
}

.ecosystem-stat__meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.ecosystem-stat__bar {
  width: 100%;
  height: 6px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.ecosystem-stat__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, rgba(244, 201, 93, 0.8), rgba(56, 189, 248, 0.8));
  transition: width 0.4s ease;
}

.ecosystem-grid {
  margin-top: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ecosystem-panel__header h3 {
  margin: 0;
}

.ecosystem-panel__header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ecosystem-table-wrapper {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12, 16, 26, 0.7);
  overflow-x: auto;
}

.ecosystem-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 320px;
  font-size: 14px;
}

.ecosystem-table th,
.ecosystem-table td {
  padding: 10px 12px;
  text-align: left;
}

.ecosystem-table thead {
  background: rgba(15, 23, 42, 0.7);
}

.ecosystem-table__label {
  text-transform: capitalize;
  font-weight: 600;
}

.ecosystem-legend {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.legend-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(12, 16, 26, 0.6);
  font-size: 13px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.legend-swatch--mythic {
  background: linear-gradient(135deg, #f87171, #facc15);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.5);
}

.legend-swatch--ascended {
  background: linear-gradient(135deg, #ffffff, #f4c95d);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}



.rules-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rules-hero__highlights {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.rules-hero__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.rules-hero__value {
  font-size: 15px;
  font-weight: 600;
}

.rules-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.rules-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.policy-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.policy-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(16, 19, 28, 0.7);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.policy-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.rules-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.rules-paragraph {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.rules-list {
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.rules-list strong {
  color: var(--text);
}

.rules-note {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(16, 19, 28, 0.6);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.rules-table-wrapper {
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow-x: auto;
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rules-table th,
.rules-table td {
  padding: 12px 14px;
  text-align: left;
}

.ranking-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ranking-table {
  min-width: 520px;
}


.ranking-player-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ranking-attack-btn {
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.1;
}

main:has(.ranking-table) {
  display: flex;
  gap: 20px;
}

.panel.ranking-card {
  flex: 1;
  border: 0;
}

.ranking-hero {
  border: 0;
  flex: 0.3;
  min-width: min-content;
  align-items: center;
}

@media (max-width: 640px) {
  .ranking-table {
    min-width: 0;
  }

  .ranking-table th,
  .ranking-table td {
    padding: 10px 8px;
    font-size: 12px;
  }

}

.rules-table thead {
  background: rgba(16, 19, 28, 0.85);
  color: var(--muted);
}

.rules-table tbody tr {
  border-top: 1px solid var(--border);
}

.rules-table tbody tr:nth-child(even) {
  background: rgba(16, 19, 28, 0.45);
}

.xp-sale__controls {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.xp-sale__controls .input {
  min-width: 200px;
  flex: 1;
}

.rules-gold {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rules-gold__image {
  width: min(220px, 100%);
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(12, 16, 26, 0.7);
  padding: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.equipment,
.inventory {
  display: grid;
  gap: 14px;
}

#equipment-list {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  #equipment-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "fairy head mark"
      "weapon armor shield"
      ". runeword ."
      ". boots .";
    align-items: start;
  }

  #equipment-list .equipment__slot--fairy {
    grid-area: fairy;
    order: 0;
  }

  #equipment-list .equipment__slot--mark {
    grid-area: mark;
  }

  #equipment-list .equipment__slot--head {
    grid-area: head;
  }

  #equipment-list .equipment__slot--weapon {
    grid-area: weapon;
  }

  #equipment-list .equipment__slot--armor {
    grid-area: armor;
  }

  #equipment-list .equipment__slot--shield {
    grid-area: shield;
  }

  #equipment-list .equipment__slot--runeword {
    grid-area: runeword;
  }

  #equipment-list .equipment__slot--boots {
    grid-area: boots;
  }
}

.brand-footer {
  margin-top: 6px;
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.9);
}

.brand-footer__tagline {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.brand-footer__links a {
  color: rgba(226, 232, 240, 0.78);
  text-decoration: none;
  font-weight: 500;
}

.brand-footer__links a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.inventory-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.inventory-panel__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.inventory-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.6);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(226, 232, 240, 0.8);
}

.inventory-search input {
  width: min(240px, 100%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 16px;
  color: #e2e8f0;
  font-size: 13px;
}

.inventory-search input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.inventory-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.inventory-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 15, 26, 0.6);
}

.inventory-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-section__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.inventory-section__empty {
  margin: 0;
  color: rgba(148, 163, 184, 0.8);
}

.inventory-rarity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.inventory-rarity__header {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
}

.inventory-rarity__title {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.8);
}

.inventory-group {
  display: contents;
}

.inventory-group__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.45);
  padding: 12px;
}

.inventory-group__summary--static {
  cursor: default;
}

.inventory-group__summary--trigger {
  border: none;
  background: rgba(15, 23, 42, 0.45);
  text-align: left;
}

.inventory-group[open] .inventory-group__summary,
.inventory-group--open .inventory-group__summary {
  background: rgba(30, 41, 59, 0.5);
}

.inventory-group__summary::-webkit-details-marker {
  display: none;
}

.inventory-group__label {
  font-weight: 600;
  font-size: 16px;
}

.inventory-group__count {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(148, 163, 184, 0.8);
}

.inventory-group__items {
  margin-top: 16px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-group__items--compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* Keep Other Items at a consistent 4-column layout so single items don't upscale */
.inventory-section--other .inventory-group__items {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.inventory-card {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  gap: 16px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: radial-gradient(circle at 30% 20%, rgba(30, 41, 59, 0.55), rgba(11, 15, 26, 0.9));
  padding: clamp(12px, 2.5vw, 18px);
  box-shadow: 0 12px 30px rgba(7, 10, 20, 0.55);
}

.inventory-grid .inventory-card:hover {
  box-shadow: 0 0 2px rgba(226, 232, 240, 0.6);
}


.inventory-card--blood,
.inventory__item--blood,
.equipment__item--blood {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.inventory-card--blood > *,
.inventory__item--blood > *,
.equipment__item--blood > * {
  position: relative;
  z-index: 1;
}

.inventory-card--blood::before,
.inventory__item--blood::before,
.equipment__item--blood::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(80% 55% at 0% 0%, rgba(172, 8, 24, 0.38) 0%, rgba(172, 8, 24, 0.1) 40%, transparent 72%),
    radial-gradient(32px 18px at 18% 0%, rgba(210, 16, 35, 0.4) 0%, transparent 78%),
    radial-gradient(28px 16px at 38% 0%, rgba(160, 8, 23, 0.36) 0%, transparent 76%);
  pointer-events: none;
}

.inventory-card--blood::after,
.inventory__item--blood::after,
.equipment__item--blood::after {
  content: "";
  position: absolute;
  left: 12%;
  top: -12px;
  width: 4px;
  height: 10px;
  border-radius: 999px;
  z-index: 2;
  background: radial-gradient(circle at 30% 30%, #ff9aa3 0%, #b40f22 65%, #6f0914 100%);
  box-shadow: 16px 0 0 0 rgba(184, 15, 34, 0.95), 34px 0 0 0 rgba(143, 8, 20, 0.9), 56px 0 0 0 rgba(128, 7, 18, 0.86);
  animation: blood-drip-fall 1.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes blood-drip-fall {
  0% {
    transform: translateY(-8px) scaleY(0.8);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  70% {
    transform: translateY(54px) scaleY(1);
    opacity: 0.95;
  }
  100% {
    transform: translateY(76px) scaleY(1.08);
    opacity: 0;
  }
}

.inventory-card__body {
  display: flex;
  flex-direction: column;
  height: 100%;
}


.inventory-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 12px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 12, 21, 0.8);
  aspect-ratio: 1 / 1;
  width: 100%;
}

.inventory-card__media img {
  /* width: clamp(72px, 18vw, 120px);
  height: clamp(72px, 18vw, 120px); */
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 5px;
  display: block;
}

.inventory-card__media--blood,
.item__image-shell--blood {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
}

.inventory-card__media--blood::before,
.item__image-shell--blood::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(120, 0, 15, 0) 0 12%,
      rgba(165, 8, 28, 0.22) 12% 25%,
      rgba(98, 2, 14, 0.48) 25% 35%,
      rgba(120, 0, 15, 0) 35% 48%
    ),
    linear-gradient(180deg, rgba(196, 16, 39, 0.42) 0%, rgba(114, 7, 21, 0.2) 60%, rgba(90, 4, 14, 0.08) 100%);
  background-size: 100% 180%, 100% 100%;
  animation: blood-image-flow 2.2s linear infinite;
}

.inventory-card__media--blood::after,
.item__image-shell--blood::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(16px 24px at 8% 6%, rgba(210, 15, 40, 0.72) 0%, rgba(210, 15, 40, 0) 75%),
    radial-gradient(14px 22px at 28% 4%, rgba(177, 11, 33, 0.7) 0%, rgba(177, 11, 33, 0) 75%),
    radial-gradient(14px 22px at 48% 5%, rgba(143, 8, 24, 0.72) 0%, rgba(143, 8, 24, 0) 75%),
    radial-gradient(14px 22px at 70% 3%, rgba(160, 8, 30, 0.72) 0%, rgba(160, 8, 30, 0) 75%),
    radial-gradient(14px 22px at 90% 5%, rgba(188, 11, 34, 0.72) 0%, rgba(188, 11, 34, 0) 75%);
  animation: blood-image-drip 1.6s ease-in-out infinite;
}

@keyframes blood-image-flow {
  0% {
    background-position: 0 -80%, 0 0;
  }
  100% {
    background-position: 0 120%, 0 0;
  }
}

@keyframes blood-image-drip {
  0%,
  100% {
    transform: translateY(-2px);
    opacity: 0.75;
  }
  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

.inventory-card__rarity {
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
  margin-bottom: 10px;
}

.inventory-card__name {
  min-height: 2.4em;
  line-height: 1.2em;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 600;

}

.inventory-card__detail {
  margin-bottom: 12px;
  color: rgba(148, 163, 184, 0.85);
}

.inventory-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  /* gap: clamp(8px, 1.5vw, 12px); */
  margin-top: auto;
}

.inventory-card__actions .hb-button {
  flex: 1;
}

.inventory-card[data-rarity="common"] .inventory-card__rarity {
  color: rgba(148, 163, 184, 0.9);
}

.inventory-card[data-rarity="uncommon"] .inventory-card__rarity {
  color: #9ee6b5;
}

.inventory-card[data-rarity="rare"] .inventory-card__rarity {
  color: #a5b4fc;
}

.inventory-card[data-rarity="epic"] .inventory-card__rarity {
  color: #c4b5fd;
}

.inventory-card[data-rarity="legendary"] .inventory-card__rarity {
  color: #ffd39a;
}

.inventory-group-modal__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.inventory-group-modal__card {
  max-width: 960px;
}

.inventory-group-modal__list .inventory-card__media {
  padding: clamp(12px, 3vw, 18px);
}

.inventory-group-modal__list .inventory-card__media img {
  width: clamp(128px, 38vw, 192px);
  height: clamp(128px, 38vw, 192px);
}

@media (max-width: 640px) {
  .inventory-group-modal__list {
    grid-template-columns: 1fr;
  }

  .inventory-group-modal__list .inventory-card__media {
    padding: clamp(16px, 6vw, 22px);
  }

  .inventory-group-modal__list .inventory-card__media img {
    width: clamp(150px, 55vw, 210px);
    height: clamp(150px, 55vw, 210px);
  }
}

.quests__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.quests__section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.quests__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.quests__header h4 {
  margin: 0;
  font-size: 16px;
}

.quests__reset {
  color: var(--muted);
  font-size: 12px;
}

.quests__list,
.quests__leaderboard {
  display: grid;
  gap: 12px;
}

.quest-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  background: rgba(12, 16, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.quest-card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quest-card__meta h5 {
  margin: 0;
  font-size: 15px;
}

.quest-card__meta p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.quest-card__status {
  font-size: 12px;
  color: var(--muted);
}

.quest-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 125px;
  flex-shrink: 0;
  min-width: min-content;
}

.quest-card__actions > buttons {
  width: 100%;
  
}

.quest-card.is-complete {
  opacity: 0.75;
}

.quest-leaderboard__entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(12, 16, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
}

.quest-leaderboard__rank {
  font-weight: 700;
  color: var(--accent);
}

.gold-sale__list {
  display: grid;
  gap: 12px;
}

.gold-sale__item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 13, 18, 0.65);
}

.gold-sale__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}

.gold-sale__meta strong {
  font-size: 15px;
}

.gold-sale__meta span {
  color: var(--muted);
  font-size: 12px;
}

.gold-sale__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.gold-sale__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
}

.gold-sale__status.is-pending {
  color: var(--accent);
}

.gold-sale__status.is-pending::before {
  background: var(--accent);
}

.gold-sale__status.is-done {
  color: #5fe08b;
}

.gold-sale__status.is-done::before {
  background: #5fe08b;
}

.gold-sale__status.is-rejected {
  color: #ff6b6b;
}

.gold-sale__status.is-rejected::before {
  background: #ff6b6b;
}

.gold-sale__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gold-sale__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.equipment__slot {
  display: grid;
  gap: 8px;
}


.equipment__slot--blood .slot__label {
  color: rgba(254, 202, 202, 0.98);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.65);
}

.equipment__slot--blood {
  position: relative;
}

.equipment__slot--blood::before,
.equipment__slot--blood::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.equipment__slot--blood::before {
  left: 8px;
  right: 8px;
  top: 28px;
  bottom: 8px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.28), rgba(127, 29, 29, 0.08) 65%, transparent 100%);
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.22);
  z-index: 0;
}

.equipment__slot--blood::after {
  left: 14px;
  top: 26px;
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ff9aa3 0%, #b40f22 65%, #6f0914 100%);
  box-shadow:
    14px 0 0 0 rgba(184, 15, 34, 0.95),
    30px 0 0 0 rgba(143, 8, 20, 0.9),
    46px 0 0 0 rgba(128, 7, 18, 0.86),
    62px 0 0 0 rgba(184, 15, 34, 0.9);
  animation: equipment-slot-blood-drip 1.4s ease-in-out infinite;
  z-index: 1;
}

.equipment__slot--blood > * {
  position: relative;
  z-index: 2;
}

.equipment__slot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.slot__label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.slot__detail {
  display: grid;
  gap: 4px;
  text-align: right;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.9);
}

.slot__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(15, 23, 42, 0.65);
}

.slot__badge[data-rarity="common"] {
  border-color: rgba(148, 163, 184, 0.55);
  color: rgba(148, 163, 184, 0.95);
}

.slot__badge[data-rarity="uncommon"] {
  border-color: rgba(94, 234, 212, 0.5);
  color: #9ee6b5;
}

.slot__badge[data-rarity="rare"] {
  border-color: rgba(129, 140, 248, 0.6);
  color: #a5b4fc;
}

.slot__badge[data-rarity="epic"] {
  border-color: rgba(167, 139, 250, 0.6);
  color: #c4b5fd;
}

.slot__badge[data-rarity="legendary"] {
  border-color: rgba(255, 193, 102, 0.65);
  color: #ffd39a;
}

.slot__toughness {
  color: rgba(148, 163, 184, 0.9);
}

.equipment__item,
.inventory__item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(11, 13, 18, 0.65);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}


.equipment__slot--blood .equipment__item {
  border-color: rgba(248, 18, 18, 1) !important;
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.62) 0%, rgba(69, 10, 10, 0.74) 100%);
  box-shadow:
    0 0 24px rgba(239, 68, 68, 0.78),
    0 0 42px rgba(153, 27, 27, 0.72),
    inset 0 0 0 1px rgba(254, 202, 202, 0.42);
}

.equipment__slot--blood .slot__toughness {
  color: rgba(254, 226, 226, 0.98);
}

.equipment__item[data-rarity] {
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: 0 0 18px rgba(15, 23, 42, 0.35);
}

.equipment__item[data-rarity="common"] {
  box-shadow: 0 0 18px rgba(148, 163, 184, 0.25);
}

.equipment__item[data-rarity="uncommon"] {
  border-color: rgba(94, 234, 212, 0.4);
  box-shadow: 0 0 22px rgba(94, 234, 212, 0.3);
}

.equipment__item[data-rarity="rare"] {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.35);
}

.equipment__item[data-rarity="epic"] {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 26px rgba(167, 139, 250, 0.35);
}

.equipment__item[data-rarity="legendary"] {
  border-color: rgba(255, 193, 102, 0.55);
  box-shadow: 0 0 26px rgba(255, 193, 102, 0.35);
}

.equipment__item[data-rarity="mythic"] {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 28px rgba(248, 113, 113, 0.45);
}

.equipment__item[data-rarity="ascended"] {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.5), 0 0 12px rgba(244, 185, 65, 0.6);
}

.equipment__item[data-rarity="celestial"] {
  border-color: rgba(129, 230, 255, 0.85);
  box-shadow: 0 0 36px rgba(129, 230, 255, 0.55), 0 0 18px rgba(33, 160, 255, 0.55);
}

.equipment__item[data-rarity="transcendent"] {
  border-color: rgba(186, 147, 255, 0.9);
  box-shadow: 0 0 40px rgba(186, 147, 255, 0.6), 0 0 20px rgba(116, 66, 255, 0.6);
}

.equipment__item[data-rarity="eternal"] {
  border-color: rgba(255, 185, 130, 0.95);
  box-shadow: 0 0 44px rgba(255, 185, 130, 0.65), 0 0 22px rgba(255, 129, 66, 0.65);
}

.equipment__item[data-rarity="god_tier"] {
  border-color: rgba(255, 245, 200, 1);
  box-shadow: 0 0 50px rgba(255, 245, 200, 0.75), 0 0 28px rgba(255, 210, 90, 0.8);
}


.equipment__item[data-rarity="runeword"] {
  border-color: rgba(148, 163, 184, 0.75);
  box-shadow: 0 0 28px rgba(148, 163, 184, 0.38);
  animation: equipment-runeword-pulse 1.4s ease-in-out infinite;
}

.equipment__item--blood {
  border-color: rgba(248, 18, 18, 1) !important;
  /* Very bright red pulse on equipped blood items */
  box-shadow:
    0 0 18px rgba(255, 46, 46, 0.85),
    0 0 34px rgba(220, 20, 20, 0.8),
    0 0 58px rgba(160, 10, 10, 0.72),
    inset 0 0 0 1px rgba(255, 140, 140, 0.7),
    inset 0 -18px 26px rgba(127, 29, 29, 0.5);
  animation: equipment-blood-rage-pulse 0.9s ease-in-out infinite;
}

.equipment__item--blood > * {
  position: relative;
  z-index: 3;
}

.equipment__item--blood::before {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(198, 18, 43, 0.78) 0%, rgba(120, 5, 20, 0.46) 45%, rgba(70, 2, 11, 0.2) 100%),
    repeating-linear-gradient(
      180deg,
      rgba(155, 10, 30, 0) 0 9%,
      rgba(198, 18, 43, 0.58) 9% 20%,
      rgba(110, 3, 18, 0.72) 20% 34%,
      rgba(155, 10, 30, 0) 34% 50%
    );
  background-size: 100% 100%, 100% 220%;
  animation: equipment-blood-flow 1.2s linear infinite, equipment-blood-spray 0.95s ease-in-out infinite;
  opacity: 0.95;
  mix-blend-mode: screen;
}

.equipment__item--blood::after {
  z-index: 4;
  left: 2px;
  top: -14px;
  width: 5px;
  height: 16px;
  border-radius: 999px;
  box-shadow:
    10px 0 0 0 rgba(184, 15, 34, 0.98),
    22px 0 0 0 rgba(143, 8, 20, 0.96),
    34px 0 0 0 rgba(170, 8, 27, 0.96),
    46px 0 0 0 rgba(128, 7, 18, 0.96),
    58px 0 0 0 rgba(154, 8, 24, 0.96),
    70px 0 0 0 rgba(182, 13, 35, 0.96),
    82px 0 0 0 rgba(140, 7, 21, 0.96),
    94px 0 0 0 rgba(172, 11, 30, 0.96);
  animation: equipment-blood-drip 1.0s ease-in-out infinite;
}

.equipment__item--blood .item__meta {
  color: #fecaca;
}

@keyframes equipment-slot-blood-drip {
  0% {
    transform: translateY(-7px) scaleY(0.78);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  75% {
    transform: translateY(48px) scaleY(1);
    opacity: 1;
  }
  100% {
    transform: translateY(62px) scaleY(1.28);
    opacity: 0;
  }
}

@keyframes equipment-blood-flow {
  0% {
    background-position: 0 0, 0 -120%;
  }
  100% {
    background-position: 0 0, 0 140%;
  }
}

@keyframes equipment-blood-drip {
  0% {
    transform: translateY(-12px) scaleY(0.82);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  65% {
    transform: translateY(42px) scaleY(1);
    opacity: 0.95;
  }
  100% {
    transform: translateY(62px) scaleY(1.15);
    opacity: 0;
  }
}


@keyframes equipment-blood-rage-pulse {
  0%,
  100% {
    border-color: rgba(255, 28, 28, 0.95);
    box-shadow:
      0 0 16px rgba(255, 40, 40, 0.72),
      0 0 30px rgba(220, 24, 24, 0.68),
      0 0 44px rgba(160, 10, 10, 0.58),
      inset 0 0 0 1px rgba(255, 160, 160, 0.65),
      inset 0 -14px 20px rgba(127, 29, 29, 0.4);
  }
  50% {
    border-color: rgba(255, 70, 70, 1);
    box-shadow:
      0 0 24px rgba(255, 70, 70, 1),
      0 0 42px rgba(235, 24, 24, 0.92),
      0 0 72px rgba(179, 10, 10, 0.86),
      inset 0 0 0 1px rgba(255, 190, 190, 0.85),
      inset 0 -20px 30px rgba(145, 15, 15, 0.62);
  }
}

@keyframes equipment-blood-spray {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1.1) brightness(1.04);
  }
  50% {
    transform: scale(1.02);
    filter: saturate(1.35) brightness(1.2);
  }
}

@keyframes equipment-runeword-pulse {
  0%, 100% {
    box-shadow: 0 0 18px rgba(148, 163, 184, 0.25);
  }
  50% {
    box-shadow: 0 0 34px rgba(148, 163, 184, 0.55);
  }
}

.inventory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.inventory__item {
  flex-direction: column;
  align-items: center;
  padding: 16px;
  gap: 10px;
  overflow: hidden;
}

.inventory__item .item__meta {
  align-items: center;
  text-align: center;
}

.equipment__item--empty {
  background: rgba(11, 13, 18, 0.85);
  border: 1px solid rgba(37, 44, 61, 0.6);
  height: 68px;
}

.item__image-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.equipment__item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  transition: transform 0.18s ease, filter 0.18s ease;
  will-change: transform;
  transform-origin: center;
  display: block;
}

.inventory__item img {
  width: 180px;
  height: 180px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.equipment__item:hover img,
.equipment__item img:hover {
  transform: scale(1.4);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45)) brightness(1.12) saturate(1.1);
}

@media (min-width: 1024px) {

  .equipment,
  .inventory {
    gap: 18px;
  }

  .equipment__item {
    padding: 14px 16px;
  }

  .equipment__item img {
    width: 60px;
    height: 60px;
  }

  .slot__label {
    font-size: 13px;
  }

  .inventory-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .inventory-section--gear .inventory-group__items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    overflow: visible;
    padding-bottom: 4px;
  }

  .inventory-section--gear .inventory-card {
    flex: 0 0 220px;
    width: 220px;
  }

  /* Keep all Gear & Chests rarity buttons on one row (desktop) */
  .inventory-section--gear .inventory-rarity {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    overflow: visible;
  }

  .inventory-section--gear .inventory-rarity__header {
    flex: 0 0 140px;
    min-width: 140px;
  }

  .inventory-section--gear .inventory-group {
    display: block;
    flex: 1 1 0;
    min-width: 0;
  }

  .inventory-section--gear .inventory-group__summary {
    width: 100%;
    padding: 10px;
  }

  .inventory-section--gear .inventory-group__summary:hover {
    background-color: rgba(30, 41, 59, 0.9);
    cursor: pointer;
  }

  .inventory-section--gear .inventory-group__label {
    font-size: 14px;
  }

  .inventory-section--gear .inventory-group__count {
    font-size: 11px;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 1024px) {
  .inventory-rarity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-group__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
}

.pagination__info {
  font-size: 13px;
  color: var(--muted);
}

.is-clickable {
  cursor: pointer;
}

.item__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item__actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.inventory__item .item__actions {
  justify-content: center;
  width: 100%;
}


.bulga-section__body .bulga-card__body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.bulga-section__body .stat-pill {
  width: 100%;
}

.forge-modal__slots {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.forge-slot {
  background: rgba(11, 13, 18, 0.65);
  border: 1px dashed rgba(37, 44, 61, 0.6);
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  
}

.forge-slot.is-filled {
  border-style: solid;
  color: var(--text);
}

.forge-slot img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.forge-modal__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.forge-candidate {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 13, 18, 0.65);
}

.forge-candidate img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.forge-candidate strong {
  display: block;
}

.forge-candidate__meta {
  font-size: 12px;
  color: var(--muted);
}

.forge-modal__pagination {
  margin-top: 4px;
}

.item__meta span {
  color: var(--muted);
  font-size: 12px;
}

.item__blood-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.8);
  background: rgba(127, 29, 29, 0.4);
  color: #fecaca !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px !important;
  font-weight: 700;
}


.empty {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.panel--world-boss {
  position: relative;
  z-index: 0;
}

.panel--shortcuts {
  margin-bottom: 24px;
}

.hub-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hub-shortcuts__trade {
  position: relative;
}

.trade-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0d12;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: tradeBadgeBlink 1.2s ease-in-out infinite;
}

.trade-badge.is-hidden {
  display: none;
}

@keyframes tradeBadgeBlink {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.08);
  }
}

.message-threads {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-thread {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 20, 34, 0.6);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  display: grid;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.message-thread:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 179, 107, 0.4);
}

.message-thread--active {
  border-color: rgba(255, 179, 107, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.message-thread__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.message-thread__name {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.message-thread__preview {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread__badge {
  margin-left: auto;
  background: var(--accent-3);
  color: #0b0d12;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
}

.message-log {
  min-height: 340px;
  max-height: 520px;
  overflow-y: auto;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: radial-gradient(circle at 10% 10%, rgba(255, 179, 107, 0.08), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(47, 187, 118, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(13, 18, 30, 0.9), rgba(9, 11, 18, 0.9));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.global-chat__log {
  max-height: 400px;
}

.global-chat__bubble+.global-chat__bubble {
  margin-top: 6px;
}

.message-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.45;
}

.message-bubble--outgoing {
  margin-left: auto;
  background: linear-gradient(140deg, rgba(255, 179, 107, 0.16), rgba(255, 179, 107, 0.08));
  border-color: rgba(255, 179, 107, 0.4);
}

.message-bubble--incoming {
  margin-right: auto;
  background: linear-gradient(140deg, rgba(52, 63, 98, 0.8), rgba(17, 23, 37, 0.8));
  border-color: rgba(148, 163, 184, 0.28);
}

.message-bubble__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  margin-bottom: 6px;
  color: var(--muted);
}

.message-form {
  display: grid;
  gap: 12px;
}

.message-form textarea {
  resize: vertical;
  min-height: 120px;
}

.message-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-hint {
  font-size: 13px;
  color: var(--muted);
}

.message-hint--error {
  color: var(--danger);
}

.message-hint--success {
  color: var(--success);
}

.message-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.message-nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-3);
  color: #041015;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  animation: messageBadgeBlink 1.2s ease-in-out infinite;
}

.message-nav-badge.is-hidden {
  display: none;
}

.message-nav-badge--summary {
  margin-left: 8px;
  position: absolute;
  top: -8px;
  right: -12px;
  animation: messageBadgeBlink 1.2s ease-in-out infinite;
}

@keyframes messageBadgeBlink {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.55;
    transform: scale(1.08);
  }
}

.forge-page .panel__header {
  margin-bottom: 16px;
}

.forge-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.forge-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.forge-toggle .button.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(244, 201, 93, 0.15);
}

.forge-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 13, 18, 0.65);
  min-width: 160px;
}

.forge-summary__label {
  font-size: 12px;
  color: var(--muted);
}

.forge-summary__value {
  font-size: 20px;
  font-weight: 700;
}

.forge-summary__note {
  font-size: 12px;
  color: var(--accent);
}

.forge-rules-card {
  border-color: rgba(244, 201, 93, 0.35);
  background: linear-gradient(145deg, rgba(35, 24, 13, 0.58), rgba(14, 16, 24, 0.82));
}

.forge-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.forge-rule-pill {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 10, 17, 0.7);
}

.forge-rule-pill strong {
  font-size: 13px;
  color: #f5e6be;
}

.forge-rule-pill span {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.forge-selection {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.forge-selection__hint {
  color: var(--muted);
  font-size: 13px;
}

.forge-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.forge-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.forge-hint.is-error {
  color: #ff8585;
}

.forge-result {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(116, 232, 190, 0.4);
  background: rgba(11, 13, 18, 0.75);
}

.forge-result img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.world-boss__timer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.world-boss__timer span:last-child {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.world-boss__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.world-boss__stats {
  display: grid;
  gap: 16px;
}

.world-boss__stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.world-boss__stat--hp {
  gap: 10px;
}

.world-boss__label {
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.world-boss__value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
}

.world-boss__hp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.world-boss__hp-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(11, 13, 18, 0.65);
  border: 1px solid rgba(37, 44, 61, 0.6);
  overflow: hidden;
}

.world-boss__hp-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 92, 92, 0.9), rgba(255, 170, 92, 0.9));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.world-boss__rewards {
  display: grid;
  gap: 10px;
}

.world-boss__reward {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(11, 13, 18, 0.55);
  border: 1px solid rgba(37, 44, 61, 0.4);
  border-radius: 12px;
  padding: 10px 12px;
}

.world-boss__reward img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.world-boss__reward p {
  margin: 0;
  font-weight: 600;
}

.world-boss__reward span {
  font-size: 12px;
  color: var(--muted);
}

.world-boss__leaderboard {
  background: rgba(11, 13, 18, 0.55);
  border: 1px solid rgba(37, 44, 61, 0.4);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.world-boss__leaderboard-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.world-boss__leaderboard table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.world-boss__leaderboard td {
  padding: 6px 0;
}

.world-boss__leaderboard td:last-child {
  text-align: right;
  font-weight: 600;
}

.world-boss__leaderboard .empty-state {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.battle-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.panel--battle .battle-controls {
  margin-top: 0;
  align-items: center;
}

.battle-controls .field {
  min-width: 160px;
}

.admin-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-controls .field {
  min-width: 200px;
}

.admin-controls__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.admin-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-section__header h4 {
  margin: 0;
}

.admin-section__header p {
  margin: 4px 0 0;
  color: #a6adbb;
  font-size: 14px;
}

.admin-table-wrapper {
  border: 1px solid #252c3d;
  border-radius: 12px;
  background: #121722;
  overflow-x: auto;
}

@media (max-width: 768px) {

  .table-wrapper,
  .ecosystem-table-wrapper,
  .rules-table-wrapper,
  .ranking-table-wrapper,
  .admin-table-wrapper,
  .world-boss__leaderboard {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .data-table,
  .ecosystem-table,
  .rules-table,
  .ranking-table,
  .admin-table,
  .world-boss__leaderboard table {
    min-width: 520px;
  }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
}

.admin-table thead {
  background: #171c28;
  color: #f8f5ef;
}

.admin-table tbody tr {
  border-top: 1px solid #252c3d;
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table .button {
  padding: 6px 12px;
  font-size: 13px;
}

.battle-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#battle-button,
#heal-button,
#battle-potion-button {
  padding: 14px 28px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.battle-actions--inline {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#battle-potion-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.battle-potion__icon {
  width: 20px;
  height: 20px;
}

.battle-territories {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.market {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.market-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.market-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  justify-content: space-between;
}

.market-toggle {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.market-toggle .is-active {
  border-color: #f4c95d;
  color: #f4c95d;
  background: rgba(244, 201, 93, 0.12);
}

.market-toolbar .field--inline {
  min-width: min(260px, 100%);
}

.market-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(18, 20, 28, 0.7);
  font-size: 13px;
  margin-left: auto;
}

.market-gold img {
  width: 18px;
  height: 18px;
}

.market-gold__label {
  color: var(--muted);
}

.market-gold__value {
  font-weight: 600;
  color: #f4c95d;
}

.market-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.market-hint.is-error {
  color: var(--danger);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.market-card {
  background: rgba(11, 13, 18, 0.7);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.market-card img {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

.market-card__meta h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.market-card__meta p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.market-card__price {
  margin-top: 10px;
  font-weight: 600;
  font-size: 15px;
}

.market-card__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.trade-gold-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trade-gold-controls input {
  max-width: 140px;
}

.trade-gold-amount {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 200, 87, 0.16);
  border: 1px solid rgba(255, 200, 87, 0.35);
  color: #f7d58b;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
}

.trade-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.trade-items__column {
  background: rgba(11, 13, 18, 0.55);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trade-items__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.trade-items__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trade-items__list--text {
  grid-template-columns: 1fr;
}

.trade-items__card {
  background: rgba(15, 18, 25, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 13px;
  color: var(--text);
}

.trade-items__card img {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: rgba(11, 13, 18, 0.65);
}

.trade-items__card span {
  font-size: 13px;
  flex: 1;
}


.trade-items__empty {
  font-size: 12px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.trade-items__pagination {
  margin-top: 4px;
  justify-content: space-between;
}

.market-card__actions input {
  background: var(--panel-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
  color: var(--text);
}

.changelog {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.changelog-entry {
  background: rgba(11, 13, 18, 0.65);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.changelog-entry--highlight {
  border-color: rgba(255, 200, 74, 0.9);
  box-shadow: 0 0 12px rgba(255, 200, 74, 0.4);
  animation: changelogGlow 1.8s ease-in-out infinite;
}

.changelog-entry--highlight .badge {
  animation: changelogBlink 1s steps(2, start) infinite;
}

.changelog-entry__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.changelog-entry h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.changelog-entry ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.changelog-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.changelog-items figure {
  background: rgba(17, 17, 27, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.changelog-items img {
  width: 100%;
  max-width: 120px;
  height: auto;
  margin: 0 auto 8px;
  display: block;
}

.changelog-items figcaption {
  font-size: 0.85rem;
  color: #f2f2f7;
}

@keyframes changelogGlow {

  0%,
  100% {
    box-shadow: 0 0 12px rgba(255, 200, 74, 0.3);
  }

  50% {
    box-shadow: 0 0 24px rgba(255, 200, 74, 0.8);
  }
}

@keyframes changelogBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.2;
  }
}


.battle-difficulty-select {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(160deg, rgba(47, 35, 16, 0.95), rgba(19, 14, 7, 0.95)),
    radial-gradient(circle at 20% 20%, rgba(248, 193, 91, 0.22), transparent 58%);
  color: #f3e3bc;
  box-shadow:
    inset 0 1px 0 rgba(255, 233, 168, 0.26),
    0 8px 24px rgba(3, 2, 1, 0.5);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(160deg, rgba(47, 35, 16, 0.95), rgba(19, 14, 7, 0.95)),
    radial-gradient(circle at 20% 20%, rgba(248, 193, 91, 0.22), transparent 58%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%23f3e3bc' d='M5.8 7.3L10 11.4l4.2-4.1 1.4 1.4-5.6 5.6-5.6-5.6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: auto, auto, 14px 14px;
  background-position: 0 0, 0 0, calc(100% - 12px) center;
  padding-right: 2.4rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.battle-difficulty-select:hover {
  border-color: rgba(255, 220, 131, 0.5);
  filter: brightness(1.03);
}

.battle-difficulty-select:focus {
  outline: none;
  border-color: rgba(255, 220, 131, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 233, 168, 0.32),
    0 0 0 2px rgba(255, 220, 131, 0.18),
    0 10px 26px rgba(3, 2, 1, 0.55);
}

.battle-difficulty-select option {
  color: #f3e3bc;
  background-color: #1b1308;
}

.battle-territory {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 20, 32, 0.95), rgba(9, 11, 18, 0.9));
  box-shadow: 0 10px 30px rgba(2, 4, 10, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.battle-territory img {
  width: 100%;
  height: 130px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.battle-territory span {
  display: block;
}

.battle-territory>span:first-of-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: rgba(148, 163, 184, 0.9);
}

.battle-territory>span:last-of-type {
  font-size: 17px;
  font-weight: 600;
  color: #e6ebf5;
}

.battle-territory:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 36px rgba(2, 4, 10, 0.7);
}


#battle-territories[data-difficulty="hell"] .battle-territory {
  border-color: rgba(189, 105, 255, 0.56);
  background:
    linear-gradient(180deg, rgba(35, 20, 56, 0.96), rgba(15, 9, 27, 0.94)),
    radial-gradient(circle at 24% 20%, rgba(198, 124, 255, 0.22), transparent 58%);
  box-shadow:
    0 0 0 1px rgba(146, 76, 214, 0.5),
    0 0 26px rgba(177, 92, 255, 0.44),
    0 12px 34px rgba(49, 14, 85, 0.58);
}

#battle-territories[data-difficulty="hell"] .battle-territory img {
  border-color: rgba(205, 152, 255, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(244, 231, 255, 0.16),
    0 0 18px rgba(177, 92, 255, 0.32);
  filter: saturate(1.08) hue-rotate(22deg);
}

#battle-territories[data-difficulty="hell"] .battle-territory > span:last-of-type {
  color: #efd9ff;
  text-shadow: 0 0 14px rgba(197, 121, 255, 0.62);
}

#battle-territories[data-difficulty="nightmare"] .battle-territory {
  border-color: rgba(187, 53, 58, 0.68);
  background:
    linear-gradient(180deg, rgba(39, 7, 13, 0.97), rgba(12, 5, 7, 0.95)),
    radial-gradient(circle at 20% 20%, rgba(179, 30, 47, 0.3), transparent 55%);
  box-shadow:
    0 0 0 1px rgba(143, 22, 36, 0.55),
    0 0 26px rgba(205, 45, 60, 0.45),
    0 14px 34px rgba(38, 5, 10, 0.72);
}

#battle-territories[data-difficulty="nightmare"] .battle-territory img {
  border-color: rgba(255, 121, 132, 0.4);
  box-shadow:
    inset 0 0 0 1px rgba(255, 168, 176, 0.15),
    0 0 16px rgba(190, 39, 52, 0.36);
  filter: saturate(1.18) hue-rotate(-16deg) contrast(1.08);
}

#battle-territories[data-difficulty="nightmare"] .battle-territory > span:first-of-type {
  color: rgba(255, 193, 198, 0.92);
}

#battle-territories[data-difficulty="nightmare"] .battle-territory > span:last-of-type {
  color: #ffd8db;
  text-shadow: 0 0 10px rgba(221, 54, 67, 0.6);
}


.battle-territory.battle-territory--difficulty-hidden {
  display: none !important;
}

.battle-territory:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.battle-drops {
  display: grid;
  gap: 12px;
}

.battle-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 13, 18, 0.6);
}

.battle-drop img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.battle-drop__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.battle-drop__meta span {
  font-size: 12px;
  color: var(--muted);
}

.modal__monster {
  font-size: 13px;
  color: var(--accent);
}

.modal__damage {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  color: #f8e7c1;
}

.modal__damage.is-blinking {
  color: #ff6b6b;
  animation: battle-blink 1s ease-in-out infinite;
}

@keyframes battle-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

.equip-modal__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.equip-modal__pagination {
  margin-top: 4px;
}

/* Leaderboard */
#world-boss-leaderboard-body tr:nth-child(1),
#world-boss-leaderboard-body tr:nth-child(2),
#world-boss-leaderboard-body tr:nth-child(3) {
  font-weight: 900;

}

#world-boss-leaderboard-body tr:nth-child(3) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 720px) {
  .site-header__outer {
    padding: 10px 12px;
  }

  .site-header__panel {
    padding: 10px 12px;
    border-radius: 18px;
  }

  .site-header__content {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .site-header__brand {
    flex: 1 1 auto;
    gap: 10px;
  }

  .site-header__logo {
    width: 32px;
    height: 32px;
  }

  .site-header__logo-inner {
    font-size: 10px;
  }

  .site-header__eyebrow {
    font-size: 8px;
    letter-spacing: 0.2em;
  }

  .site-header__subtitle {
    font-size: 14px;
  }

  .site-header__actions {
    width: 100%;
    justify-content: flex-end;
    gap: 10px;
  }

  .site-header__logout {
    display: inline-flex;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .topbar__links {
    position: static;
    width: 100%;
    min-width: 100%;
  }

  .topbar__links .button {
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    font-size: 13px;
  }

  .topbar__links .button--ghost {
    background: rgba(18, 22, 32, 0.6);
  }

  .topbar__menu {
    width: 100%;
  }

  .topbar__toggle {
    width: 100%;
    justify-content: space-between;
  }

  .login-form__actions {
    flex-direction: column;
  }

  .auth-layout {
    flex-direction: column;
  }

  .inventory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
  }

  .inventory__item {
    padding: 10px;
    gap: 8px;
  }

  .inventory__item img {
    width: 120px;
    height: 120px;
  }

  .equip-modal__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .battle-territories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-territory img {
    /* max-width: 120px;
    height: 70px; */
  }

  .forge-modal__slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forge-slot {
    min-height: 72px;
    padding: 6px;
  }

  .forge-modal__list {
    grid-template-columns: none;
  }

  .trade-items {
    grid-template-columns: 1fr;
  }

  .trade-items__list {
    grid-template-columns: 1fr;
  }

  .trade-items__card {
    gap: 10px;
  }

  .trade-items__card img {
    width: 64px;
    height: 64px;
  }
}

@media (min-width: 1024px) {
  #battle-territories .battle-territory img {
    height: 180px;
    object-fit: contain;
    object-position: center;
    background: rgba(7, 10, 18, 0.9);
    padding: 6px;
  }

  .site-header__outer {
    padding: 16px 32px;
  }

  .site-header__content {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }

  .site-header__nav {
    display: flex;
  }

  .site-header__menu {
    display: none;
  }

  .main {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 640px) {
  .main {
    gap: 10px;
    padding: 8px 10px 64px;
  }

  .inventory-rarity {
    grid-template-columns: minmax(0, 1fr);
  }

  .inventory-group__items--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-group__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-section--other .inventory-group__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  footer {
    margin-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  header.sticky>div.w-full {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  header.sticky .glass-panel {
    padding: 8px;
  }

  .mobile-header-actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .mobile-header-actions details {
    flex: 1 1 auto;
  }

  .mobile-header-actions summary {
    width: 100%;
    text-align: center;
  }

  .mobile-header-actions nav {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  header .hb-button.primary[data-logout-button] {
    display: none;
  }

  header .mobile-header-actions nav .hb-button.primary[data-logout-button] {
    display: inline-flex;
  }

  .panel {
    padding: 14px;
  }

  .panel__header {
    margin-bottom: 10px;
  }

  .panel__header h1,
  .panel__header h2,
  .panel__header h3 {
    font-size: 18px;
  }

  .panel__header p {
    font-size: 12px;
  }

  .ranking-hero__image {
    /* max-height: 200px; */
    object-fit: cover;
  }
}

/* Black Market */
.black-market {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.black-market__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.black-market__stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.black-market__hint {
  color: var(--muted);
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
}

.black-market__hint.is-error {
  color: var(--danger);
}

.black-market__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.bm-card {
  background: linear-gradient(145deg, rgba(15, 20, 34, 0.92), rgba(11, 15, 26, 0.92));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
  border-radius: 18px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bm-card__header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.bm-card__image {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.bm-card__title h3 {
  font-size: 1.05rem;
}

.bm-card__rarity {
  display: inline-block;
  font-size: 0.85rem;
  margin-top: 0.15rem;
  font-weight: 600;
}

.bm-card__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.bm-card__meta .meta-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.bm-card__meta .meta-value {
  font-weight: 700;
}

.bm-card__timer {
  font-family: "Cinzel", "Manrope", serif;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.bm-card__timer--ended {
  color: var(--muted);
}

.bm-card__bid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.bm-card__bid input {
  width: 100%;
  height: 44px;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-dark);
  color: var(--text);
  font-weight: 600;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.bm-card__bid input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 179, 107, 0.15);
}

.bm-card__lead {
  font-size: 0.9rem;
  color: var(--muted);
}

.bm-card__lead.is-winning {
  color: var(--success);
}

.black-market__admin {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.black-market__admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.black-market__search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.black-market__search input {
  height: 44px;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-dark);
  color: var(--text);
  font-weight: 600;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.black-market__search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 179, 107, 0.15);
}

.black-market__pool {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.bm-pool-card {
  background: var(--panel-dark);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bm-pool-card__title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
}

.bm-pool-card__img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-strong);
}

.bm-pool-card__rarity {
  font-size: 0.9rem;
}

.bm-pool-card__meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Trade Page */
main:has(#trade-inventory) section {
  margin-bottom: 20px;
}

div.trade-gold-controls {
  margin-bottom: 15px;
}

#trade-recipient {
  margin-bottom: 20px;
}

#trade-completed {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 20px;
  padding: 10px;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
}

#trade-completed .market-card {
  flex: 0 0 280px;
  height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 15px;
  box-sizing: border-box;
}

/* Login Page */
main:has(#login-panel) section{
  margin-bottom: 30px !important;
}

div.media-frame.mt-4.h-64 {
  /* height: 600px; */
  /* height: clamp(200px, 100vh, 600px) !important; */
  overflow: hidden;
  max-height: 600px;
  min-height: 0 !important;
}

div.media-frame.mt-4.h-64 img {
    object-fit: cover;
      object-position: 10% 60%;
      max-height: 600px;
}

/* Rules and Loot Page */

main:has(.rules-hero) section {
  margin-bottom: 30px !important;
}



.tone-common {
  color: #cbd5e1;
}

.tone-uncommon {
  color: #6dd58c;
}

.tone-rare {
  color: #66a7ff;
}

.tone-epic {
  color: #c084fc;
}

.tone-legendary {
  color: #fcbf49;
}

.tone-mythic {
  color: #ff7ab8;
}

.tone-ascended {
  color: #4dd2ff;
}

.tone-celestial {
  color: #7dd3fc;
}

.tone-transcendent {
  color: #a3e635;
}

.tone-eternal {
  color: #f472b6;
}

.tone-god {
  color: #fbbf24;
}


.bulga-hero-card__xp-track {
  margin-top: 0.45rem;
  height: 0.4rem;
  width: min(260px, 100%);
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.5);
  overflow: hidden;
}

.bulga-hero-card__xp-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #facc15 0%, #f59e0b 100%);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.7);
  transition: width 0.35s ease;
}

.bulga-hero-card__xp-copy {
  margin-top: 0.3rem;
}

.bulga-hero-card__level-badge {
  align-self: flex-start;
  white-space: nowrap;
}


.inventory-group-modal__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pvp-panel {
  display: grid;
  gap: 1rem;
}

.pvp-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: end;
}

.pvp-form .field {
  flex: 1;
  min-width: 220px;
}

.pvp-marks {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.pvp-marks article {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.45);
  text-align: center;
}

.pvp-marks img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin: 0 auto 0.5rem;
}

.pvp-hint.is-error {
  color: #fca5a5;
}

.pvp-modal[hidden] {
  display: none;
}

.pvp-modal {
  margin-top: 0.25rem;
}

.pvp-modal__card {
  width: min(520px, 100%);
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(148, 163, 184, 0.2) inset;
}

.pvp-modal__card h3 {
  margin: 0;
  color: #facc15;
}

.pvp-modal__card p {
  margin: 0;
  color: rgba(248, 250, 252, 0.95);
}

.pvp-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pvp-confirm-popover {
  position: fixed;
  z-index: 10000;
  width: min(320px, calc(100vw - 16px));
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.pvp-confirm-popover__text {
  margin: 0;
  color: rgba(248, 250, 252, 0.95);
}

.pvp-confirm-popover__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pvp-history {
  display: grid;
  gap: 0.75rem;
}

.pvp-history__list {
  display: grid;
  gap: 0.5rem;
}

.pvp-history__item {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.45);
}

.pvp-history__meta {
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.86rem;
}

.pvp-history__actions {
  display: flex;
  justify-content: flex-end;
}

.pvp-history__counter-btn {
  min-width: 140px;
}

.global-pvp-alert {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(16, 23, 42, 0.96);
  color: #e5e7eb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.global-pvp-alert.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.global-pvp-alert__text {
  font-size: 14px;
  line-height: 1.35;
}

.global-pvp-alert__close {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

@keyframes character-pvp-open-blink {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.45), 0 0 18px rgba(220, 38, 38, 0.35);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.85), 0 0 28px rgba(239, 68, 68, 0.6);
  }
}

body[data-page="character"].character-pvp-open .bulga-section,
body[data-page="character"].character-pvp-open .bulga-section-grid {
  animation: character-pvp-open-blink 0.95s ease-in-out infinite;
}

body[data-page="character"].character-pvp-open .bulga-card {
  border-color: rgba(239, 68, 68, 0.65);
}
