@font-face {
  font-family: "PressStart2P";
  src: url("/site-static/assets/PressStart2P-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: rgba(17, 17, 18, 0.88);
  --panel-solid: #141313;
  --line: rgba(213, 151, 45, 0.58);
  --line-soft: rgba(255, 255, 255, 0.12);
  --text: #f4efe4;
  --muted: #a8a19a;
  --accent: #f0b43d;
  --accent-dark: #6d4312;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PressStart2P", system-ui, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.menu-page {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.82)),
    url("/site-static/assets/main_menu_bg.jpg") center / cover fixed;
}

.main-menu {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 16vh;
  padding: 64px 20px 28px;
}

.brand {
  text-align: center;
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  color: var(--accent);
  font-size: clamp(24px, 5vw, 48px);
  line-height: 1.35;
  text-shadow: 0 0 20px rgba(240, 180, 61, 0.65);
}

.brand p {
  margin-top: 10px;
  color: #c6c1bb;
  font-size: 10px;
}

.menu-actions {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.menu-button,
.small-button {
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 13, 14, 0.9);
  color: var(--accent);
  cursor: pointer;
  text-align: center;
  box-shadow: 0 8px 22px rgba(240, 180, 61, 0.14);
}

.menu-button {
  width: min(300px, calc(100vw - 40px));
  padding: 15px 20px;
  font-size: 13px;
}

.small-button {
  padding: 12px 14px;
  font-size: 9px;
}

.menu-button:hover,
.small-button:hover,
.back-link:hover {
  border-color: var(--accent);
  background: rgba(30, 24, 17, 0.95);
}

.text-button,
.back-link {
  border: 0;
  background: transparent;
  color: #817970;
  cursor: pointer;
  font-size: 8px;
  text-decoration: none;
}

.player-name,
.status,
#status,
.muted {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
  text-align: center;
}

.content-page {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.92)),
    url("/site-static/assets/main_menu_bg.jpg") center / cover fixed;
}

.page-top {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 80px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 8, 9, 0.72);
  backdrop-filter: blur(6px);
}

.page-top h1 {
  color: var(--accent);
  font-size: clamp(15px, 3vw, 22px);
  line-height: 1.45;
  text-align: center;
}

.content-shell {
  width: min(980px, calc(100% - 28px));
  margin: 24px auto 48px;
}

.panel,
.hero-card,
.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  padding: 18px;
}

.panel h2,
.hero-card h2 {
  color: var(--accent);
  font-size: 14px;
  line-height: 1.6;
}

.panel p {
  margin-top: 10px;
  color: var(--muted);
  font: 14px/1.6 system-ui, sans-serif;
}

.search-row {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.search-row label {
  color: var(--muted);
  font-size: 8px;
}

.search-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0e0d0d;
  color: var(--text);
  padding: 0 12px;
  font-size: 11px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.character-list {
  display: grid;
  gap: 12px;
}

.character-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(6, 6, 7, 0.78);
  padding: 14px;
  text-decoration: none;
}

.character-card strong {
  display: block;
  color: var(--text);
  font-size: 11px;
  line-height: 1.5;
}

.character-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font: 13px/1.4 system-ui, sans-serif;
}

.character-card b {
  color: var(--accent);
  font-size: 10px;
}

.character-detail {
  display: grid;
  gap: 16px;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.eyebrow {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
}

.hp-box {
  display: grid;
  min-width: 110px;
  place-items: center;
  border-left: 1px solid var(--line-soft);
  padding-left: 16px;
}

.hp-box span,
.stat span {
  color: var(--muted);
  font-size: 8px;
}

.hp-box strong,
.stat strong {
  color: var(--accent);
  font-size: 17px;
  line-height: 1.7;
}

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

.stat {
  display: grid;
  min-height: 86px;
  place-items: center;
  padding: 12px;
  text-align: center;
}

.items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.item-pill {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  padding: 10px 12px;
  font-size: 8px;
  line-height: 1.5;
}

.raw-data {
  max-height: 360px;
  overflow: auto;
  margin: 14px 0 0;
  border-radius: 8px;
  background: #070707;
  color: #d9d4ce;
  padding: 14px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100% - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.18s ease;
  font: 13px/1.5 system-ui, sans-serif;
}

#toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 680px) {
  .main-menu {
    gap: 12vh;
  }

  .page-top {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    padding: 14px;
  }

  .search-row,
  .stats-grid,
  .hero-card {
    grid-template-columns: 1fr;
  }

  .search-row {
    align-items: stretch;
  }

  .hero-card {
    display: grid;
  }

  .hp-box {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
    padding: 14px 0 0;
  }
}
