:root {
  color-scheme: dark;
  --bg: #090909;
  --panel: rgba(12, 12, 12, 0.9);
  --panel-soft: rgba(8, 8, 8, 0.72);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #f1ece5;
  --muted: #a9a39b;
  --accent: #cc0000;
  --accent-soft: rgba(204, 0, 0, 0.18);
  --accent-2: #d58b3a;
  --hp: #d13a33;
  --armor: #4c91d8;
  --stamina: #d4b943;
  --title-font: Impact, "Arial Narrow", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; border: 1px solid #6e3333; background: #241616; color: var(--text); padding: 10px 14px; border-radius: 4px; transition: background .15s, color .15s, border-color .15s; }
button:hover, button:focus { background: var(--accent); color: #fff; border-color: var(--accent); outline: none; }
button.primary { background: var(--accent); border-color: #ff3a3a; font-weight: 700; }
button.primary:hover, button.primary:focus { background: #e00000; border-color: #ff5a5a; color: #fff; }
button:disabled, button:disabled:hover, button:disabled:focus { cursor: not-allowed; opacity: .5; background: #181818; border-color: #453333; color: #777; }

body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body input,
body textarea,
body [contenteditable="true"],
body .selectable-text {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg);
}

#gameViewport {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: #111;
  transform: none;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #111;
  image-rendering: pixelated;
}

body.gamepad-playing #gameCanvas {
  cursor: none;
}

.screen { position: absolute; z-index: 5; }
.panel { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--panel-border); box-shadow: 0 0 40px rgba(0,0,0,.65); padding: 24px; border-radius: 8px; }
.panel h1 {
  margin: 0;
  margin-top: -7px;
  color: #fff;
  font-family: var(--title-font);
  font-size: 42px;
  letter-spacing: 6px;
  word-spacing: 8px;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    -1px -1px 0 rgba(204,0,0,.5),
     0    -1px 0 rgba(204,0,0,.5),
     1px  -1px 0 rgba(204,0,0,.5),
    -4px   4px   0 rgba(204,0,0,.5),
     1px   0   0 rgba(204,0,0,.5),
    -1px   1px 0 rgba(204,0,0,.5),
     0     1px 0 rgba(204,0,0,.5),
     1px   1px 0 rgba(204,0,0,.5),
     0 0 40px rgba(204,0,0,.5),
     0 3px 0 #5a1111;
}
.panel h2 {
  margin-top: 0;
  margin-bottom: 0;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hidden { display: none !important; }
.active { display: block; }

.character-transition {
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  background: #050505;
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  transition:
    opacity .3s ease,
    visibility 0s linear .3s;
}

.character-transition.is-visible {
  opacity: 1;
  visibility: visible;
  transition:
    opacity .3s ease,
    visibility 0s linear 0s;
}

.character-transition.character-transition-background {
  z-index: 4;
  pointer-events: none;
}

.character-transition-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  transition: opacity .18s ease;
}

.character-transition-no-image
.character-transition-image {
  opacity: 0;
}

.character-transition-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, .58) 0%,
      rgba(0, 0, 0, .16) 42%,
      rgba(0, 0, 0, 0) 68%
    );
  pointer-events: none;
}

.character-transition-dead
.character-transition-shade {
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, .08) 0%,
      rgba(0, 0, 0, .12) 62%,
      rgba(0, 0, 0, .42) 100%
    );
}

.character-transition-message {
  position: absolute;
  top: clamp(22px, 4vh, 48px);
  left: clamp(20px, 3.2vw, 56px);
  z-index: 2;
  max-width: min(560px, calc(100vw - 40px));
  padding: 11px 16px 11px 18px;
  border-left: 3px solid var(--accent);
  background:
    linear-gradient(
      90deg,
      rgba(5, 5, 5, .84),
      rgba(5, 5, 5, .36) 72%,
      transparent
    );
  color: #ffdca8;
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.35;
  text-transform: uppercase;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 1),
    0 0 12px rgba(0, 0, 0, .9);
  animation:
    character-transition-message-pulse
    1.15s ease-in-out infinite;
}

.character-transition-message:empty {
  display: none;
}

@keyframes character-transition-message-pulse {
  0%,
  100% {
    opacity: .72;
  }

  50% {
    opacity: 1;
  }
}

.field { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; color: var(--muted); }
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.auth-field {
  gap: 0;
  margin: 10px 0 12px;
}
input[type="text"], input[type="email"], input[type="password"], input:not([type]) { width: 100%; padding: 10px; background: #0b0b0b; border: 1px solid #4c3434; color: var(--text); border-radius: 4px; }
input[readonly],
input:disabled {
  color: #777;
  background: #101010;
}

input:disabled {
  cursor: not-allowed;
  opacity: .7;
}
input.has-error { border-color: #e04444; box-shadow: 0 0 0 1px rgba(224,68,68,.2); }
.auth-shell input[type="text"],
.auth-shell input[type="email"],
.auth-shell input[type="password"] {
  transition:
    border-color .15s,
    box-shadow .15s;
}

.auth-shell input[type="text"]:hover,
.auth-shell input[type="email"]:hover,
.auth-shell input[type="password"]:hover {
  border-color: var(--accent);
}

.auth-shell input[type="text"]:focus,
.auth-shell input[type="email"]:focus,
.auth-shell input[type="password"]:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow:
    inset 0 0 0 1px var(--accent);
}
.auth-shell input:disabled,
.auth-shell input:disabled:hover,
.auth-shell input:disabled:focus {
  cursor: not-allowed;
  border-color: #4c3434;
  box-shadow: none;
}
.auth-shell input[type="text"],
.auth-shell input[type="email"],
.auth-shell input[type="password"] {
  height: 32px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 13px;
}
input[type="range"] { width: 220px; accent-color: var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); }

.auth-shell {
  overflow: hidden;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px 6px 0 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.auth-tab {
  min-width: 0;
  padding: 10px 8px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.auth-tab:last-child {
  border-right: 0;
}

.auth-tab:hover,
.auth-tab:focus,
.auth-tab.active {
  background: linear-gradient(180deg, rgba(204,0,0,.28), rgba(204,0,0,.1));
  color: #fff;
}

.auth-tab.active {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.auth-tab:disabled,
.auth-tab:disabled:hover,
.auth-tab:disabled:focus {
  background: rgba(255,255,255,.02);
  color: #666;
  box-shadow: none;
}

.auth-panel {
  display: grid;
  gap: 5px;
  padding: 8px 10px 10px;
  color: var(--muted);
}

.anonymous-profile-row {
  display: grid;
  grid-template-columns:
    calc((100% - 24px) / 3)
    minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.anonymous-name-group {
  min-width: 0;
}

.anonymous-info-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding-bottom: 2px;
}

@media (min-width: 761px) {
  .anonymous-info-group {
    transform: translateY(4px);
  }
}

.anonymous-info-group .auth-hint,
.anonymous-info-group .field-error {
  min-height: 0;
  margin: 0;
}

.auth-label-row {
  position: relative;
  min-width: 0;
  display: block;
  height: 12px;
  line-height: 1.1;
}

.auth-label-row label {
  display: block;
  line-height: 1.1;
}

.auth-label-row .auth-hint {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 0;
  margin: 0;
  font-size: 9px;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

#authPanelRegister {
  grid-template-columns: minmax(0, 1fr);
}

#registerFormState,
#loginFormState {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
}

#authPanelRegister > .auth-input-group,
#loginFormState > .auth-input-group {
  min-width: 0;
}

#authPanelRegister >
.auth-input-group +
.auth-input-group,
#loginFormState >
.auth-input-group +
.auth-input-group {
  margin-top: 0;
}

#registerAuthError,
#loginAuthError {
  grid-column: 1 / -1;
}

.auth-input-group {
  display: grid;
  gap: 4px;
}

.auth-input-group + .auth-input-group {
  margin-top: 4px;
}

.auth-panel label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
}

.auth-hint,
.field-status,
.field-error {
  display: block;
  min-height: 14px;
  font-size: 11px;
  line-height: 1.25;
}

.auth-hint {
  color: #817c75;
}

.field-status {
  color: #c5b27a;
}

.field-status.success {
  color: #79c98c;
}

.field-status.pending {
  color: #d5b36d;
}

.field-error {
  color: #ff7777;
}

.field-error:empty,
.field-status:empty {
  display: none;
  min-height: 0;
}

.auth-general-error {
  margin-top: 2px;
}

.account-state {
  display: grid;
}

.settings-toggle-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-toggle-row .field {
  min-width: 0;
  margin: 0;
}

.main-settings-row .field {
  min-height: 36px;
  padding: 5px 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-top: 0;
}

.main-settings-row {
  gap: 8px;
}

.main-settings-row .gamepad-toggle {
  gap: 6px;
}

.main-settings-row .gamepad-toggle-copy {
  gap: 1px;
}

.main-settings-row .gamepad-toggle-title {
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .02em;
}

.main-settings-row .gamepad-status {
  font-size: 10px;
  line-height: 1.1;
}

.main-settings-row
.gamepad-toggle
input[type="checkbox"] {
  width: 14px;
  height: 14px;
  transition:
    border-color .15s,
    box-shadow .15s,
    background-color .15s;
}

.pause-settings-row {
  margin: 10px 0;
}

.gamepad-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.gamepad-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gamepad-toggle-title {
  line-height: 1.15;
}

.gamepad-status {
  display: block;
  max-width: 280px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gamepad-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
  cursor: pointer;
}

.gamepad-toggle.unavailable {
  opacity: .55;
  cursor: not-allowed;
}

.gamepad-toggle.unavailable input[type="checkbox"] {
  cursor: not-allowed;
}

.gamepad-toggle.unavailable .gamepad-status {
  color: #777;
}

.pause-gamepad-toggle {
  color: var(--text);
}

.character-select-field {
  gap: 10px;
  margin-top: 12px;
}

.character-select-heading {
  display: block;
  width: 100%;
  color: #fff;
  font-family: var(--title-font);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 6px;
  word-spacing: 8px;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    -1px -1px 0 #000,
     0    -1px 0 #000,
     1px  -1px 0 #000,
    -1px   0   0 #000,
     1px   0   0 #000,
    -1px   1px 0 #000,
     0     1px 0 #000,
     1px   1px 0 #000,
     0 0 12px rgba(204,0,0,.35),
     0 2px 0 #5a1111;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.character-card {
  text-align: left;
  min-height: 132px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #181818, #101010);
  border: 1px solid #6e3333;
   position: relative;
}

.character-card:hover,
.character-card:focus {
  background: linear-gradient(180deg, #211313, #130d0d);
}

.character-card.selected {
  border-color: var(--accent);
  color: #ffdede;
}

.character-card.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 0 18px rgba(204,0,0,.24);
}

.character-portrait {
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: radial-gradient(circle at center, rgba(204,0,0,.16), rgba(0,0,0,0) 62%);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.character-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.75));
}

.character-info {
  padding: 7px 0 8px;
  text-align: center;
}

.character-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 900;
  text-align: center;
}

.character-card small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
}
.menu-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 16px 0 20px;
}

.menu-actions button {
  min-width: 150px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}

#playButton {
  font-size: 22px;
  line-height: 1;
}

.leaderboard-preview {
  margin-top: 20px;
  border-top: 1px solid rgba(213,139,58,.45);
  padding-top: 10px;
}

.leaderboard-preview h2 {
  text-align: center;
  color: #f4d08a;
  text-shadow: 0 0 10px rgba(213,139,58,.42), 0 2px 2px #000;
  letter-spacing: .1em;
}

.leaderboard-global-summary {
  margin: 7px 0 0;
  padding: 0 8px;
  color: #9d968e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .025em;
  text-align: center;
  text-shadow:
    0 1px 2px rgba(0,0,0,.95);
}

.leaderboard-global-summary strong {
  color: #b80f18;
  font-size: 1.08em;
  font-weight: 900;
  white-space: nowrap;
  text-shadow:
    0 1px 0 #000,
    0 0 7px rgba(184,15,24,.48);
}

#leaderboardScreen >
.leaderboard-global-summary {
  margin-top: 8px;
  margin-bottom: 0;
}

.top-leaderboard-table {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.top-leaderboard-row {
  display: grid;
  grid-template-columns:
    34px
    minmax(0, 1fr)
    105px
    72px
    64px
    55px;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  background: linear-gradient(90deg, rgba(213,139,58,.08), rgba(255,255,255,.025));
  border: 1px solid rgba(213,139,58,.16);
  border-bottom: 0;
  color: #d8d0c4;
  font-size: 13px;
}

.top-leaderboard-row:last-child {
  border-bottom: 1px solid rgba(213,139,58,.16);
}

.top-leaderboard-row.header {
  color: #f4d08a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: linear-gradient(90deg, rgba(213,139,58,.18), rgba(204,0,0,.08));
  border-color: rgba(213,139,58,.38);
}

.top-leaderboard-row > span:nth-child(1),
.top-leaderboard-row > span:nth-child(4),
.top-leaderboard-row > span:nth-child(5),
.top-leaderboard-row > span:nth-child(6) {
  text-align: center;
}

.top-leaderboard-row.empty {
  color: var(--muted);
}

.top-leaderboard-row.rank-gold {
  color: #f4c44f;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255,215,106,.28);
  background: linear-gradient(
    90deg,
    rgba(255,215,106,.13),
    rgba(255,255,255,.025)
  );
}

.top-leaderboard-row.rank-silver {
  color: #d8d8d8;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255,255,255,.18);
  background: linear-gradient(
    90deg,
    rgba(216,216,216,.10),
    rgba(255,255,255,.025)
  );
}

.top-leaderboard-row.rank-bronze {
  color: #c68a52;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(198,138,82,.18);
  background: linear-gradient(
    90deg,
    rgba(198,138,82,.12),
    rgba(255,255,255,.025)
  );
}

.hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: auto;
  bottom: auto;

  width: 1892px;
  height: 1052px;

  z-index: 2;
  color: #fff;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
  font-family: Arial, Helvetica, sans-serif;

  transform: none;
  transform-origin: top left;
}

.hud-panel {
  background:
    linear-gradient(180deg, rgba(18,18,18,.88), rgba(4,4,4,.72)),
    linear-gradient(90deg, rgba(204,0,0,.10), rgba(213,139,58,.04));
  border: 1px solid rgba(213,139,58,.22);
  box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 22px rgba(255,255,255,.025);
  backdrop-filter: blur(2px);
}

.status-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 326px;
  padding: 13px 14px 12px;
  border-left: 3px solid rgba(204,0,0,.95);
  overflow: visible;
}

.status-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(213,139,58,.26);
}

.status-title {
  width: 100%;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 0 12px rgba(204,0,0,.35), 0 2px 2px #000;
}

.status-player-row {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.status-tag {
  width: auto;
  min-width: 0;
  max-width: 100%;
  color: #f4d08a;
  font-size: 9px;
  line-height: 1.25;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .16em;
  text-align: left;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.hud-level-badge {
  align-self: center;
}

.status-body {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.hud-character-portrait {
  width: 60px;
  height: 60px;
  overflow: hidden;
  align-self: center;
}

.hud-character-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.75));
}

.status-bars {
  display: grid;
  gap: 7px;
  margin-top: 0;
}

.status-bar {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 9px;
}

.status-bar span {
  color: #d8d0c4;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.status-bar div {
  height: 9px;
  padding: 1px;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(213,139,58,.20);
  box-shadow: inset 0 0 8px rgba(0,0,0,.65);
}

.status-bar i {
  display: block;
  width: 100%;
  height: 100%;
  transition: width .08s linear;
}

.status-bar.hp i {
  background: linear-gradient(90deg, #8f1717, #ff3a3a);
  box-shadow: 0 0 8px rgba(255,0,0,.35);
}

.status-bar.armor i {
  background: linear-gradient(90deg, #245985, #62b3ff);
  box-shadow: 0 0 8px rgba(76,145,216,.32);
}

.status-bar.stamina i {
  background: linear-gradient(90deg, #8d7420, #f4d34d);
  box-shadow: 0 0 8px rgba(212,185,67,.32);
}

.status-bar.stamina.daemon-time-warning > div {
  border-color: #ff2020;
  animation:
    daemon-time-warning-pulse
    .55s ease-in-out infinite;
}

@keyframes daemon-time-warning-pulse {
  0%,
  100% {
    box-shadow:
      0 0 5px rgba(255, 0, 0, .68),
      0 0 11px rgba(255, 0, 0, .42),
      inset 0 0 8px rgba(0, 0, 0, .65);
  }

  50% {
    box-shadow:
      0 0 9px rgba(255, 32, 32, 1),
      0 0 20px rgba(255, 0, 0, .78),
      inset 0 0 8px rgba(0, 0, 0, .65);
  }
}

.status-stats {
  position: absolute;
  left: 0;
  top: calc(100% + 2px);
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 0;
}

.status-stats div {
  min-width: 0;
  background: none;
  border: none;
  padding: 8px 9px;
  text-align: center;
}

.pause-stats div {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(0,0,0,.18));
  border: 1px solid rgba(213,139,58,.18);
  padding: 8px 9px;
  box-shadow: inset 0 0 14px rgba(0,0,0,.35);
}

.status-stats small,
.pause-stats small {
  display: block;
  color: #b8a783;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  text-align: center;
  text-shadow:
    0 0 4px rgba(0,0,0,.95),
    0 0 12px rgba(0,0,0,.75);
}

.status-stats strong,
.pause-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .05em;
  color: #fff;
  text-align: center;
  text-shadow:
    0 0 4px rgba(0,0,0,.95),
    0 0 12px rgba(0,0,0,.75);
}

#hudExp {
  display: inline-block;
  min-width: 5ch;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: scale(1);
  transform-origin: 50% 50%;
  transition:
    color 70ms ease-out,
    transform 75ms cubic-bezier(.2,.8,.2,1),
    text-shadow 75ms ease-out;
}

#hudExp.exp-pulse-time {
  color: #f4d34d;
  transform: scale(1.08);
  text-shadow:
    0 0 4px rgba(0,0,0,.95),
    0 0 10px rgba(244,211,77,.85);
}

#hudExp.exp-pulse-kill {
  color: #ff3a3a;
  transform: scale(1.16);
  text-shadow:
    0 0 4px rgba(0,0,0,.95),
    0 0 13px rgba(255,58,58,.95);
}

.message-log {
  position: absolute;
  top: 212px;
  left: 0;
  width: 326px;
  min-height: 22px;
  color: #ffdca8;
  font-size: 13px;
}

.weapon-hud { position: absolute; right: 0; bottom: 0; width: auto; padding: 10px 14px 14px; background: transparent; border: 0; box-shadow: none; }
.weapon-slots {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 10px;
}

.weapon-card {
  min-height: 122px;
  width: 170px;
  flex: 0 0 170px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(235,235,235,.55);
  opacity: .8;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.9));
  transition: opacity .16s ease, filter .16s ease, transform .16s ease;
}

.weapon-card.weapon-ak47,
.weapon-card.weapon-uzi,
.weapon-card.weapon-shotgun,
.weapon-card.weapon-flamethrower,
.weapon-card.weapon-rocket,
.weapon-card.weapon-gatling {
  width: 225px;
  flex-basis: 225px;
}

.weapon-card.active {
  color: #fff;
  opacity: 1;
  transform: translateY(-3px);
  filter:
    drop-shadow(0 0 6px rgba(204,0,0,.95))
    drop-shadow(0 0 18px rgba(204,0,0,.65))
    drop-shadow(0 3px 7px rgba(0,0,0,.95));
  animation: weaponActivePulse 1.35s ease-in-out infinite;
}

.weapon-name { display: none; }

.weapon-silhouette {
  position: relative;
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 8px;
  overflow: visible;
}

.weapon-silhouette img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
}

.firemode-indicator {
  position: absolute;
  z-index: 2;
  display: block;
  width: 32px;
  height: 32px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  transition: opacity .08s linear;
}

.firemode-indicator.visible {
  visibility: visible;
  opacity: 1;
}

.ammo-readout {
  font-size: 22px;
  line-height: 1;
  text-align: center;
  font-weight: 900;
  letter-spacing: .11em;
  color: #e2e2e2;
  text-shadow: 0 2px 3px #000;
}

.weapon-card.active .ammo-readout {
  color: #ffb4b4;
  text-shadow: 0 0 10px rgba(204,0,0,.9), 0 2px 3px #000;
}

@keyframes weaponActivePulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 5px rgba(204,0,0,.8))
      drop-shadow(0 0 15px rgba(204,0,0,.55))
      drop-shadow(0 3px 7px rgba(0,0,0,.95));
  }
  50% {
    filter:
      drop-shadow(0 0 9px rgba(255,0,0,1))
      drop-shadow(0 0 26px rgba(204,0,0,.85))
      drop-shadow(0 3px 7px rgba(0,0,0,.95));
  }
}
.weapon-card.reloading .ammo-readout::after { content: " RELOAD"; display: block; margin-top: 4px; font-size: 8px; color: var(--muted); letter-spacing: .18em; }
.magazine-indicator { display: flex; justify-content: center; gap: 3px; min-height: 18px; margin-top: 9px; align-items: flex-end; }
.magazine-indicator.placeholder {
  visibility: hidden;
}
.mag-tick { width: 2px; height: 16px; background: rgba(255,255,255,.22); }
.mag-tick.filled { background: rgba(245,245,245,.9); }
.weapon-card.active .mag-tick.filled { background: #f2b2b2; }
.magazine-indicator.large { gap: 2px; }
.magazine-indicator.large .mag-tick { height: 13px; }
.fuel-bar { height: 9px; width: 100%; margin-top: 13px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); }
.fuel-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d75b2a, #f3c15e); transition: width .08s linear; }

#pauseMenu::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(1px);
}

.pause-panel {
  width: min(460px, calc(100vw - 32px));
  background: linear-gradient(180deg, rgba(12,12,12,.98), rgba(4,4,4,.96));
  border-left: 3px solid rgba(204,0,0,.95);
  border-color: rgba(213,139,58,.24);
  box-shadow: 0 0 45px rgba(0,0,0,.85), 0 0 24px rgba(204,0,0,.16);
}

.pause-panel h2 {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 12px rgba(204,0,0,.35), 0 2px 2px #000;
  text-align: center;
  width: 100%;
  margin-bottom: 18px;
}
.pause-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.pause-panel .field { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); padding: 10px; margin: 10px 0; }
.pause-panel .settings-toggle-row .field { margin: 0; }
.pause-panel button { width: 100%; margin-top: 10px; text-transform: uppercase; letter-spacing: .08em; }

.pause-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.pause-actions button {
  width: 100%;
  margin-top: 0;
}

#gameOver::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(1px);
}

.gameover-panel {
  width: min(460px, calc(100vw - 32px));
  background: linear-gradient(180deg, rgba(12,12,12,.98), rgba(4,4,4,.96));
  border-left: 3px solid rgba(204,0,0,.95);
  border-color: rgba(213,139,58,.24);
  box-shadow: 0 0 45px rgba(0,0,0,.85), 0 0 24px rgba(204,0,0,.16);
}

.gameover-panel h2 {
  margin: 0 0 18px;
  text-align: center;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-shadow: 0 0 12px rgba(204,0,0,.35), 0 2px 2px #000;
}

.gameover-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 12px;
}

.gameover-stat-half {
  grid-column: span 3;
}

.gameover-stat-third {
  grid-column: span 2;
}

.gameover-stats div,
.gameover-best {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(0,0,0,.18));
  border: 1px solid rgba(213,139,58,.18);
  padding: 9px 10px;
  box-shadow: inset 0 0 14px rgba(0,0,0,.35);
  text-align: center;
}

.gameover-stats small,
.gameover-best small {
  display: block;
  color: #b8a783;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  text-shadow:
    0 0 4px rgba(0,0,0,.95),
    0 0 12px rgba(0,0,0,.75);
}

.gameover-stats strong,
.gameover-best strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .05em;
  color: #fff;
  text-shadow:
    0 0 4px rgba(0,0,0,.95),
    0 0 12px rgba(0,0,0,.75);
}

.gameover-best {
  margin-bottom: 14px;
}

.gameover-panel button {
  width: 100%;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}

.escalation-border { pointer-events: none; position: absolute; inset: 0; z-index: 4; border: 8px solid rgba(210, 0, 0, .85); box-shadow: inset 0 0 60px rgba(255,0,0,.5); animation: alarmPulse .6s ease-in-out infinite alternate; }
@keyframes alarmPulse { from { opacity: .35; } to { opacity: .9; } }

.table {
  display: grid;
  gap: 0;
  margin: 12px 0;
}

.full-leaderboard-row {
  display: grid;
  grid-template-columns:
    34px
    minmax(0, 1fr)
    82px
    100px
    72px
    64px
    55px;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  background: linear-gradient(90deg, rgba(213,139,58,.08), rgba(255,255,255,.025));
  border: 1px solid rgba(213,139,58,.16);
  border-bottom: 0;
  color: #d8d0c4;
  font-size: 13px;
}

.full-leaderboard-row:last-child {
  border-bottom: 1px solid rgba(213,139,58,.16);
}

.full-leaderboard-row.header {
  color: #f4d08a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: linear-gradient(90deg, rgba(213,139,58,.18), rgba(204,0,0,.08));
  border-color: rgba(213,139,58,.38);
}

.full-leaderboard-row > span:nth-child(1),
.full-leaderboard-row > span:nth-child(3),
.full-leaderboard-row > span:nth-child(5),
.full-leaderboard-row > span:nth-child(6),
.full-leaderboard-row > span:nth-child(7) {
  text-align: center;
}

.full-leaderboard-row.empty {
  color: var(--muted);
}

.full-leaderboard-row.rank-gold {
  color: #f4c44f;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255,215,106,.28);
  background: linear-gradient(90deg, rgba(255,215,106,.13), rgba(255,255,255,.025));
}

.full-leaderboard-row.rank-silver {
  color: #d8d8d8;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255,255,255,.18);
  background: linear-gradient(90deg, rgba(216,216,216,.10), rgba(255,255,255,.025));
}

.full-leaderboard-row.rank-bronze {
  color: #c68a52;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(198,138,82,.18);
  background: linear-gradient(90deg, rgba(198,138,82,.12), rgba(255,255,255,.025));
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  position: relative;
}

#leaderboardBack {
  position: absolute;
  left: 0;
}

.pager > button {
  min-width: 82px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  background: #241616;
  border-color: #6e3333;
}

.pager span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: auto;
}

.leaderboard-page-badge {
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(213,139,58,.12), rgba(255,255,255,.025));
  border: 1px solid rgba(213,139,58,.28);
  color: #f4d08a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.leaderboard-page-badge.active {
  background: var(--accent);
  border-color: #ff3a3a;
  color: #fff;
  box-shadow: 0 0 12px rgba(204,0,0,.35);
}

.leaderboard-page-dots {
  color: #8f7a5a;
  font-size: 12px;
  font-weight: 900;
  min-width: 14px;
  text-align: center;
}

.pager button:hover,
.pager button:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pager button:disabled {
  opacity: .35;
  cursor: default;
  background: #181818;
  border-color: rgba(213,139,58,.18);
  color: var(--muted);
}

#leaderboardScreen h2 {
  text-align: center;
  color: #f4d08a;
  text-shadow: 0 0 10px rgba(213,139,58,.32), 0 2px 2px #000;
}

@media (max-width: 760px) {
  .panel h1 { font-size: 30px; }
  .player-name-controls { grid-template-columns: 1fr; }
  .auth-tabs { grid-template-columns: 1fr; }

  .anonymous-profile-row {
    grid-template-columns: 1fr;
  }

  .anonymous-info-group {
    padding-bottom: 0;
  }

  #authPanelRegister,
  #loginFormState {
    grid-template-columns: 1fr;
  }

  #registerAuthError,
  #loginAuthError {
    grid-column: auto;
  }
  .auth-tab:last-child { border-bottom: 0; }
  .account-state { grid-template-columns: 1fr; }
  .account-state small:first-child, .account-state .field-error { grid-column: auto; }
  #logoutButton { width: 100%; }
  .settings-toggle-row { grid-template-columns: 1fr; }
  .gamepad-toggle { white-space: normal; }
  .character-grid { grid-template-columns: 1fr; }
  .character-card { min-height: 190px; }
  .character-portrait { height: 132px; }
  .hud { inset: 10px; }
  .status-panel { width: 280px; }
  .weapon-hud { width: calc(100vw - 20px); }
  .weapon-slots { grid-template-columns: 1fr; }
  .weapon-card { min-height: 96px; }
  .table-row { grid-template-columns: 32px 1fr 86px 70px 50px; font-size: 12px; }
}

/* HIRNTOT: FINAL LEVEL – Passwort-Popup und einheitliche Login-Controls */

#registerFormState,
#loginFormState {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.login-primary-row,
.login-secondary-row {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );
  gap: 8px 12px;
  align-items: start;
}

.login-primary-row >
.auth-link-control,
.login-primary-row >
.auth-input-group {
  min-width: 0;
}

.login-primary-row >
.auth-input-group +
.auth-input-group {
  margin-top: 0;
}

.login-secondary-row #loginAuthError,
.login-secondary-row .register-username-feedback {
  grid-column: 1;
  min-width: 0;
  margin: 0;
}

.login-secondary-row .register-username-feedback {
  display: grid;
  gap: 0;
  align-content: start;
}

.login-secondary-row #loginEmailError,
.login-secondary-row #registerEmailError {
  grid-column: 2;
  min-width: 0;
  margin: 0;
}

.auth-link-control {
  display: grid;
  gap: 4px;
}

.auth-control-caption {
  min-height: 12px;
  color: transparent;
  font-size: 11px;
  line-height: 1.1;
  user-select: none;
}

.auth-text-link {
  width: 100%;
  height: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d6c6b4;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-text-link:hover,
.auth-text-link:focus {
  border: 0;
  background: rgba(204, 0, 0, .12);
  color: #fff;
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(204, 0, 0, .5);
}

.account-state {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );
  gap: 8px 12px;
  align-items: start;
}

.account-state >
.auth-input-group,
.account-state >
.auth-link-control {
  min-width: 0;
}

.account-name-with-level {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.account-state #accountUsername {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 14px;
  padding: 0 4px;
  border: 1px solid rgba(244, 208, 138, .7);
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      rgba(213, 139, 58, .3),
      rgba(70, 38, 12, .55)
    );
  color: #ffe2a3;
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
  text-shadow:
    0 1px 1px #000,
    0 0 4px rgba(213, 139, 58, .42);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .05),
    0 0 4px rgba(213, 139, 58, .14);
}

.leaderboard-name-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.leaderboard-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-exp {
  font-weight: 900;
  color: #f4d08a;
}

/*
 * Passwort ändern verwendet vollständig
 * den vorhandenen auth-text-link-Stil.
 * Hier ist bewusst keine eigene
 * Button-Darstellung mehr nötig.
 */

.account-state #logoutButton,
.login-secondary-row #loginButton,
.login-secondary-row #registerButton {
  width: 100%;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 10px;
  font-weight: 900;
}

.login-secondary-row #loginButton,
.login-secondary-row #registerButton {
  grid-column: 3;
}

.account-state .field-error {
  grid-column: 1 / -1;
}

body.htfl-password-popup-open {
  overflow: hidden;
}

.htfl-password-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(2px) grayscale(.15);
}

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

.htfl-password-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(213, 139, 58, .28);
  border-left: 3px solid rgba(204, 0, 0, .95);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(16, 16, 16, .99), rgba(5, 5, 5, .99));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .9),
    0 0 28px rgba(204, 0, 0, .16);
  color: var(--text);
}

.htfl-password-dialog h2 {
  margin: 0;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(204, 0, 0, .35);
}

.htfl-password-intro {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.htfl-password-form {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: 13px 12px;
}

.htfl-password-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.htfl-password-field[hidden] {
  display: none;
}

#htflPasswordChallengeField {
  display: none !important;
}

#htflPasswordEmailField,
#htflPasswordMessage,
.htfl-password-actions {
  grid-column: 1 / -1;
}

.htfl-password-label-row {
  position: relative;
  min-width: 0;
  display: block;
  height: 15px;
}

.htfl-password-field label {
  display: block;
  min-height: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 15px;
  font-weight: 800;
}

.htfl-password-field-hint {
  position: absolute;
  top: 0;
  right: 0;
  color: #817c75;
  font-size: 10px;
  line-height: 15px;
  text-align: right;
  white-space: nowrap;
}

.htfl-password-field input {
  width: 100%;
  padding: 10px;
  border: 1px solid #4c3434;
  border-radius: 4px;
  background: #0b0b0b;
  color: var(--text);
}

.htfl-password-field input:focus {
  border-color: rgba(204, 0, 0, .9);
  outline: none;
  box-shadow: 0 0 0 1px rgba(204, 0, 0, .25);
}

.htfl-password-field input.has-error {
  border-color: #e04444;
}

.htfl-password-challenge-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
}

.htfl-password-challenge-question {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  background: rgba(255, 255, 255, .035);
  color: #d8d0c4;
  font-weight: 800;
}

.htfl-password-field-error,
.htfl-password-message {
  display: block;
  min-height: 14px;
  font-size: 11px;
  line-height: 1.3;
}

.htfl-password-field-error {
  color: #ff7777;
}

.htfl-password-field-error:empty,
.htfl-password-message:empty {
  display: none;
  min-height: 0;
}

.htfl-password-message.error {
  color: #ff7777;
}

.htfl-password-message.success {
  padding: 10px;
  border: 1px solid rgba(121, 201, 140, .28);
  background: rgba(121, 201, 140, .08);
  color: #91d7a1;
}

.htfl-password-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 5px;
}

.htfl-password-actions button {
  width: 100%;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 900;
}

.htfl-password-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 760px) {
  .login-primary-row,
  .login-secondary-row,
  .account-state {
    grid-template-columns: 1fr;
  }

  .login-secondary-row #loginAuthError,
  .login-secondary-row #loginEmailError,
  .login-secondary-row #loginButton,
  .login-secondary-row .register-username-feedback,
  .login-secondary-row #registerEmailError,
  .login-secondary-row #registerButton,
  .account-state .field-error {
    grid-column: auto;
  }

  .auth-control-caption {
    display: none;
  }

  .auth-text-link {
    min-height: 34px;
    padding: 4px 0;
  }

  .htfl-password-form,
  .htfl-password-actions {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOBILE RELEASE GATE

   Die komplette Mobile-Umsetzung bleibt im Projekt bestehen.
   Auf Mobilgeräten wird das Hauptmenü für die erste
   Desktop-Veröffentlichung lediglich reduziert dargestellt.
   ========================================================= */

.mobile-release-info {
  display: none;
}


/* Nur auf tatsächlich erkannten Mobil-/Touchgeräten. */

html.mobile-release-gate #mainMenu {
  width: min(
    720px,
    calc(100vw - 20px)
  );

  max-height: calc(
    100dvh - 20px
  );

  padding: 18px 14px;
}


/* Hauptüberschrift mobil kompakter darstellen. */

html.mobile-release-gate
#mainMenu h1 {
  font-size: clamp(
    24px,
    8vw,
    32px
  );

  line-height: 1.05;
  letter-spacing: clamp(
    2px,
    1.4vw,
    5px
  );

  word-spacing: 3px;
}


/* Hinweis zur noch laufenden Mobile-Umsetzung. */

html.mobile-release-gate
#mainMenu
.mobile-release-info {
  display: block;

  margin: 18px 0 22px;
  padding: 14px 15px;

  border: 1px solid
    rgba(204, 0, 0, .42);

  border-left: 3px solid
    var(--accent);

  border-radius: 5px;

  background:
    linear-gradient(
      90deg,
      rgba(204, 0, 0, .12),
      rgba(255, 255, 255, .025)
    );

  color: #d8d0c4;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;

  text-shadow:
    0 1px 2px rgba(0, 0, 0, .9);
}

html.mobile-release-gate
#mainMenu
.mobile-release-info p {
  margin: 0;
}


/* Auf Mobile vorläufig nicht dargestellte Menübereiche:

   - Anonym / Account erstellen / Login
   - Spielername und Account-Inhalte
   - Gamepad- und Fullscreen-Checkbox
   - Charakterauswahl
   - Start-Button
*/

html.mobile-release-gate
#mainMenu
.auth-field,

html.mobile-release-gate
#mainMenu
.character-select-field,

html.mobile-release-gate
#mainMenu
#playButton {
  display: none !important;
}


/* Da nur noch der Highscore-Button verbleibt,
   wird die Button-Zeile sauber zentriert. */

html.mobile-release-gate
#mainMenu
.menu-actions {
  margin: 0 0 22px;
}

html.mobile-release-gate
#mainMenu
#viewFullLeaderboard {
  width: min(
    100%,
    260px
  );

  min-width: 0;
}


/* Top-5-Bereich direkt unter dem Highscore-Button. */

html.mobile-release-gate
#mainMenu
.leaderboard-preview {
  margin-top: 0;
}

html.mobile-release-gate
#mainMenu
.leaderboard-preview h2 {
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: .06em;
}


/* Die Charakter-Spalte wird nur in der mobilen
   Top-5-Vorschau ausgeblendet.

   Sichtbar bleiben:
   Rang, Name, EXP, Zeit und Kills.
*/

html.mobile-release-gate
#mainMenu
.top-leaderboard-row {
  grid-template-columns:
    24px
    minmax(0, 1fr)
    54px
    46px
    38px;

  gap: 3px;
  padding: 7px 6px;
  font-size: 10px;
}

html.mobile-release-gate
#mainMenu
.top-leaderboard-row >
span:nth-child(3) {
  display: none;
}

html.mobile-release-gate
#mainMenu
.top-leaderboard-row.header {
  font-size: 8px;
  letter-spacing: .05em;
}

html.mobile-release-gate
#mainMenu
.top-leaderboard-row >
span:nth-child(1),

html.mobile-release-gate
#mainMenu
.top-leaderboard-row >
span:nth-child(4),

html.mobile-release-gate
#mainMenu
.top-leaderboard-row >
span:nth-child(5),

html.mobile-release-gate
#mainMenu
.top-leaderboard-row >
span:nth-child(6) {
  text-align: center;
}


/* Der Level-Badge würde auf sehr schmalen Geräten
   unnötig Platz vom Spielernamen wegnehmen. */

html.mobile-release-gate
#mainMenu
.leaderboard-name-cell
.level-badge {
  display: none;
}


/* =========================================================
   EINGELOGGTE ACCOUNT-TABS: STATISTIK / SPIELER WERTE
   ========================================================= */

#mainMenu.account-subview-open .main-settings-row,
#mainMenu.account-subview-open .character-select-field,
#mainMenu.account-subview-open .menu-actions,
#mainMenu.account-subview-open .leaderboard-preview {
  display: none !important;
}

.statistics-auth-panel,
.player-values-auth-panel {
  display: block;
  padding: 12px;
}

.account-panel-message,
.account-panel-placeholder {
  min-height: 132px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.035),
      rgba(255,255,255,.012)
    );
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
}

.account-panel-message.error {
  color: #ff8585;
  border-color: rgba(204,0,0,.45);
  background:
    linear-gradient(
      180deg,
      rgba(204,0,0,.13),
      rgba(204,0,0,.035)
    );
}

.account-panel-placeholder {
  align-content: center;
  gap: 8px;
}

.account-panel-placeholder strong {
  color: #fff;
  font-family: var(--title-font);
  font-size: 22px;
  letter-spacing: .14em;
}

.account-panel-placeholder span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .06em;
}

.player-statistics-content {
  display: grid;
  gap: 28px;
}

.statistics-section {
  display: grid;
  gap: 8px;
}

.statistics-section-title {
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(213,139,58,.34);
  color: #f4ca87;
  font-family: var(--title-font);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
}

/*
 * Einklappbarer Bereich:
 * Eliminierte Gegner gesamt
 */
.statistics-enemy-section {
  gap: 0;
}

.statistics-enemy-toggle {
  width: 100%;
  min-width: 0;
  min-height: 30px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  margin: 0;
  padding: 4px 5px 7px 0;

  border: 0;
  border-radius: 2px;
  background: transparent;

  color: inherit;
  font: inherit;
  text-align: left;

  cursor: pointer;

  transition:
    background-color .14s ease,
    color .14s ease;
}

.statistics-enemy-toggle-title {
  min-width: 0;

  color: #f4ca87;
  font-family: var(--title-font);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;

  transition:
    color .14s ease,
    text-shadow .14s ease;
}

.statistics-enemy-toggle-state {
  flex: 0 0 auto;

  color: #8f8981;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;

  transition:
    color .14s ease;
}

/*
 * Dezenter Hover über die komplette Zeile.
 */
/*
 * Verhindert, dass die globale button:focus-Regel
 * den Toggle nach dem Anklicken dauerhaft rot färbt.
 */
.statistics-enemy-toggle:focus {
  border-color: transparent;
  background: transparent;
  color: inherit;
  outline: none;
  box-shadow: none;
}

/*
 * Nur beim tatsächlichen Darüberfahren erscheint
 * der dezente goldene Hoverzustand.
 */
.statistics-enemy-toggle:hover {
  border-color: transparent;
  background:
    linear-gradient(
      90deg,
      rgba(213,139,58,.075),
      rgba(213,139,58,0) 78%
    );
  color: inherit;
}

.statistics-enemy-toggle:hover
.statistics-enemy-toggle-title {
  color: #ffe0a8;

  text-shadow:
    0 0 8px rgba(213,139,58,.18);
}

.statistics-enemy-toggle:hover
.statistics-enemy-toggle-state {
  color: #d7b77f;
}

/*
 * Tastaturfokus bleibt erkennbar, erzeugt aber
 * keinen roten Hintergrund.
 */
.statistics-enemy-toggle:focus-visible {
  border-color: transparent;
  background: transparent;
  color: inherit;

  outline:
    1px solid rgba(213,139,58,.58);
  outline-offset: 2px;
}

.statistics-enemy-toggle.is-expanded
.statistics-enemy-toggle-state {
  color: #f4ca87;
}

/*
 * Gemeinsame Headerzeile für:
 * Caption, Ansichtsbuttons und Ein-/Ausblenden.
 */
.statistics-enemy-header-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    auto;
  gap: 10px;
  align-items: center;
}

.statistics-enemy-view-switch {
  display: flex;
  align-items: center;
  gap: 4px;
}

.statistics-enemy-view-button {
  min-width: 72px;
  min-height: 22px;

  padding: 4px 8px;

  border:
    1px solid rgba(213,139,58,.26);
  border-radius: 2px;

  background:
    rgba(255,255,255,.025);

  color: #8f8981;

  font-size: 8px;
  font-weight: 900;
  letter-spacing: .065em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;

  box-shadow: none;

  transition:
    color .14s ease,
    border-color .14s ease,
    background-color .14s ease,
    box-shadow .14s ease;
}

.statistics-enemy-view-button:hover,
.statistics-enemy-view-button:focus {
  border-color:
    rgba(213,139,58,.62);

  background:
    rgba(213,139,58,.09);

  color: #f4ca87;

  outline: none;
  box-shadow: none;
}

.statistics-enemy-view-button.is-active,
.statistics-enemy-view-button.is-active:hover,
.statistics-enemy-view-button.is-active:focus {
  border-color:
    rgba(204,0,0,.74);

  background:
    linear-gradient(
      180deg,
      rgba(204,0,0,.26),
      rgba(204,0,0,.11)
    );

  color: #fff;

  box-shadow:
    inset 0 -2px 0 #cc0000,
    0 0 8px rgba(204,0,0,.12);
}

.statistics-enemy-view[hidden] {
  display: none;
}

@media (max-width: 620px) {
  .statistics-enemy-header-row {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  .statistics-enemy-header-row
  .statistics-enemy-toggle-state {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .statistics-enemy-view-button {
    min-width: 64px;
    padding-inline: 6px;
  }
}

.statistics-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.statistics-value-card {
  min-width: 0;
  padding: 9px 7px;
  border: 1px solid rgba(255,255,255,.085);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.045),
      rgba(255,255,255,.015)
    );
  text-align: center;
}

.statistics-value-card small {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  color: #8f8981;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.statistics-value-card strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.statistics-summary-item {
  min-width: 0;
  padding: 6px 8px;
  border-left: 2px solid rgba(204,0,0,.7);
  background: rgba(255,255,255,.025);
}

.statistics-summary-item small {
  display: block;
  color: #817c75;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.statistics-summary-item strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #ddd7cf;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-best-run {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(204,0,0,.42);
  background:
    radial-gradient(
      circle at 12% 50%,
      rgba(204,0,0,.15),
      transparent 42%
    ),
    linear-gradient(
      180deg,
      rgba(255,255,255,.045),
      rgba(255,255,255,.015)
    );
}

/*
 * Gemeinsamer Bereich für besten und letzten Run.
 */
.statistics-featured-runs {
  min-width: 0;
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.statistics-featured-run-block {
  min-width: 0;
  display: grid;
  grid-template-rows:
    auto
    minmax(0, 1fr);
  gap: 8px;
  align-content: start;
}

/*
 * In der zweispaltigen Darstellung werden
 * Überschrift und Card etwas kompakter.
 */
.statistics-featured-run-block
.statistics-section-title {
  min-width: 0;
  font-size: 15px;
  letter-spacing: .1em;
  white-space: nowrap;
}

.statistics-featured-runs
.statistics-best-run {
  height: 100%;
  grid-template-columns:
    72px
    minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

.statistics-featured-runs
.statistics-best-run-portrait {
  width: 72px;
  height: 72px;
}

.statistics-featured-runs
.statistics-best-run-copy {
  gap: 5px;
}

.statistics-featured-runs
.statistics-best-run-name {
  font-size: 16px;
}

.statistics-featured-runs
.statistics-best-run-values {
  gap: 4px;
}

.statistics-featured-runs
.statistics-best-run-values span {
  padding: 5px 3px;
}

.statistics-featured-runs
.statistics-best-run-values small {
  font-size: 8px;
}

.statistics-featured-runs
.statistics-best-run-values strong {
  font-size: 12px;
}

/*
 * Letzter Run:
 * derselbe Navyblauton wie bei den Skill-Cards.
 */
.statistics-best-run.is-latest {
  border-color:
    rgba(42,91,145,.58);

  background:
    radial-gradient(
      circle at 12% 50%,
      rgba(18,43,72,.52),
      transparent 46%
    ),
    linear-gradient(
      180deg,
      rgba(255,255,255,.055) 0%,
      rgba(18,43,72,.34) 100%
    );
}

.statistics-best-run.is-latest
.statistics-best-run-portrait {
  border-color:
    rgba(42,91,145,.5);
}

.statistics-featured-run-block.is-latest
.statistics-section-title {
  border-bottom-color:
    rgba(42,91,145,.58);
  color: #aecbea;
}

.statistics-best-run.empty {
  grid-template-columns: minmax(0, 1fr);
  min-height: 82px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  place-items: center;
  text-transform: uppercase;
}

.statistics-best-run-portrait {
  width: 88px;
  height: 88px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  background: #0b0b0b;
}

.statistics-best-run-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  image-rendering: pixelated;
}

.statistics-best-run-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.statistics-best-run-name {
  color: #fff;
  font-family: var(--title-font);
  font-size: 20px;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    -1px -1px 0 #000,
     0   -1px 0 #000,
     1px -1px 0 #000,
    -1px  0   0 #000,
     1px  0   0 #000,
    -1px  1px 0 #000,
     0    1px 0 #000,
     1px  1px 0 #000,
     0 2px 4px rgba(0,0,0,.9);
}

.statistics-best-run-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.statistics-best-run-values span {
  min-width: 0;
  padding: 6px;
  background: rgba(0,0,0,.3);
  text-align: center;
}

.statistics-best-run-values small {
  display: block;
  color: #8f8981;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.statistics-best-run-values strong {
  display: block;
  margin-top: 2px;
  color: #f3d19a;
  font-size: 14px;
  line-height: 1;
}

.statistics-run-meta {
  color: #8f8981;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1.25;
}

.statistics-character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.statistics-character-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.04),
      rgba(255,255,255,.012)
    );

  transition:
    border-color .14s ease,
    background .14s ease,
    box-shadow .14s ease;
}

.statistics-character-card:hover {
  border-color: rgba(213,139,58,.86);

  background:
    linear-gradient(
      180deg,
      rgba(213,139,58,.075),
      rgba(213,139,58,.018)
    ),
    linear-gradient(
      180deg,
      rgba(255,255,255,.05),
      rgba(255,255,255,.015)
    );

  box-shadow:
    inset 0 0 18px rgba(213,139,58,.045);
}

.statistics-character-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid rgba(255,255,255,.075);
  background: rgba(0,0,0,.25);
}

.statistics-character-head img {
  width: 54px;
  height: 54px;
  display: block;
  object-fit: cover;
  image-rendering: pixelated;
}

.statistics-character-head strong {
  min-width: 0;
  padding: 0 7px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.statistics-character-body {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.statistics-character-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.statistics-character-totals span,
.statistics-character-best-values span {
  min-width: 0;
  text-align: center;
}

.statistics-character-totals small,
.statistics-character-best-values small {
  display: block;
  overflow: hidden;
  color: #817c75;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .03em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.statistics-character-totals strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #ddd7cf;
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-character-best {
  display: grid;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.statistics-character-best > small {
  color: #c89550;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.statistics-character-best-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.statistics-character-best-values strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-character-best-meta {
  overflow: hidden;
  color: #746f68;
  font-size: 8px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-enemy-details {
  min-width: 0;

  display: grid;
  gap: 8px;
}

.statistics-enemy-details[hidden] {
  display: none;
}

/*
 * Der bisherige Goldstrich unter der Caption.
 * Er liegt bewusst im ausblendbaren Wrapper.
 */
.statistics-enemy-divider {
  width: 100%;
  height: 1px;

  background:
    rgba(213,139,58,.34);
}

.statistics-enemy-grid {
  display: grid;
  gap: 6px;
}

.statistics-enemy-subgrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.statistics-enemy-subgrid:empty {
  display: none;
}

.statistics-enemy-card {
  min-width: 0;
  display: grid;
  justify-items: center;
  padding: 5px 4px 7px;
  border: 1px solid rgba(255,255,255,.075);
  background:
    radial-gradient(
      circle at 50% 52%,
      rgba(204,0,0,.08),
      transparent 58%
    ),
    rgba(255,255,255,.018);

  transition:
    border-color .14s ease;
}

.statistics-enemy-card:hover {
  border-color: var(--accent);
}

.statistics-enemy-canvas {
  width: 112px;
  height: 112px;
  max-width: 100%;
  display: block;
  image-rendering: pixelated;
}

.statistics-enemy-canvas.statistics-enemy-target {
  cursor: crosshair;
  border-radius: 2px;
  transition:
    filter .12s ease,
    transform .12s ease;
}

.statistics-enemy-canvas.statistics-enemy-target:hover {
  filter:
    brightness(1.16)
    drop-shadow(
      0 0 7px rgba(184,15,24,.48)
    );

  transform: scale(1.025);
}

.statistics-enemy-canvas.statistics-enemy-target:focus-visible {
  outline: 1px solid #b80f18;
  outline-offset: -2px;

  filter:
    brightness(1.16)
    drop-shadow(
      0 0 7px rgba(184,15,24,.48)
    );
}

.statistics-enemy-canvas.statistics-enemy-dying,
.statistics-enemy-canvas.statistics-enemy-frozen {
  cursor: crosshair;
}

.statistics-enemy-card.statistics-enemy-card-hit {
  animation:
    statistics-enemy-hit-flash
    .18s ease-out;
}

@keyframes statistics-enemy-hit-flash {
  0% {
    border-color:
      rgba(255,255,255,.075);

    box-shadow: none;
  }

  28% {
    border-color:
      rgba(204,0,0,.95);

    box-shadow:
      inset 0 0 18px
        rgba(204,0,0,.32),
      0 0 12px
        rgba(204,0,0,.2);
  }

  100% {
    border-color:
      rgba(255,255,255,.075);

    box-shadow: none;
  }
}

.statistics-enemy-count {
  display: block;
  margin-top: -6px;
  color: #b80f18;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 1px 0 #000,
    0 0 8px rgba(184,15,24,.42);
}

.statistics-enemy-caption {
  display: block;
  margin-top: 2px;
  color: #8f1117;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.statistics-enemy-fallback {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  color: #6f6760;
  font-family: var(--title-font);
  font-size: 34px;
  text-shadow: 0 0 12px rgba(204,0,0,.35);
}

.statistics-enemy-archive-name {
  max-width: 100%;
  margin-top: -2px;
  overflow: hidden;
  color: #817c75;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.statistics-melee-card {
  display: grid;
  grid-template-columns:
    84px
    minmax(0, 1fr)
    84px;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 10px 12px;
  border: 1px solid rgba(213,139,58,.28);
  background:
    linear-gradient(
      90deg,
      rgba(213,139,58,.09),
      rgba(255,255,255,.015)
    );
}

.statistics-melee-weapon {
  width: 72px;
  height: 72px;
  display: block;
  justify-self: center;
  object-fit: contain;
  image-rendering: pixelated;
  filter:
    drop-shadow(
      0 0 7px rgba(0,0,0,.75)
    );
}

.statistics-melee-copy {
  min-width: 0;
  text-align: center;
}

.statistics-melee-copy small {
  display: block;
  color: #8f8981;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.statistics-melee-copy strong {
  display: block;
  margin-top: 3px;
  color: #f3d19a;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.statistics-melee-copy span {
  display: block;
  margin-top: 5px;
  color: #77716a;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 760px) {
  .statistics-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  /*
   * Auf schmalen Displays stehen bester
   * und letzter Run untereinander.
   */
  .statistics-featured-runs {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .statistics-best-run {
    grid-template-columns:
      72px
      minmax(0, 1fr);
  }

  .statistics-best-run-portrait {
    width: 72px;
    height: 72px;
  }
}


/* =========================================================
   HIRNTOT: FINAL LEVEL – SPIELER WERTE V3
   ========================================================= */

.player-values-auth-panel {
  display: block;
  padding: 12px;
}

.player-values-content,
.pv-overview {
  display: grid;
  gap: 14px;
}

.pv-level-overview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.045),
      rgba(255,255,255,.012)
    );
}

.pv-level-badge-large {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 5px;
  border: 1px solid rgba(204,0,0,.48);
  background:
    radial-gradient(
      circle at center,
      rgba(204,0,0,.24),
      rgba(25,0,0,.4)
    );
  box-shadow:
    inset 0 0 20px rgba(204,0,0,.12),
    0 0 16px rgba(204,0,0,.08);
  text-align: center;
}

.pv-level-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1.05 !important;
}

.pv-level-badge-large small,
.pv-level-progress-copy span,
.pv-section-heading small,
.pv-section-actions small,
.pv-value-triplet small,
.pv-attribute-card header small,
.pv-invested-points,
.pv-weapon-card header small,
.pv-skill-card header small,
.pv-column-legend,
.pv-modal-header small,
.pv-modal-meta small,
.pv-training-info span,
.pv-training-value small,
.pv-perk-choice-copy small,
.pv-perk-result-preview small,
.pv-perk-detail header small {
  color: #958f87;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.pv-level-badge-large strong {
  color: #fff;
  font-family: var(--title-font);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: .05em;
  line-height: .95;
  text-shadow: 0 0 18px rgba(204,0,0,.5);
}

.pv-level-progress-block {
  display: grid;
  gap: 9px;
}

.pv-level-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.pv-level-progress-copy strong {
  color: #fff;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pv-level-progress-track {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background: #080808;
}

.pv-level-progress-track i {
  display: block;
  height: 100%;
  background:
    linear-gradient(
      90deg,
      #6f0000,
      #d00000,
      #ff3a3a
    );
  box-shadow: 0 0 14px rgba(255,0,0,.38);
}

.pv-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.09);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.032),
      rgba(255,255,255,.009)
    );
  transition:
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.pv-section.has-free-points {
  border-color: rgba(228,178,71,.78);
  background:
    linear-gradient(
      180deg,
      rgba(228,178,71,.17),
      rgba(96,61,0,.075)
    );
  box-shadow:
    inset 0 0 24px rgba(228,178,71,.07),
    0 0 18px rgba(228,178,71,.08);
}

.pv-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(213,139,58,.25);
}

.pv-section-heading h3 {
  margin: 1px 0 0;
  color: #f4ca87;
  font-family: var(--title-font);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .13em;
  line-height: 1;
  text-transform: uppercase;
}

.pv-section.has-free-points
.pv-section-heading h3 {
  color: #ffe08d;
}

.pv-section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pv-section-actions > span {
  display: grid;
  min-width: 76px;
  text-align: right;
}

.pv-section-actions > span strong {
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.pv-action-button {
  min-width: 104px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pv-gold-button,
.pv-gold-button:hover,
.pv-gold-button:focus {
  border-color: #ffe08d;
  background:
    linear-gradient(
      180deg,
      #8d6308,
      #5e3b00
    );
  color: #fff5cb;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 0 14px rgba(228,178,71,.2);
}

.pv-gold-button:hover,
.pv-gold-button:focus {
  background:
    linear-gradient(
      180deg,
      #b78314,
      #765000
    );
}

.pv-attribute-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pv-attribute-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.085);
  background: rgba(0,0,0,.23);
}

.pv-attribute-card.is-modified {
  border-color: rgba(66,214,110,.25);
}

.pv-attribute-card > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.pv-attribute-card h4,
.pv-weapon-card h4,
.pv-skill-card h4,
.pv-active-perk-card h4,
.pv-training-info h3,
.pv-perk-detail h3,
.pv-perk-requirements h4 {
  margin: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.pv-invested-points {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid rgba(42,91,145,.72);
  background:
    linear-gradient(
      180deg,
      rgba(18,43,72,.92),
      rgba(5,16,29,.92)
    );
  color: #c9e2ff;
  box-shadow:
    inset 0 0 10px rgba(67,126,190,.13),
    0 0 8px rgba(42,91,145,.09);
  text-shadow:
    0 0 7px rgba(90,153,220,.26);
}

.pv-value-triplet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(255,255,255,.07);
}

.pv-value-triplet > div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px 5px;
  border-right: 1px solid rgba(255,255,255,.06);
  text-align: center;
}

.pv-value-triplet > div:last-child {
  border-right: 0;
}

.pv-value-triplet strong {
  color: #eae6df;
  font-size: 11px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pv-value-triplet
.pv-modifier-value.is-active strong,
.pv-attribute-card.is-modified
.pv-value-triplet > div:last-child strong {
  color: #53f586;
  text-shadow: 0 0 9px rgba(83,245,134,.35);
}

.pv-active-perk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pv-active-perk-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(92,220,128,.25);
  background:
    linear-gradient(
      180deg,
      rgba(47,126,70,.12),
      rgba(0,0,0,.18)
    );
}

.pv-active-perk-icon {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  background: #050505;
}

.pv-active-perk-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pv-active-perk-rank {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 2px 1px;
  background: rgba(0,0,0,.82);
  color: #f4c44f;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .02em;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 1px 0 #000,
    0 0 5px rgba(244,196,79,.35);
}

.pv-active-perk-title {
  display: block;
  margin-bottom: 4px;
}

.pv-active-perk-card p,
.pv-training-info p,
.pv-perk-detail header p,
.pv-perk-result-preview p {
  margin: 0;
  color: #98928a;
  font-size: 10px;
  line-height: 1.4;
}

.pv-active-perk-copy {
  min-width: 0;
}

.pv-active-perk-target-icons {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
}

.pv-active-perk-target-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: .95;
  filter:
    drop-shadow(1px 0 0 rgba(255,24,24,.95))
    drop-shadow(-1px 0 0 rgba(255,24,24,.95))
    drop-shadow(0 1px 0 rgba(255,24,24,.95))
    drop-shadow(0 -1px 0 rgba(255,24,24,.95))
    drop-shadow(0 0 3px rgba(255,0,0,.65))
    drop-shadow(0 1px 2px rgba(0,0,0,.9));
}

.pv-column-legend {
  text-align: right;
}

/*
 * Einklappbare Waffen- und Skillbereiche.
 *
 * Toggle, Hover, Fokus und Goldstrich verwenden
 * direkt dieselben Klassen wie die einklappbaren
 * Statistikbereiche.
 */
.pv-values-collapsible-section {
  gap: 0;
}

.pv-values-collapsible-details {
  min-width: 0;
}

.pv-values-collapsible-details[hidden] {
  display: none;
}

.pv-values-expanded-meta {
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pv-values-expanded-kicker {
  flex: 0 0 auto;

  color: #958f87;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.25;
  text-transform: uppercase;
}

/*
 * Im Werte-Tab entspricht die Toggle-Caption
 * weiterhin der bisherigen 19px großen
 * Waffen-/Skillüberschrift.
 */
.pv-values-collapsible-section
.statistics-enemy-toggle-title {
  font-size: 19px;
  letter-spacing: .13em;
}

.pv-weapon-grid,
.pv-skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pv-weapon-card,
.pv-skill-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.085);
  background: rgba(0,0,0,.23);
}

/*
 * Waffen und Skills können den diagonalen
 * Charakter-Ribbon besitzen.
 */
.pv-weapon-card,
.pv-skill-card {
  position: relative;
  overflow: hidden;
}

/*
 * Waffenkarte beim Maus-Hover:
 * blutroter Rahmen und eine sehr dezente
 * Hervorhebung des Hintergrunds.
 */
.pv-weapon-card {
  transition:
    border-color .14s ease,
    background .14s ease,
    box-shadow .14s ease;
}

.pv-weapon-card:hover {
  border-color: var(--accent);

  background:
    linear-gradient(
      180deg,
      rgba(204,0,0,.075),
      rgba(204,0,0,.018)
    ),
    rgba(0,0,0,.23);

  box-shadow:
    inset 0 0 18px rgba(204,0,0,.045);
}

.pv-skill-card {
  border-color: rgba(42, 91, 145, .42);
  background:
    linear-gradient(
      180deg,
      rgba(18, 43, 72, .42),
      rgba(0, 0, 0, .23)
    );
}

.pv-weapon-card > header,
.pv-skill-card > header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

/*
 * Waffen- und Skillname liegen bewusst
 * ÜBER dem goldenen Charakter-Ribbon.
 */
.pv-weapon-card > header,
.pv-skill-card > header {
  position: relative;
  z-index: 5;
}

.pv-card-heading-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pv-card-heading-copy h4,
.pv-card-heading-copy small {
  overflow-wrap: anywhere;
}

.pv-weapon-icon,
.pv-skill-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.pv-weapon-icon {
  border: 1px solid rgba(255,255,255,.08);
  background: #050505;
}

.pv-skill-icon {
  padding: 4px;
  border: 2px solid rgba(0,0,0,.96);

  background:
    linear-gradient(
      180deg,
      rgba(255,214,92,.12) 0%,
      rgba(255,214,92,.12) 45%,
      rgba(0,0,0,.20) 58%,
      rgba(0,0,0,.20) 100%
    ),
    rgba(86,62,12,.96);

  box-shadow:
    inset 0 0 0 1px rgba(232,188,55,.98),
    0 0 5px rgba(218,170,36,.36);
}

.pv-weapon-icon img,
.pv-skill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pv-data-stats {
  display: grid;
  gap: 6px;
}

.pv-data-stat {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-top: 5px;
  border-top: 1px solid rgba(255,255,255,.055);
}

.pv-data-stat:first-child {
  padding-top: 0;
  border-top: 0;
}

.pv-data-stat > span {
  color: #8e8880;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
}

.pv-weapon-section
.pv-data-stat > span,
.pv-skill-section
.pv-data-stat > span {
  font-size: 11px;
  font-weight: 900;
  text-shadow:
    0 1px 0 #000,
    0 0 4px rgba(204, 0, 0, .55);
}

.pv-data-stat-values {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  align-items: center;
  text-align: right;
}

.pv-data-stat-values b,
.pv-data-stat-values em,
.pv-data-stat-values strong {
  min-width: 0;
  color: #aaa49d;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.pv-data-stat-values em {
  color: #726d67;
  text-align: center;
}

.pv-data-stat-values strong {
  color: #eae6df;
}

.pv-data-stat.is-modified
.pv-data-stat-values em,
.pv-data-stat.is-modified
.pv-data-stat-values strong {
  color: #53f586;
  text-shadow: 0 0 8px rgba(83,245,134,.25);
}

.pv-empty-stat {
  padding: 10px;
  border: 1px dashed rgba(255,255,255,.08);
  color: #7f7972;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.pv-empty-state {
  grid-column: 1 / -1;
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed rgba(255,255,255,.09);
  color: #7f7972;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-align: center;
  text-transform: uppercase;
}

/* ------------------------- MODAL ------------------------- */

body.pv-modal-open {
  overflow: hidden;
}

.pv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.84);
  backdrop-filter: blur(2px);
}

.pv-modal-overlay.hidden {
  display: none !important;
}

.pv-modal {
  width: min(960px, calc(100vw - 48px));
  max-height: min(900px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 7px;
  background:
    linear-gradient(
      180deg,
      rgba(21,21,21,.99),
      rgba(7,7,7,.99)
    );
  box-shadow:
    0 28px 90px rgba(0,0,0,.82),
    0 0 0 1px rgba(0,0,0,.8);
  outline: none;
}

.pv-modal-overlay.is-training .pv-modal {
  width: 100%;
  max-width: 630px;

  border-color: rgba(228,178,71,.58);
  box-shadow:
    0 28px 90px rgba(0,0,0,.82),
    0 0 34px rgba(228,178,71,.11);
}

.pv-modal-overlay.is-perks .pv-modal {
  height: min(
    700px,
    calc(100vh - 48px)
  );

  border-color: rgba(204,0,0,.62);
  box-shadow:
    0 28px 90px rgba(0,0,0,.82),
    0 0 34px rgba(204,0,0,.14);
}

.pv-modal-header {
  display: grid;
  gap: 12px;
  align-items: stretch;

  /*
   * Unten kein Padding, damit die Filterbuttons
   * direkt an der unteren Headerkante andocken.
   */
  padding: 18px 20px 0;

  border-bottom:
    1px solid rgba(255,255,255,.09);

  background: rgba(255,255,255,.025);
}

.pv-modal-header-main {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.pv-modal-header-copy {
  min-width: 0;
}

/*
 * Im Trainingsmodus existiert keine Filterleiste.
 * Daher bleibt dort das bisherige untere Padding.
 */
.pv-modal-overlay.is-training
.pv-modal-header {
  padding-bottom: 16px;
}

.pv-perk-filter-bar {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 6px;

  /*
   * Gleiche Außenkante wie das komplette
   * Headerpanel, nicht wie der eingerückte Text.
   */
  margin: 0 -20px;
  padding: 0 20px;

  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;

  scrollbar-width: none;
}

.pv-perk-filter-bar::-webkit-scrollbar {
  display: none;
}

.pv-perk-filter-button {
  --perk-theme-accent: #8493a3;
  --perk-theme-border:
    rgba(132,147,163,.72);
  --perk-theme-surface-top: #29343e;
  --perk-theme-surface-bottom: #0a0e12;
  --perk-theme-glow:
    rgba(132,147,163,.22);

  flex: 0 0 auto;
  min-width: 0;
  height: 30px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 10px;

  border-color:
    var(--perk-theme-border);
  border-radius: 3px 3px 0 0;
  border-bottom: 0;

  /*
   * Mehrschichtiger Hintergrund statt einer
   * einfachen, flachen Charakterfarbe.
   */
  background:
    radial-gradient(
      circle at 20% -35%,
      var(--perk-theme-glow) 0%,
      transparent 64%
    ),
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,.025) 0,
      rgba(255,255,255,.025) 1px,
      transparent 1px,
      transparent 8px
    ),
    linear-gradient(
      180deg,
      var(--perk-theme-surface-top),
      var(--perk-theme-surface-bottom)
    );

  color: #b8b1a9;

  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;

  transform: translateY(1px);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035);

  transition:
    border-color .14s ease,
    color .14s ease,
    filter .14s ease,
    box-shadow .14s ease;
}

/*
 * Upgrade-Zustand wird nur noch durch
 * die Schriftfarbe kommuniziert.
 */
.pv-perk-filter-button.has-upgrade {
  color: #77d995;
}

.pv-perk-filter-button.has-no-upgrade {
  color: #d18484;
}

/*
 * Charakterbezogener Hover.
 * Überschreibt gleichzeitig die globale
 * rote button:hover-Regel.
 */
.pv-perk-filter-button:hover,
.pv-perk-filter-button:focus {
  border-color:
    var(--perk-theme-accent);

  background:
    radial-gradient(
      circle at 20% -35%,
      var(--perk-theme-glow) 0%,
      transparent 64%
    ),
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,.035) 0,
      rgba(255,255,255,.035) 1px,
      transparent 1px,
      transparent 8px
    ),
    linear-gradient(
      180deg,
      var(--perk-theme-surface-top),
      var(--perk-theme-surface-bottom)
    );

  filter:
    brightness(1.18)
    saturate(1.08);

  box-shadow:
    inset 0 -1px 0
      var(--perk-theme-accent),
    0 0 9px
      var(--perk-theme-glow);

  outline: none;
}

.pv-perk-filter-button.has-upgrade:hover,
.pv-perk-filter-button.has-upgrade:focus {
  color: #a0f4ba;
}

.pv-perk-filter-button.has-no-upgrade:hover,
.pv-perk-filter-button.has-no-upgrade:focus {
  color: #f0a0a0;
}

/*
 * Aktiver Filter:
 * kräftigere Version desselben Charakterthemes.
 */
.pv-perk-filter-button.is-active {
  border-color:
    var(--perk-theme-accent);

  background:
    radial-gradient(
      circle at 20% -35%,
      var(--perk-theme-glow) 0%,
      transparent 64%
    ),
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,.04) 0,
      rgba(255,255,255,.04) 1px,
      transparent 1px,
      transparent 7px
    ),
    linear-gradient(
      180deg,
      var(--perk-theme-surface-top),
      var(--perk-theme-surface-bottom)
    );

  filter:
    brightness(1.28)
    saturate(1.12);

  box-shadow:
    inset 0 -2px 0
      var(--perk-theme-accent),
    0 0 12px
      var(--perk-theme-glow);
}

.pv-perk-filter-button.has-upgrade.is-active {
  color: #b8ffca;
}

.pv-perk-filter-button.has-no-upgrade.is-active {
  color: #ffb0b0;
}

.pv-perk-filter-button.is-empty {
  opacity: .58;
}

.pv-modal-header h2 {
  margin: 2px 0 4px;
  color: #fff;
  font-family: var(--title-font);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: .16em;
  line-height: 1;
  text-transform: uppercase;
}

.pv-modal-header p {
  max-width: 650px;
  margin: 0;
  color: #9e9890;
  font-size: 11px;
  line-height: 1.4;
}

.pv-modal-meta {
  display: flex;
  gap: 8px;
}

.pv-modal-meta > span {
  min-width: 82px;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.25);
  text-align: center;
}

.pv-modal-meta strong {
  color: #fff;
  font-size: 19px;
  line-height: 1;
}

.pv-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 20px;
}

.pv-modal-feedback {
  margin: 0 20px 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  color: #ddd8d0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.pv-modal-feedback.error {
  border-color: rgba(255,80,80,.45);
  background: rgba(130,0,0,.18);
  color: #ff9c9c;
}

.pv-modal-feedback.success {
  border-color: rgba(83,245,134,.35);
  background: rgba(0,100,35,.16);
  color: #75f29c;
}

.pv-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.22);
}

.pv-modal-footer button {
  min-width: 170px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* ---------------------- TRAINING ------------------------- */

.pv-training-list {
  display: grid;
  gap: 4px;
}

.pv-training-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    270px;
  gap: 8px;
  align-items: center;

  /*
   * Deutlich kompakter als bisher:
   * vorher 10px Innenabstand pro Seite.
   */
  padding: 4px 7px;

  border: 1px solid rgba(255,255,255,.085);
  background: rgba(0,0,0,.22);
}

.pv-training-row.is-changed {
  border-color: rgba(83,245,134,.42);
  background:
    linear-gradient(
      90deg,
      rgba(0,90,31,.14),
      rgba(0,0,0,.2)
    );
}

.pv-training-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pv-training-info > div {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.pv-training-info h3 {
  font-size: 13px;
  line-height: 1.1;
}

.pv-training-info p {
  font-size: 10px;
  line-height: 1.25;
}

.pv-training-info > div > span {
  flex: 0 0 auto;
  padding: 2px 5px;

  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.035);

  color: #aaa39b;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .04em;
  white-space: nowrap;
}

.pv-training-controls {
  display: grid;
  grid-template-columns:
    24px
    minmax(0, 1fr)
    24px;
  gap: 5px;
  align-items: center;
}

.pv-step-button {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;

  display: grid;
  place-items: center;

  padding: 0;
  border-radius: 3px;

  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.pv-training-value {
  min-width: 0;
  min-height: 28px;

  display: grid;

  /*
   * Linke und rechte Seite sind gleich breit.
   * Dadurch bleibt der Mittelpunkt exakt zwischen
   * Minus- und Plus-Button.
   */
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);

  gap: 5px;
  align-items: center;

  padding: 3px 6px;
  border: 1px solid rgba(255,255,255,.08);
  background: #080808;
  text-align: center;
}

.pv-training-value strong,
.pv-training-value em {
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

/*
 * Bei einer Vorschau treffen sich alter und neuer
 * Wert symmetrisch an der mittigen Pfeilspalte.
 */
.pv-training-value.is-changed strong {
  justify-self: end;
}

.pv-training-value.is-changed em {
  justify-self: start;
}

/*
 * Ohne Änderung nimmt der aktuelle Wert die gesamte
 * Zeile ein und sitzt exakt in der Mitte.
 */
.pv-training-value:not(.is-changed) strong {
  grid-column: 1 / -1;
  justify-self: center;
}

.pv-training-value > span {
  justify-self: center;
  color: #777;
  font-size: 12px;
  line-height: 1;
}

.pv-training-value em {
  color: #50ff83;
  text-shadow: 0 0 10px rgba(80,255,131,.42);
}

.pv-training-value small {
  grid-column: 1 / -1;
  justify-self: center;

  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.pv-modal-overlay.is-training
.pv-modal-body {
  padding-top: 10px;
  padding-bottom: 10px;
}

.pv-modal-overlay.is-training
.pv-permanent-warning {
  margin-top: 6px;
  padding: 6px 9px;
  font-size: 9px;
  line-height: 1.25;
}

.pv-permanent-warning {
  margin-top: 10px;
  padding: 9px 11px;
  border-left: 3px solid #b60000;
  background: rgba(125,0,0,.12);
  color: #d9b5b5;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

/* ------------------------- PERKS ------------------------- */

.pv-perk-upgrade-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
  gap: 14px;
  align-items: start;
}

/*
 * Auf dem zweispaltigen Desktop-Layout darf nicht
 * der gesamte Modal-Body scrollen. Stattdessen
 * nimmt das rechte Detailpanel exakt die verfügbare
 * Höhe ein.
 */
@media (min-width: 821px) {
  .pv-modal-overlay.is-perks
  .pv-modal-body {
    overflow: hidden;
  }

  .pv-modal-overlay.is-perks
  .pv-perk-upgrade-layout {
    height: 100%;
    min-height: 0;
    align-items: stretch;
  }

  /*
   * Die linke Perk-Auswahl nutzt die gesamte
   * verfügbare Höhe. Nur dieser Bereich scrollt,
   * sobald mehr Cards vorhanden sind.
   */
  .pv-modal-overlay.is-perks
  .pv-perk-choice-scroll {
    height: 100%;
    min-width: 0;
    min-height: 0;
    align-self: stretch;

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;

    /*
     * Abstand zwischen Cards und Scrollleiste.
     */
    padding-right: 6px;

    scrollbar-width: thin;
    scrollbar-color:
      rgba(204,0,0,.72)
      rgba(255,255,255,.045);
  }

  .pv-modal-overlay.is-perks
  .pv-perk-choice-scroll::-webkit-scrollbar {
    width: 6px;
  }

  .pv-modal-overlay.is-perks
  .pv-perk-choice-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,.045);
  }

  .pv-modal-overlay.is-perks
  .pv-perk-choice-scroll::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(204,0,0,.72);
  }

  .pv-modal-overlay.is-perks
  .pv-perk-choice-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(224,0,0,.9);
  }

  .pv-modal-overlay.is-perks
  .pv-perk-choice-grid {
    align-content: start;
  }

  /*
   * Reihen im rechten Panel:
   * 1. Perk-Kopf
   * 2. Werte-Vorschau
   * 3. flexible Voraussetzungen
   * 4. rote Zusammenfassung
   * 5. permanenter Warnhinweis
   */
  .pv-modal-overlay.is-perks
  .pv-perk-detail {
    height: 100%;
    min-height: 0;
    grid-template-rows:
      auto
      auto
      minmax(0, 1fr)
      auto
      auto;
  }
}

.pv-perk-choice-scroll {
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.pv-perk-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
}

.pv-perk-filter-empty {
  grid-column: 1 / -1;

  display: grid;
  place-items: center;

  min-height: 94px;
  padding: 18px;

  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);

  color: #8f8982;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

.pv-perk-choice {
  position: relative;
  min-width: 0;
  min-height: 94px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  overflow: hidden;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 3px;
  background: rgba(255,255,255,.025);
  text-align: left;
}

.pv-perk-character-ribbon {
  position: absolute;
  top: 8px;
  right: -22px;
  z-index: 4;

  width: 100px;
  height: 18px;

  display: block;

  transform: rotate(45deg);
  transform-origin: center;

  border-top:
    1px solid rgba(255,224,141,.95);
  border-bottom:
    1px solid rgba(95,61,0,.95);

  background:
    linear-gradient(
      180deg,
      rgba(255,214,92,.28) 0%,
      rgba(255,214,92,.16) 42%,
      rgba(86,62,12,.98) 100%
    );

  color: #fff5cb;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;

  text-shadow:
    0 1px 0 #352100,
    0 0 5px rgba(255,224,141,.32);

  box-shadow:
    inset 0 0 0 1px rgba(232,188,55,.92),
    0 2px 7px rgba(0,0,0,.48);

  pointer-events: none;
  user-select: none;
}

.pv-perk-character-ribbon > span {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  /*
   * Verschiebt den Text entlang des bereits
   * um 45 Grad gedrehten Banners exakt in die
   * Mitte des innerhalb der Card sichtbaren Bereichs.
   */
  transform: translateX(9px);

  white-space: nowrap;
}

.pv-perk-choice:hover,
.pv-perk-choice:focus {
  border-color: rgba(204,0,0,.65);
  background: rgba(204,0,0,.12);
}

.pv-perk-choice.is-selected {
  border-color: #e00000;
  background:
    linear-gradient(
      180deg,
      rgba(204,0,0,.2),
      rgba(90,0,0,.11)
    );
  box-shadow:
    inset 0 0 0 1px rgba(255,0,0,.12),
    0 0 16px rgba(204,0,0,.13);
}

.pv-perk-choice.is-owned {
  border-color: rgba(83,245,134,.28);
}

.pv-perk-choice.is-maxed {
  border-color: rgba(228,178,71,.45);
}

/* Auflevelbar, aber noch nicht ausgewählt: dezent grün */
.pv-perk-choice.is-ready:not(.is-selected) {
  border-color: rgba(83,245,134,.38);
  background:
    linear-gradient(
      180deg,
      rgba(47,126,70,.12),
      rgba(0,58,20,.06)
    );
}

/* Auflevelbar und mit Maus/Keyboard markiert:
   stärker als Grundzustand, schwächer als final ausgewählt */
.pv-perk-choice.is-ready:not(.is-selected):hover,
.pv-perk-choice.is-ready:not(.is-selected):focus-visible {
  outline: none;
  border-color: rgba(83,245,134,.72);
  background:
    linear-gradient(
      180deg,
      rgba(47,126,70,.20),
      rgba(0,58,20,.10)
    );
  box-shadow:
    inset 0 0 0 1px rgba(83,245,134,.10),
    0 0 12px rgba(83,245,134,.10);
}

/* Auflevelbar und ausgewählt: deutlich grün */
.pv-perk-choice.is-ready.is-selected {
  border-color: #53f586;
  background:
    linear-gradient(
      180deg,
      rgba(47,126,70,.28),
      rgba(0,58,20,.16)
    );
  box-shadow:
    inset 0 0 0 1px rgba(83,245,134,.18),
    0 0 16px rgba(83,245,134,.16);
}

/* Gesperrt und nicht ausgewählt: abgeschwächt rot */
.pv-perk-choice.is-locked:not(.is-selected) {
  opacity: .72;
  border-color: rgba(224,0,0,.38);
}

/* Nur das Bild entsättigen, nicht die rote Statusschrift */
.pv-perk-choice.is-locked:not(.is-selected)
.pv-perk-choice-icon img {
  filter: grayscale(.55);
}

/* Gesperrt und ausgewählt: klar rot */
.pv-perk-choice.is-locked.is-selected {
  border-color: #e00000;
  background:
    linear-gradient(
      180deg,
      rgba(204,0,0,.2),
      rgba(90,0,0,.11)
    );
  box-shadow:
    inset 0 0 0 1px rgba(255,0,0,.12),
    0 0 16px rgba(204,0,0,.13);
}

.pv-perk-choice-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background: #050505;
}

.pv-perk-choice-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pv-perk-choice-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.pv-perk-choice-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.pv-perk-choice-status {
  position: absolute;
  right: 7px;
  bottom: 5px;
  color: #777;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .07em;
}

.pv-perk-choice.is-selected
.pv-perk-choice-status {
  color: #ff9a9a;
}

.pv-perk-choice.is-owned
.pv-perk-choice-status {
  color: #6fe693;
}

/* BEREIT: unselektiert bereits sichtbar grün */
.pv-perk-choice.is-ready:not(.is-selected)
.pv-perk-choice-status {
  color: #6fe693;
}

/* BEREIT: selektiert kräftig grün */
.pv-perk-choice.is-ready.is-selected
.pv-perk-choice-status {
  color: #50ff83;
  text-shadow: 0 0 8px rgba(80,255,131,.35);
}

/* GESPERRT: immer rot, auch wenn bereits ein Rang vorhanden ist */
.pv-perk-choice.is-locked
.pv-perk-choice-status {
  color: #ff7777;
  text-shadow: 0 0 7px rgba(255,80,80,.24);
}

.pv-perk-detail {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.28);
}

.pv-perk-detail.can-upgrade {
  border-color: rgba(83,245,134,.36);
}

.pv-perk-detail > header {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.pv-perk-detail-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background: #050505;
}

.pv-perk-detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
 * Gemeinsames Charaktertheme für:
 *
 * - aktive Perk-Icons im Werte-Tab
 * - Perk-Icons in der Auswahl
 * - großes Perk-Icon im Detailpanel
 *
 * Ausschließlich der Iconrahmen und dessen
 * Hintergrund werden eingefärbt.
 */
.pv-themed-perk-icon {
  --perk-theme-accent: #8493a3;
  --perk-theme-border:
    rgba(132,147,163,.72);
  --perk-theme-surface-top: #29343e;
  --perk-theme-surface-bottom: #0a0e12;
  --perk-theme-glow:
    rgba(132,147,163,.22);

  position: relative;
  isolation: isolate;

  border-color:
    var(--perk-theme-border);

  /*
   * Mehrere Ebenen erzeugen Tiefe:
   *
   * 1. Lichtreflex
   * 2. technische Diagonallinien
   * 3. eigentlicher Charakterverlauf
   */
  background:
    radial-gradient(
      circle at 24% 18%,
      var(--perk-theme-glow) 0%,
      transparent 44%
    ),
    linear-gradient(
      145deg,
      rgba(255,255,255,.09) 0%,
      transparent 34%
    ),
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,.038) 0,
      rgba(255,255,255,.038) 1px,
      transparent 1px,
      transparent 8px
    ),
    linear-gradient(
      160deg,
      var(--perk-theme-surface-top),
      var(--perk-theme-surface-bottom)
    );

  box-shadow:
    inset 0 0 0 1px
      rgba(255,255,255,.035),
    inset 0 -16px 22px
      rgba(0,0,0,.28),
    0 0 9px
      var(--perk-theme-glow);
}

/*
 * Technische schräge Flächen im Hintergrund.
 */
.pv-themed-perk-icon::before {
  content: "";

  position: absolute;
  inset: -24%;
  z-index: 0;

  background:
    linear-gradient(
      118deg,
      transparent 0%,
      transparent 28%,
      rgba(255,255,255,.075) 29%,
      rgba(255,255,255,.075) 31%,
      transparent 32%,
      transparent 57%,
      rgba(0,0,0,.24) 58%,
      rgba(0,0,0,.24) 76%,
      transparent 77%
    );

  transform:
    rotate(-8deg)
    scale(1.16);

  opacity: .78;
  pointer-events: none;
}

/*
 * Dezente Vignette wie bei einem
 * vorbereiteten Photoshop-Iconbackground.
 */
.pv-themed-perk-icon::after {
  content: "";

  position: absolute;
  inset: 0;
  z-index: 1;

  background:
    radial-gradient(
      circle at center,
      transparent 42%,
      rgba(0,0,0,.38) 100%
    ),
    linear-gradient(
      180deg,
      rgba(255,255,255,.045),
      transparent 34%,
      rgba(0,0,0,.12)
    );

  pointer-events: none;
}

/*
 * Transparentes Perk-Icon liegt über allen
 * Hintergrundeffekten.
 */
.pv-themed-perk-icon > img,
.pv-themed-perk-icon > i,
.pv-themed-perk-icon >
span:not(.pv-active-perk-rank) {
  position: relative;
  z-index: 2;
}

.pv-themed-perk-icon > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/*
 * Die Rangbeschriftung aktiver Perks muss
 * noch vor dem transparenten Icon liegen.
 */
.pv-themed-perk-icon
.pv-active-perk-rank {
  z-index: 3;
}

.pv-perk-detail h3 {
  margin-top: 3px;
  margin-bottom: 5px;
  font-size: 15px;
}

.pv-perk-result-preview {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: #080808;
}

.pv-perk-result-preview > div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pv-perk-result-preview strong,
.pv-perk-result-preview em {
  color: #fff;
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
}

.pv-perk-result-preview > div > span {
  color: #999;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.pv-perk-result-preview em {
  color: #50ff83;
  text-shadow: 0 0 12px rgba(80,255,131,.42);
}

.pv-perk-requirements {
  min-height: 0;
  overflow: hidden;
}

.pv-perk-requirements-scroll {
  height: 100%;
  min-height: 0;

  display: grid;
  align-content: start;
  gap: 7px;

  overflow-x: hidden;
  overflow-y: auto;

  padding-right: 0;

  scrollbar-width: thin;
  scrollbar-color:
    rgba(204,0,0,.72)
    rgba(255,255,255,.045);
}

.pv-perk-requirements-scroll::-webkit-scrollbar {
  width: 6px;
}

.pv-perk-requirements-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,.045);
}

.pv-perk-requirements-scroll::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(204,0,0,.72);
}

.pv-perk-requirements-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(224,0,0,.9);
}

.pv-perk-requirements ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pv-perk-requirements li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.02);
  font-size: 10px;
}

.pv-perk-requirements li > span {
  color: #b9b3ab;
  font-weight: 800;
}

.pv-perk-requirements li > strong {
  color: #fff;
}

.pv-perk-requirements li > em {
  min-width: 85px;
  color: #777;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.pv-perk-requirements li.is-met {
  border-color: rgba(83,245,134,.2);
}

.pv-perk-requirements li.is-met > em {
  color: #63dc89;
}

.pv-perk-requirements li.is-missing {
  border-color: rgba(255,80,80,.24);
}

.pv-perk-requirements li.is-missing > em {
  color: #ff8484;
}

.pv-perk-lock-summary {
  padding: 9px 10px;
  border: 1px solid rgba(255,80,80,.26);
  background: rgba(115,0,0,.13);
  color: #ff9a9a;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.pv-perk-lock-summary.is-ready {
  border-color: rgba(83,245,134,.28);
  background: rgba(0,105,37,.13);
  color: #72e997;
}

@media (max-width: 820px) {
  .pv-weapon-grid,
  .pv-skill-grid,
  .pv-active-perk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pv-training-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .pv-perk-upgrade-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .pv-level-overview,
  .pv-attribute-grid,
  .pv-weapon-grid,
  .pv-skill-grid,
  .pv-active-perk-grid,
  .pv-perk-choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pv-section-heading,
  .pv-level-progress-copy,
  .pv-modal-header-main,
  .pv-values-expanded-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .pv-values-expanded-meta
  .pv-column-legend {
    text-align: left;
  }

  .pv-section-actions {
    justify-content: space-between;
  }

  .pv-modal-overlay {
    padding: 10px;
  }

  .pv-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .pv-modal-meta {
    width: 100%;
  }

  .pv-modal-meta > span {
    flex: 1;
  }

  .pv-modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pv-modal-footer button {
    min-width: 0;
  }
}

/*
 * Interaktiver Statistik-Friedhof
 * --------------------------------
 * Die komplette Friedhofsszene wird von
 * StatisticsCemeteryController.js in ein gemeinsames
 * Canvas gerendert. Die alte Gegnerkarten-CSS bleibt
 * als ungefährlicher Fallback im Stylesheet erhalten.
 */
.statistics-cemetery-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;

  border: 1px solid rgba(213,139,58,.28);
  border-radius: 2px;

  background:
    radial-gradient(
      circle at 50% 52%,
      rgba(204,0,0,.055),
      transparent 62%
    ),
    #050505;

  box-shadow:
    inset 0 0 28px rgba(0,0,0,.72),
    0 8px 24px rgba(0,0,0,.28);

  transition:
    border-color .14s ease,
    box-shadow .14s ease;
}

.statistics-cemetery-stage:hover {
  border-color: rgba(213,139,58,.46);
}

.statistics-cemetery-canvas {
  width: 100%;
  height: auto;
  display: block;

  background: #050505;
  image-rendering: pixelated;
  image-rendering: crisp-edges;

  outline: none;
  touch-action: manipulation;
}

.statistics-cemetery-canvas:focus-visible {
  outline: 1px solid rgba(213,139,58,.86);
  outline-offset: -2px;
}

.statistics-cemetery-legend {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;

  /*
   * Etwas breiter, damit Namen nicht gequetscht wirken.
   */
  width: min(225px, 42%);
  max-height: calc(100% - 20px);
  overflow: hidden;

  display: grid;
  gap: 7px;

  padding: 10px 11px 11px;

  border: 1px solid rgba(213,139,58,.42);
  border-radius: 2px;

  background:
    linear-gradient(
      180deg,
      rgba(8,8,8,.94),
      rgba(5,5,5,.86)
    );

  box-shadow:
    0 6px 18px rgba(0,0,0,.58),
    inset 0 0 16px rgba(0,0,0,.32);

  pointer-events: none;
}

.statistics-cemetery-legend[hidden] {
  display: none;
}

.statistics-cemetery-legend-title {
  padding-bottom: 5px;

  border-bottom:
    1px solid rgba(213,139,58,.22);

  color: #e1ae68;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;

  text-shadow:
    0 1px 0 #000,
    0 0 6px rgba(213,139,58,.18);
}

.statistics-cemetery-legend-list {
  display: grid;
  gap: 3px;
}

.statistics-cemetery-legend-item {
  min-width: 0;

  display: grid;
  grid-template-columns:
    minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;

  min-height: 14px;
  padding-bottom: 3px;

  border-bottom:
    1px solid rgba(255,255,255,.065);
}

.statistics-cemetery-legend-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.statistics-cemetery-legend-item span {
  min-width: 0;
  overflow: hidden;

  color: #c6bfb7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .025em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;

  text-shadow:
    0 1px 1px rgba(0,0,0,.9);
}

.statistics-cemetery-legend-item strong {
  color: #e11c25;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: right;

  text-shadow:
    0 1px 0 #000,
    0 0 7px rgba(204,0,0,.34);
}

.statistics-cemetery-legend-item.is-sek span {
  color: #eee6dd;
}

.statistics-cemetery-tooltip {
  position: absolute;
  z-index: 4;

  min-width: 112px;
  max-width: 190px;

  display: grid;
  gap: 2px;

  padding: 6px 9px 7px;

  border: 1px solid rgba(204,0,0,.72);
  border-radius: 2px;

  background:
    linear-gradient(
      180deg,
      rgba(22,8,8,.96),
      rgba(7,7,7,.96)
    );

  box-shadow:
    0 6px 18px rgba(0,0,0,.72),
    0 0 12px rgba(204,0,0,.18);

  color: #fff;
  text-align: center;
  pointer-events: none;

  transform:
    translate(-50%, calc(-100% - 10px));
}

.statistics-cemetery-tooltip[hidden] {
  display: none;
}

.statistics-cemetery-tooltip strong {
  overflow: hidden;

  color: #f1ece5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .035em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.statistics-cemetery-tooltip span {
  color: #cf171f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 1px 0 #000,
    0 0 7px rgba(204,0,0,.38);
}

.statistics-cemetery-status {
  position: absolute;
  inset: 0;
  z-index: 3;

  display: grid;
  place-items: center;

  padding: 22px;

  background:
    rgba(4,4,4,.78);

  color: #aaa39a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

.statistics-cemetery-status[hidden] {
  display: none;
}

.statistics-cemetery-status.error {
  color: #e05b60;
}

.statistics-cemetery-hint {
  margin-top: -1px;
  padding: 6px 9px 5px;

  border: 1px solid rgba(255,255,255,.065);
  border-top: 0;

  background:
    linear-gradient(
      90deg,
      rgba(204,0,0,.055),
      rgba(255,255,255,.012)
    );

  color: #77716a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1.35;
  text-align: center;
}

.statistics-cemetery-archive {
  display: grid;
  gap: 5px;

  padding: 8px;

  border: 1px solid rgba(255,255,255,.075);
  background: rgba(255,255,255,.016);
}

.statistics-cemetery-archive[hidden] {
  display: none;
}

.statistics-cemetery-archive-title {
  color: #8a837b;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.statistics-cemetery-archive-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.statistics-cemetery-archive-item {
  min-width: 0;

  display: grid;
  gap: 2px;

  padding: 6px 7px;

  border: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.24);
}

.statistics-cemetery-archive-item span {
  overflow: hidden;

  color: #8c857e;
  font-size: 7px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.statistics-cemetery-archive-item strong {
  color: #b80f18;
  font-size: 10px;
  font-weight: 900;
}

.statistics-cemetery-stage.statistics-cemetery-hit {
  animation:
    statistics-cemetery-hit-flash
    .18s ease-out;
}

@keyframes statistics-cemetery-hit-flash {
  0% {
    border-color: rgba(213,139,58,.28);
    box-shadow:
      inset 0 0 28px rgba(0,0,0,.72),
      0 8px 24px rgba(0,0,0,.28);
  }

  30% {
    border-color: rgba(204,0,0,.96);
    box-shadow:
      inset 0 0 24px rgba(204,0,0,.28),
      0 0 15px rgba(204,0,0,.24);
  }

  100% {
    border-color: rgba(213,139,58,.28);
    box-shadow:
      inset 0 0 28px rgba(0,0,0,.72),
      0 8px 24px rgba(0,0,0,.28);
  }
}

@media (max-width: 760px) {
  .statistics-cemetery-archive-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .statistics-cemetery-legend {
    top: 6px;
    left: 6px;
    width: min(170px, 42%);
    max-height: calc(100% - 12px);
    padding: 6px 7px 7px;
  }

  .statistics-cemetery-legend-item span {
    font-size: 6.5px;
  }

  .statistics-cemetery-tooltip {
    min-width: 96px;
    max-width: 150px;
    padding: 5px 7px 6px;
  }
}
