
* { box-sizing: border-box; }
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0; background: #1a1a1a; color: #e4e4e4; }
header { padding: 10px 14px; background: #222; border-bottom: 1px solid #333; position: sticky; top: 0; z-index: 10; }
header h1 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.controls input, .controls select { background: #111; color: #e4e4e4; border: 1px solid #333; padding: 5px 8px; border-radius: 4px; font-size: 13px; }
.controls input { width: 260px; }
#count { margin-left: auto; color: #888; }
main { display: flex; align-items: flex-start; }
#grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; padding: 10px; min-width: 0; }
#detail { width: 400px; flex-shrink: 0; background: #222; border-left: 1px solid #333; padding: 14px; font-size: 13px; overflow-y: auto; position: sticky; top: 120px; max-height: calc(100vh - 130px); }
.tierbar { display: flex; gap: 6px; padding: 8px 14px; background: #1e1e1e; border-bottom: 1px solid #333; position: sticky; top: 94px; z-index: 9; flex-wrap: wrap; }
.tier { background: #333; color: #bbb; border: 1px solid transparent; padding: 4px 10px; border-radius: 14px; font-size: 12px; cursor: pointer; }
.tier:hover { background: #444; }
.tier.active { background: #6a5a1a; color: #ffd66b; border-color: #a8860b; }
.tier.t-COMMON.active { background: #3a3a3a; color: #ddd; border-color: #888; }
.tier.t-RARE.active { background: #1a3a6a; color: #9bc8ff; border-color: #4aa7ff; }
.tier.t-HEROIC.active { background: #5a4a0f; color: #ffd84a; border-color: #d1a526; }
.tier.t-MYTHIC.active { background: #4a1a6a; color: #d9a6ff; border-color: #d24cff; }
.tier.t-CAULDRON.active { background: #2a5a1a; color: #b8ffa0; border-color: #8bff6a; }
.tier.t-ITEMSET.active { background: #6a3a1a; color: #ffccaa; border-color: #ff9966; }
.card { background: #222; border: 1px solid #333; border-radius: 6px; padding: 8px; cursor: pointer; transition: background 0.1s; }
.card:hover { background: #2a2a2a; border-color: #555; }
.card.active { border-color: #a0820b; background: #2b2411; }
.card img { width: 100%; height: 96px; object-fit: contain; image-rendering: pixelated; background: #111; border-radius: 4px; }
.card .name { font-size: 13px; margin-top: 4px; font-weight: 500; }
.card .sub { font-size: 11px; color: #888; }
.rarity-COMMON { color: #bbb; }
.rarity-RARE { color: #4aa7ff; }
.rarity-HEROIC { color: #d1a526; }
.rarity-MYTHIC { color: #d24cff; }
.rarity-CAULDRON { color: #8bff6a; }
.rarity-BOON { color: #ffb4b4; }
.rarity-ITEMSET { color: #ff9966; }
.rarity-STARTER, .rarity-DIAMOND { color: #9bf6ff; }
.rarity-GOLDEN { color: #ffd84a; }
.rarity-CRONE { color: #a0c; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.stats div { background: #111; padding: 6px; border-radius: 4px; text-align: center; }
.stats .label { font-size: 10px; color: #888; text-transform: uppercase; }
.stats .val { font-size: 16px; font-weight: 600; }
.mods { margin: 8px 0; background: #111; padding: 8px; border-radius: 4px; }
.mods .label { font-size: 11px; color: #888; margin-bottom: 4px; }
.mods .row { display: flex; justify-content: space-between; font-family: "Consolas", monospace; font-size: 12px; padding: 2px 0; }
.tags { margin: 6px 0; }
.tag { display: inline-block; background: #333; padding: 2px 7px; border-radius: 3px; font-size: 11px; margin: 2px; color: #bbb; }
.mode { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 700; margin-right: 4px; letter-spacing: 0.5px; }
.mode.sp { background: #2a4a6a; color: #9bc8ff; }
.mode.mp { background: #5a4a1a; color: #ffd66b; }
.bdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; border: 1px solid #0006; }
.bdot-RED    { background: #e84444; }
.bdot-BLUE   { background: #5880cc; }
.bdot-YELLOW { background: #ffd569; }
.override { background: #1a2a1a; border: 1px solid #3a5a3a; border-radius: 4px; padding: 8px; margin: 6px 0; font-size: 12px; color: #b8e0b8; }
.override .lbl { color: #6fa86f; font-size: 10px; text-transform: uppercase; margin-bottom: 3px; }
.modrow { display: grid; grid-template-columns: 44px 42px 1fr; gap: 6px; align-items: center; padding: 4px 0; font-size: 12px; }
.modname { color: #888; font-family: monospace; }
.modval { color: #ffd66b; font-weight: 700; font-family: monospace; text-align: right; }
.modmean { color: #ddd; }
.muted { color: #666; font-style: italic; }
.snippet { color: #ccc; font-family: monospace; font-size: 11px; }
.trigbadge { display: inline-block; background: #2a4a7a; color: #9bf0ff; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; margin-right: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.share-btn { background: #333; color: #ccc; border: 1px solid #555; padding: 3px 8px; border-radius: 3px; font-size: 11px; cursor: pointer; margin-left: 6px; }
.share-btn:hover { background: #555; color: #fff; }
.recipe { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #1a1a1a; border: 1px solid #444; border-radius: 4px; padding: 2px 6px 2px 2px; text-decoration: none; color: #ddd; font-size: 11px; cursor: pointer; max-width: 160px; }
.chip:hover { background: #2a2a2a; border-color: #888; }
.chip img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; background: #0a0a0a; border-radius: 3px; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.missing { border-style: dashed; color: #888; }
.plus { color: #666; font-weight: bold; padding: 0 3px; }
.detail-header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.detail-header img { width: 72px; height: 72px; object-fit: contain; image-rendering: pixelated; background: #111; border-radius: 4px; }
.detail-sprites { display: flex; gap: 6px; margin-top: 6px; }
.detail-sprites img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; background: #111; border-radius: 3px; }
.desc { line-height: 1.5; color: #ddd; background: #111; padding: 10px; border-radius: 4px; margin: 8px 0; }
.desc-ru { color: #b9d7ff; font-style: italic; margin-top: 6px; }
.class-name { font-family: monospace; font-size: 11px; color: #666; }
h2 { margin: 0 0 6px; font-size: 18px; }
h3 { margin: 10px 0 4px; font-size: 13px; color: #888; text-transform: uppercase; }
small { color: #888; }

.disclaimer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.disclaimer-modal {
  width: min(520px, 100%);
  background: #202020;
  border: 1px solid #3b3b3b;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  padding: 20px;
}

.disclaimer-modal h2 {
  margin-bottom: 10px;
}

.disclaimer-modal p {
  margin: 0 0 12px;
  line-height: 1.5;
  color: #d6d6d6;
}

.disclaimer-link {
  display: inline-block;
  color: #8cc6ff;
  margin-bottom: 16px;
  word-break: break-word;
}

.disclaimer-actions {
  display: flex;
  justify-content: flex-end;
}

.disclaimer-btn {
  background: #6a5a1a;
  color: #ffd66b;
  border: 1px solid #a8860b;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
}

.disclaimer-btn:hover {
  background: #7b681d;
}
