/* vibegames — «патч-панель». Одна намеренная тема: тёмный сланец,
   сигнальный янтарь, бирюзовая лампа эфира. Все цвета заданы явно,
   страница не заимствует фон у хоста. */

:root {
  --ink:        #0f1216;  /* сланец с синим уклоном, не чёрный */
  --panel:      #171b21;
  --panel-hi:   #1d222a;
  --rule:       #232932;
  --rule-soft:  #1b2029;
  --text:       #e8e9ec;
  --muted:      #9aa1ac;
  --faint:      #6b7381;
  --signal:     #ffa31a;  /* акцент: янтарь приборной лампы */
  --signal-dim: #a86a10;
  --live:       #3fc1c9;  /* статус «в эфире» — не акцент */
  --off:        #3a424e;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.wrap {
  width: min(1140px, 100% - 48px);
  margin-inline: auto;
}

/* метки приборного вида */
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ── шапка ──────────────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 62px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  min-width: 0;
}

.logo-mark {
  width: 28px;
  height: 28px;
  flex: none;
  display: block;
}

.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-mark rect { fill: var(--signal); }
.logo-mark path { fill: var(--ink); }

/* Точка-отсечка: живой сигнал рядом со знаком. Дышит еле заметно и только
   когда человек не просил убрать движение. */
.logo-mark .blip {
  fill: var(--ink);
  opacity: 0.4;
  animation: blip 3.2s ease-in-out infinite;
}

@keyframes blip {
  0%, 100% { opacity: 0.18; }
  50%      { opacity: 0.75; }
}

.logo-word {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.022em;
  line-height: 1;
  white-space: nowrap;
}

.logo-word i {
  font-style: normal;
  font-weight: 500;
  font-variation-settings: "wdth" 104;
  color: var(--muted);
}

.logo-word b {
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  color: var(--text);
}

.logo-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
  padding-left: 12px;
  border-left: 1px solid var(--rule);
  white-space: nowrap;
}

.logo:hover .logo-word b { color: var(--signal); }

.nav { display: flex; gap: 22px; }

.nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.nav a:hover { color: var(--text); border-bottom-color: var(--signal); }

/* ── лампа состояния ────────────────────────────────────────── */

.lamp {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--off);
  flex: none;
  display: inline-block;
}

.lamp.on {
  background: var(--live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 18%, transparent);
}

.lamp.warn {
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 18%, transparent);
}

/* ── кнопки ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--rule);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}

.btn:hover { border-color: var(--signal); color: var(--signal); }

.btn-signal {
  background: var(--signal);
  border-color: var(--signal);
  color: #17120a;
  font-weight: 500;
}

.btn-signal:hover { background: #ffb347; border-color: #ffb347; color: #17120a; }

/* ── список ─────────────────────────────────────────────────── */

/* ── плитки игр ─────────────────────────────────────────────── */

.section { padding: 54px 0; scroll-margin-top: 74px; }

.section.top { padding-top: 30px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 105;
  font-size: 24px;
  letter-spacing: -0.015em;
  margin: 0;
}

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }

.search { position: relative; flex: 1 1 240px; max-width: 320px; }

.search input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
}

.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--signal); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  padding: 7px 11px;
  border: 1px solid var(--rule);
  background: transparent;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.chip:hover { color: var(--text); border-color: var(--faint); }

.chip[aria-pressed="true"] {
  border-color: var(--signal);
  color: var(--signal);
  background: color-mix(in srgb, var(--signal) 10%, transparent);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 14px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--rule);
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease);
}

.tile:hover { border-color: var(--signal); transform: translateY(-2px); }
.tile:focus-within { border-color: var(--signal); }

.tile-link { position: absolute; inset: 0; z-index: 2; }

.tile-art {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(110% 110% at 50% 0%, color-mix(in srgb, var(--tile-accent, var(--signal)) 30%, transparent) 0%, transparent 68%),
    var(--ink);
  border-bottom: 1px solid var(--rule);
}

.tile-art img.shot { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-art img.icon { width: 46%; height: auto; image-rendering: auto; }

.tile-art .initials {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  font-size: 44px;
  letter-spacing: -0.04em;
  color: color-mix(in srgb, var(--tile-accent, var(--signal)) 78%, #fff);
}

/* лампа состояния поверх обложки */
.tile-state {
  position: absolute;
  top: 9px;
  left: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.tile-body {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.tile h3 {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 104;
  font-size: 16.5px;
  letter-spacing: -0.012em;
  margin: 0;
}

.tile-tagline {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.tile-plat { display: flex; gap: 5px; align-items: center; }

.plat {
  border: 1px solid var(--rule);
  padding: 2px 6px;
  color: var(--muted);
}

.plat.web { border-color: color-mix(in srgb, var(--live) 45%, transparent); color: var(--live); }

.empty {
  grid-column: 1 / -1;
  padding: 54px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.empty code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--signal);
  background: color-mix(in srgb, var(--signal) 10%, transparent);
  padding: 1px 5px;
}

/* ── страница игры ──────────────────────────────────────────── */

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 22px;
}

.crumb:hover { color: var(--signal); }

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.game-art {
  position: relative;
  border: 1px solid var(--rule);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(110% 110% at 50% 0%, color-mix(in srgb, var(--tile-accent, var(--signal)) 28%, transparent) 0%, transparent 68%),
    var(--panel);
}

.game-art img.shot { width: 100%; height: 100%; object-fit: cover; }
.game-art img.icon { width: 40%; }

.game-art .initials {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  font-size: 84px;
  color: color-mix(in srgb, var(--tile-accent, var(--signal)) 78%, #fff);
}

.game-title {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 106;
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 10px 0 0;
  text-wrap: balance;
}

.game-tagline { margin: 14px 0 0; color: var(--muted); font-size: 16px; max-width: 54ch; }

.game-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }

.actions { display: flex; flex-direction: column; gap: 9px; margin-top: 26px; }

.action-big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  background: var(--signal);
  border: 1px solid var(--signal);
  color: #17120a;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.15s var(--ease);
}

.action-big:hover { background: #ffb347; }

.dl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--rule);
  background: var(--panel);
  transition: border-color 0.15s var(--ease);
}

.dl:hover { border-color: var(--signal); }

.dl-label { font-size: 14.5px; }
.dl-note { margin: 4px 0 0; font-size: 12.5px; color: var(--faint); max-width: 44ch; }
.dl-size { font-family: var(--mono); font-size: 11.5px; color: var(--faint); white-space: nowrap; }

.spec { margin-top: 30px; border-top: 1px solid var(--rule); }

.spec div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.spec dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); }
.spec dd { margin: 0; font-size: 14px; text-align: right; }
.spec dd.mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.install-hint {
  margin-top: 16px;
  padding: 13px 16px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--live);
  background: var(--panel);
  font-size: 13.5px;
  color: var(--muted);
}

/* ── авторы ─────────────────────────────────────────────────── */

.makers { display: flex; flex-wrap: wrap; gap: 8px; }

.maker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  border: 1px solid var(--rule);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.15s var(--ease);
}

.maker:hover, .maker[aria-pressed="true"] { border-color: var(--signal); }
.maker-name { font-size: 14px; }
.maker-count { font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* ── форма заявки ───────────────────────────────────────────── */

.form-card {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--signal);
  background: var(--panel);
  padding: 30px 32px 28px;
}

.form-card h2 {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 104;
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 0 0 9px;
}

.form-card > p { margin: 0 0 22px; color: var(--muted); max-width: 62ch; }

#submitForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#submitForm label { display: flex; flex-direction: column; gap: 7px; }
#submitForm label.wide { grid-column: 1 / -1; }
#submitForm .label b { color: var(--signal); font-weight: 400; }

#submitForm input,
#submitForm textarea {
  border: 1px solid var(--rule);
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 14.5px;
  padding: 11px 13px;
  width: 100%;
  resize: vertical;
}

#submitForm input::placeholder,
#submitForm textarea::placeholder { color: var(--faint); }

#submitForm input:focus,
#submitForm textarea:focus { outline: none; border-color: var(--signal); }

#submitForm input[aria-invalid="true"] { border-color: #ff6b5e; }

/* ловушка для ботов: человеку не видна и не доступна с клавиатуры */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.form-foot .action-big { margin: 0; }
.form-foot .action-big[disabled] { opacity: 0.6; cursor: default; }

.form-msg { margin: 0; font-size: 14px; }
.form-msg.ok { color: var(--live); }
.form-msg.err { color: #ff8a7e; }

.form-note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
  font-size: 13.5px;
  color: var(--faint);
  max-width: 62ch;
}

/* ── подвал и врезка ────────────────────────────────────────── */

.note {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--signal);
  background: var(--panel);
  padding: 26px 28px;
}

.note h2 {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 104;
  font-size: 21px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.note p { margin: 0 0 16px; color: var(--muted); max-width: 66ch; }
.note p:last-child { margin-bottom: 0; }

.note code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--signal);
}

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 24px 0 40px;
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ── страница запуска ───────────────────────────────────────── */

body.player { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }

.player-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  height: 54px;
  flex: none;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}

.player-title {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 104;
  font-size: 16px;
}

.player-sub { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.player-bar .spacer { margin-left: auto; }

.stage { flex: 1; min-height: 0; position: relative; background: #07090b; }
.stage iframe { width: 100%; height: 100%; border: 0; display: block; }

.stage-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

@media (max-width: 860px) {
  .game-hero { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .section.top { padding-top: 20px; }
  .nav { display: none; }
  .logo-tag { display: none; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .form-card { padding: 22px 18px; }
  #submitForm { grid-template-columns: 1fr; }
  .tile-tagline { -webkit-line-clamp: 3; }
  .player-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
