/* «Битва лудоманов» — чёрный с золотом, в стиле ТВ-шоу */
:root {
  --bg: #060608;
  --panel: rgba(18, 16, 13, .92);
  --panel2: #1a1712;
  --line: rgba(201, 164, 76, .22);
  --line-strong: rgba(201, 164, 76, .55);
  --text: #efe6d2;
  --muted: #8f856f;
  --gold: #d8b25c;
  --gold-hi: #f6dc94;
  --gold-lo: #9c7428;
  --gold-grad: linear-gradient(180deg, #f6dc94 0%, #d8b25c 45%, #9c7428 100%);
  --light: #5fbf8f;
  --rat: #d4213d;
  --rat-deep: #5a0a16;
  --blue: var(--gold);
  --radius: 4px;
  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Manrope", system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(216, 178, 92, .13), transparent 55%),
    radial-gradient(ellipse at 50% 120%, rgba(90, 10, 22, .35), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--sans);
  min-height: 100vh;
}
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: .02em; margin: 0 0 12px; line-height: 1.15; }
h1 { font-size: 30px; }
h2 { font-size: 21px; color: var(--gold-hi); }
h3 { margin: 0 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .22em; color: var(--gold); }
a { color: var(--gold); }
.wrap { max-width: 960px; margin: 0 auto; padding: 18px 16px 40px; }

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(246, 220, 148, .06);
}
/* золотые уголки */
.panel::before, .panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--gold); border-style: solid; opacity: .8;
}
.panel::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

input, select, textarea, button {
  font: inherit; color: var(--text); background: #0d0c0a;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 178, 92, .15); }
textarea { width: 100%; resize: vertical; min-height: 60px; }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--gold); }
input[type=range] { accent-color: var(--gold); padding: 0; border: 0; background: none; }
button {
  cursor: pointer; background: transparent; border-color: var(--line-strong); color: var(--gold-hi);
  font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  transition: background .15s, box-shadow .15s, transform .05s;
}
button:hover { background: rgba(216, 178, 92, .1); box-shadow: 0 0 18px rgba(216, 178, 92, .15); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .35; cursor: default; box-shadow: none; background: transparent; }
button.primary, button.gold { background: var(--gold-grad); border-color: var(--gold-lo); color: #1b1408; text-shadow: 0 1px 0 rgba(255, 255, 255, .3); }
button.primary:hover, button.gold:hover { box-shadow: 0 0 24px rgba(216, 178, 92, .45); background: var(--gold-grad); }
button.danger { background: linear-gradient(180deg, #e8384f, #a3122a); border-color: #6e0c1b; color: #fff; }
button.danger:hover { box-shadow: 0 0 24px rgba(212, 33, 61, .5); background: linear-gradient(180deg, #e8384f, #a3122a); }
button.good { background: var(--light); border-color: var(--light); color: #04210f; }
button.chosen { background: rgba(216, 178, 92, .18); border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 22px rgba(216, 178, 92, .3); color: #fff; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 2px; font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--gold-hi);
}
.badge.rat { background: var(--rat); color: #fff; border-color: var(--rat); }
.badge.light { background: rgba(95, 191, 143, .15); color: var(--light); border-color: var(--light); }
.badge.out { color: var(--muted); border-color: #3a352b; text-decoration: line-through; }
.badge.shield { background: var(--gold-grad); color: #1b1408; border-color: var(--gold-lo); }

.tabs { display: flex; gap: 0; margin-bottom: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.tabs button { flex: 1; border: 0; border-radius: 0; border-right: 1px solid var(--line); padding: 12px 6px; }
.tabs button:last-child { border-right: 0; }
.tabs button.on { background: var(--gold-grad); color: #1b1408; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99; max-width: 90vw;
  background: #0d0c0a; border: 1px solid var(--gold); color: var(--gold-hi); padding: 12px 20px; border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .7);
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

/* фирменная шапка */
.brand { text-align: center; margin: 34px 0 6px; }
.brand .eyebrow { font-size: 11px; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); }
.brand .title {
  font-family: var(--serif); font-weight: 900; font-size: 40px; line-height: 1.05; letter-spacing: .04em; text-transform: uppercase;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 12px rgba(216, 178, 92, .25));
}
.brand .rule { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--gold); margin-top: 8px; }
.brand .rule::before, .brand .rule::after { content: ""; height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold)); }
.brand .rule::after { transform: scaleX(-1); }
.money { font-family: var(--serif); font-weight: 900; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* редкости скинов */
.r-common { --rc: #b0c3d9; }
.r-uncommon { --rc: #5e98d9; }
.r-rare { --rc: #4b69ff; }
.r-mythical { --rc: #8847ff; }
.r-legendary { --rc: #d32ce6; }
.r-ancient { --rc: #eb4b4b; }
.r-contraband { --rc: #e4ae39; }
.item {
  background: linear-gradient(180deg, #16140f, #0d0c0a); border: 1px solid var(--line); border-radius: var(--radius);
  border-bottom: 3px solid var(--rc, #888); padding: 8px; box-shadow: inset 0 -20px 30px -20px var(--rc, transparent);
}
.item .nm { font-size: 13px; font-weight: 600; }
.item .skin { display: block; width: 100%; height: 70px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.item .pr { color: var(--gold-hi); font-weight: 800; }

@media (max-width: 600px) {
  .wrap { padding: 12px 12px 30px; }
  .panel { padding: 14px; }
  .brand .title { font-size: 32px; }
}
