:root {
  --bg: #0f1115;
  --panel: #171a21;
  --card: #1f2430;
  --text: #f4f6fb;
  --muted: #a9b0c3;
  --line: #2d3444;
  --accent: #ff8a00;
  --good: #2bd576;
  --danger: #ff4d4d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.updated {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.controls {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 16px;
}

#searchInput {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c0e13;
  color: var(--text);
  font-size: 16px;
  outline: none;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tab {
  flex: 1;
  border: 1px solid var(--line);
  background: #10131a;
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
}

.tab.active {
  border-color: var(--accent);
  background: rgba(255, 138, 0, 0.12);
  color: #ffd2a1;
}

h2 {
  font-size: 18px;
  margin: 18px 4px 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  overflow: hidden;
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}

.monster {
  font-size: 18px;
  font-weight: 800;
}

.badge {
  font-size: 12px;
  color: #08110b;
  background: var(--good);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
  font-weight: 800;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0;
}

.price {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 7px;
  font-size: 14px;
}

.price-row strong {
  color: #fff;
}

.note {
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
  margin-top: 10px;
}

.empty {
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line);
  padding: 18px;
  border-radius: 14px;
}

.hidden {
  display: none;
}

.footer {
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 850px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .updated {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 12px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    flex-direction: column;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .monster {
    font-size: 17px;
  }
}