/* STD SHOP — фирстиль SURVIVE TO DIE: чёрный + золотой металлик, без лайма. */
:root {
  --ink: #0a0a0a;
  --coal: #1a1612;
  --panel: #111214;
  --field: #1c1f22;
  --line: rgba(255, 219, 128, .22);
  --gold-hi: #f5df8a;
  --gold: #d8b85e;
  --gold-ui: #fad16b;
  --gold-dim: #c7a965;
  --gold-shadow: #b58739;
  --gold-deep: #8c601a;
  --text: #edebe3;
  --muted: #8c8f91;
  --bad: #d9544a;
  --ok: #fad16b;
  --r-win: 18px;
  --r-panel: 14px;
  --r-row: 9px;
  --r-chip: 7px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink) radial-gradient(1200px 520px at 50% -160px, #2a2114 0%, #15110c 45%, var(--ink) 75%) no-repeat;
  color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--gold-ui); text-decoration: none; }
a:hover { color: var(--gold-hi); }
h1, h2, h3, .caps {
  font-family: Arial, "Arial Black", Helvetica, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 .6em;
}
h1 { font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.gold-text {
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold-shadow) 80%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }
.bad { color: var(--bad); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* шапка */
.top {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, rgba(10, 10, 10, .97), rgba(10, 10, 10, .9));
  backdrop-filter: blur(6px);
}
.top::after {
  content: ""; display: block; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-hi) 50%, var(--gold) 70%, transparent);
  opacity: .8;
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 46px; height: 46px; }
.brand b { font: 700 20px/1 Arial, sans-serif; letter-spacing: .08em; }
.brand small { display: block; font: 600 10px/1.2 Arial, sans-serif; letter-spacing: .22em; color: var(--gold-dim); margin-top: 3px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a, .nav button.link {
  font: 700 13px/1 Arial, sans-serif; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text); padding: 10px 12px; border-radius: var(--r-row); background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav button.link:hover { background: rgba(255, 217, 115, .1); color: var(--gold-hi); }
.nav a.on { color: var(--gold-ui); }
.chip-bal {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px;
  background: var(--field); border: 1px solid var(--line); border-radius: 999px; color: var(--text);
}
.chip-bal img { width: 26px; height: 26px; border-radius: 50%; }
.chip-bal b { color: var(--gold-ui); }

/* панели с угловыми засечками (деталь знака STD) */
.panel {
  position: relative;
  background: linear-gradient(180deg, #16171a 0%, var(--panel) 40%, #0c0d0e 100%);
  border-radius: var(--r-panel);
  padding: 20px;
  box-shadow: 0 0 0 1px rgba(255, 219, 128, .07) inset, 0 12px 40px rgba(0, 0, 0, .45);
}
.ticks {
  --t: rgba(250, 209, 107, .85);
  background-image:
    linear-gradient(var(--t), var(--t)), linear-gradient(var(--t), var(--t)),
    linear-gradient(var(--t), var(--t)), linear-gradient(var(--t), var(--t)),
    linear-gradient(var(--t), var(--t)), linear-gradient(var(--t), var(--t)),
    linear-gradient(var(--t), var(--t)), linear-gradient(var(--t), var(--t)),
    linear-gradient(180deg, #16171a 0%, var(--panel) 40%, #0c0d0e 100%);
  background-repeat: no-repeat;
  background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px, 16px 2px, 2px 16px, 16px 2px, 2px 16px, 100% 100%;
  background-position:
    12px 12px, 12px 12px, right 12px top 12px, right 12px top 12px,
    12px bottom 12px, 12px bottom 12px, right 12px bottom 12px, right 12px bottom 12px, 0 0;
}
.glow-head { position: relative; }
.glow-head::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: -20px; height: 60px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(128, 92, 20, .35), transparent);
}
.fade-line { height: 1px; border: 0; margin: 16px 0; background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent); }

main { padding: 26px 0 60px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hero p { margin: 0; color: var(--muted); }

/* табы категорий */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: thin; }
.tabs a {
  flex: none; padding: 9px 14px; border-radius: var(--r-row); background: var(--field);
  font: 700 12px/1 Arial, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  border: 1px solid transparent;
}
.tabs a:hover { color: var(--text); background: #23272b; }
.tabs a.on { color: var(--gold-ui); background: #2a2214; border-color: rgba(250, 209, 107, .45); }

/* карточки товаров */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; border-radius: var(--r-panel); overflow: hidden; color: var(--text);
  background: linear-gradient(180deg, #17181b, #0e0f10);
  box-shadow: 0 0 0 1px rgba(255, 219, 128, .07) inset;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); color: var(--text); box-shadow: 0 0 0 1px rgba(250, 209, 107, .5) inset, 0 10px 30px rgba(0, 0, 0, .5); }
.card .img {
  aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 10px; overflow: hidden;
  background: radial-gradient(closest-side, #2a2418 0%, #121212 70%, #0d0d0d 100%);
}
.card .img img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .name { font-weight: 600; line-height: 1.3; }
.card .foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.price { color: var(--gold); font: 700 18px/1 Arial, sans-serif; }
.tag { font-size: 12px; color: var(--gold-dim); }

/* кнопки и поля */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: var(--r-row); border: 0; cursor: pointer;
  font: 700 13px/1 Arial, sans-serif; text-transform: uppercase; letter-spacing: .07em;
  color: #1a1408;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 50%, var(--gold-shadow) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 18px rgba(181, 135, 57, .25);
}
.btn:hover { filter: brightness(1.08); color: #1a1408; }
.btn:active { filter: brightness(.92); transform: translateY(1px); }
.btn.ghost { color: var(--gold-ui); background: var(--field); box-shadow: 0 0 0 1px rgba(250, 209, 107, .35) inset; }
.btn.ghost:hover { background: #2a2214; color: var(--gold-hi); }
.btn.danger { color: var(--bad); background: var(--field); box-shadow: 0 0 0 1px rgba(217, 84, 74, .5) inset; }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 11px; }
.btn[disabled] { opacity: .4; cursor: default; }
.btn.steam { background: linear-gradient(180deg, #26292d, #17191c); color: var(--text); box-shadow: 0 0 0 1px rgba(250, 209, 107, .45) inset; }
.btn.steam:hover { color: var(--gold-hi); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r-row);
  background: var(--field); color: var(--text); border: 1px solid #2a2e33; font: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(250, 209, 107, .7); box-shadow: 0 0 0 3px rgba(250, 209, 107, .12); }
input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--gold); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.row > .btn, .row > .fit { flex: 0 0 auto; }
.stack > * + * { margin-top: 12px; }
form.inline { display: inline; }

/* товар */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; }
.product .shot { display: grid; place-items: center; min-height: 320px; background: radial-gradient(closest-side, #2b2418, #0f0f0f 75%); border-radius: var(--r-panel); padding: 20px; }
.product .shot img { max-width: 100%; max-height: 440px; object-fit: contain; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .6)); }
.variants { display: flex; flex-wrap: wrap; gap: 8px; }
.variants a { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: var(--r-row); background: var(--field); color: var(--text); border: 1px solid transparent; font-size: 13px; }
.variants a img { width: 38px; height: 38px; object-fit: contain; }
.variants a.on { border-color: rgba(250, 209, 107, .6); color: var(--gold-ui); background: #2a2214; }
.total { font-size: 20px; }
.total b { color: var(--gold); font-family: Arial, sans-serif; }

/* профиль */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.balance { font: 700 34px/1 Arial, sans-serif; }
.list { display: flex; flex-direction: column; gap: 6px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-row); background: var(--field); }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 12px; color: var(--muted); }
.st { font: 700 11px/1 Arial, sans-serif; text-transform: uppercase; letter-spacing: .06em; padding: 5px 8px; border-radius: var(--r-chip); background: #2a2214; color: var(--gold-ui); white-space: nowrap; }
.st.delivered, .st.paid { background: #1f2124; color: var(--gold-dim); }
.st.refunded, .st.canceled, .st.failed { background: #2a1715; color: var(--bad); }
.st.claiming, .st.pending { background: #1f2124; color: var(--text); }
.plus { color: var(--gold-ui); }
.minus { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }
.key { display: inline-block; min-width: 26px; padding: 2px 7px; border-radius: 6px; text-align: center; background: #2a2214; color: var(--gold-ui); font: 700 13px/1.4 Arial, sans-serif; box-shadow: 0 0 0 1px rgba(250, 209, 107, .45) inset; }

/* сообщения */
.flash { padding: 12px 14px; border-radius: var(--r-row); margin-bottom: 14px; background: #2a2214; color: var(--gold-hi); box-shadow: 0 0 0 1px rgba(250, 209, 107, .4) inset; }
.flash.err { background: #2a1715; color: #f0b3ad; box-shadow: 0 0 0 1px rgba(217, 84, 74, .5) inset; }

/* таблицы (админка) */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 700 11px/1.2 Arial, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-dim); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid #1d1f22; vertical-align: middle; }
tr:hover td { background: rgba(255, 217, 115, .04); }
td.num { text-align: right; white-space: nowrap; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { padding: 14px; border-radius: var(--r-row); background: var(--field); }
.stat b { display: block; font: 700 22px/1.2 Arial, sans-serif; color: var(--gold-ui); }
.stat span { font-size: 12px; color: var(--muted); }

footer { padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
footer .fade-line { margin-bottom: 18px; }

@media (max-width: 860px) {
  .product, .cols { grid-template-columns: 1fr; }
  .product .shot { min-height: 220px; }
}
@media (max-width: 600px) {
  .top .wrap { height: 58px; gap: 8px; }
  .brand img { width: 38px; height: 38px; }
  .brand small { display: none; }
  .brand b { font-size: 16px; }
  .nav a, .nav button.link { padding: 8px; font-size: 12px; }
  .nav .hide-sm { display: none; }
  .chip-bal { padding: 4px 8px 4px 4px; font-size: 13px; }
  .chip-bal img { width: 22px; height: 22px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .body { padding: 10px; }
  .card .name { font-size: 14px; }
  .price { font-size: 16px; }
  .panel { padding: 16px; }
  h1 { font-size: 21px; }
  .balance { font-size: 28px; }
}
