:root {
  --bg: #0e0f12;
  --panel: #17191e;
  --panel-2: #1f2229;
  --line: #2a2e37;
  --text: #eceef2;
  --muted: #9097a4;
  --accent: #f28c28;
  --accent-ink: #1a1006;
  --ok: #3ecf7a;
  --err: #ff6b5e;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

.top { position: sticky; top: 0; z-index: 5; background: rgba(14,15,18,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.logo { font-weight: 800; letter-spacing: .08em; color: var(--text); text-decoration: none; }
.games { display: flex; gap: 6px; overflow-x: auto; }
.games button, .cats button {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.games button[aria-pressed="true"], .cats button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

.hero { padding: 28px 0 8px; }
.hero h1 { margin: 0 0 6px; font-size: clamp(26px, 5vw, 38px); }
.hero p { margin: 0; color: var(--muted); max-width: 640px; }
.server { margin-top: 14px; display: inline-flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font-size: 14px; flex-wrap: wrap; }
.server code { font-size: 15px; color: var(--text); }
.server button { border: 0; background: var(--panel-2); color: var(--text); border-radius: 8px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: 13px; }

.cats { display: flex; gap: 6px; overflow-x: auto; padding: 16px 0 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding-bottom: 40px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; cursor: pointer; text-align: left; color: inherit; font: inherit; padding: 0;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .pic { aspect-ratio: 16/9; background: #0a0b0d center/contain no-repeat; }
.card .pic.none { display: grid; place-items: center; font-size: 42px; background: var(--panel-2); }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { margin: 0; font-size: 16px; }
.card p { margin: 0; font-size: 13px; color: var(--muted); }
.card .price { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--accent); }

.foot { border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--muted); font-size: 14px; }
.foot p { margin: 4px 0; }

.modal { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.sheet img { width: 100%; border-radius: 10px; background: #0a0b0d; display: block; }
.sheet img[src=""] { display: none; }
.sheet h2 { margin: 12px 0 4px; font-size: 20px; }
.sheet > p { margin: 0 0 12px; font-size: 14px; }
.x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; z-index: 1; }
.tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 14px; }
.tariffs button { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 10px; padding: 10px; cursor: pointer; font: inherit; }
.tariffs button b { display: block; font-size: 17px; }
.tariffs button span { font-size: 13px; color: var(--muted); }
.tariffs button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 14px; }
.field input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.field small { font-size: 12px; }
.field code, .muted code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; color: var(--text); }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-bottom: 12px; }
.agree input { margin-top: 4px; }
.err { color: var(--err); font-size: 14px; margin: 0 0 10px; }
.buy { width: 100%; border: 0; border-radius: 12px; padding: 14px; font: inherit; font-weight: 700; font-size: 17px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.buy:disabled { opacity: .5; cursor: default; }

/* страница «спасибо» и оферта */
.page { max-width: 720px; padding-top: 32px; padding-bottom: 48px; }
.status { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.status h1 { margin: 0 0 8px; font-size: 24px; }
.status.ok h1 { color: var(--ok); }
.status.bad h1 { color: var(--err); }
.doc h1 { font-size: 26px; }
.doc h2 { font-size: 18px; margin-top: 28px; }
.doc p, .doc li { color: #d3d7de; }
.todo { background: #3a2410; border: 1px dashed var(--accent); padding: 10px 12px; border-radius: 8px; }
