/* Generated for cheat-mod.com — colors injected per site. No JS. */

/* Self-hosted Inter (woff2), subset latin + cyrillic. font-display: swap for speed. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary: #e11d48;
  --accent: #22c55e;
  --bg: #ffffff;
  --text: #101418;
  --muted: #6b7280;
  --surface: #ffffff;
  --border: #e6e8ec;
  --radius: 12px;
}
/* Dark palette: follows the system unless the user forced a theme via the
   header toggle (data-theme on <html>). Forced "dark" wins regardless of system. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #e11d48;
    --accent: #22c55e;
    --bg: #0f1117;
    --text: #e6e8ed;
    --muted: #9aa3b2;
    --surface: #181b23;
    --border: #2a2f3a;
  }
}
:root[data-theme="dark"] {
  --primary: #e11d48;
  --accent: #22c55e;
  --bg: #0f1117;
  --text: #e6e8ed;
  --muted: #9aa3b2;
  --surface: #181b23;
  --border: #2a2f3a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
a { color: var(--primary); }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; color: var(--text); }
.site-header nav { display: inline-flex; align-items: center; }
.site-header nav a { margin-left: 1rem; text-decoration: none; color: var(--muted); }
.theme-toggle { margin-left: 1rem; background: none; border: 0; padding: 0; cursor: pointer; font-size: 1.15rem; line-height: 1; color: var(--text); }

.hero { padding: 2rem 0 1rem; }
.hero h1 { margin: 0 0 .5rem; font-size: 1.8rem; }
.lead { font-size: 1.1rem; color: var(--muted); }

h1, h2 { line-height: 1.25; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: .65rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
}
.btn--big { padding: 1rem 1.5rem; font-size: 1.05rem; display: block; text-align: center; margin: .6rem 0; }
.btn--mod { background: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.game-card {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1rem; text-align: center; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text);
}
.game-card img { border-radius: 16px; flex: 0 0 auto; }
.game-card__title {
  font-weight: 600; font-size: .92rem; line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
  /* reserve 2 lines so icons/titles stay aligned regardless of title length */
  min-height: calc(2 * 1.25em);
}

/* Catalog: one row per game */
.catalog {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.25rem 0 2rem;
}
/* Fixed column widths so every catalog table aligns identically regardless of
   its own content. Column order: icon, Название, Жанр, Разработчик, Пакет,
   Опубликовано, Обновлено. Название (col 2) absorbs the remaining width. */
.catalog th:nth-child(3),
.catalog td:nth-child(3) { width: 12%; }
.catalog th:nth-child(4),
.catalog td:nth-child(4) { width: 15%; }
.catalog th:nth-child(5),
.catalog td:nth-child(5) { width: 16%; }
.catalog th, .catalog td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
  vertical-align: middle;
}
.catalog tbody tr:last-child td { border-bottom: 0; }
.catalog thead th {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.catalog tbody tr { transition: background .12s; }
.catalog tbody tr:hover { background: var(--bg); }
.catalog__icon { width: 80px; min-width: 80px; }
.catalog__icon img { display: block; margin: 0 auto; width: 48px; height: 48px; max-width: none; border-radius: 12px; }
.catalog__title h3 { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; display: inline; }
.catalog__title a { font-weight: 600; color: var(--text); text-decoration: none; }
.catalog__title a:hover { color: var(--primary); }
.catalog td[data-label="Жанр"],
.catalog td[data-label="Разработчик"] { color: var(--muted); }
.catalog__date { width: 8rem; color: var(--muted); }
.catalog td.catalog__date { white-space: nowrap; }
.catalog__pkg {
  display: inline-block;
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-size: .82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .08rem .4rem;
}

/* 404 */
.notfound { text-align: center; padding: 3rem 1rem 4rem; max-width: 540px; margin: 0 auto; }
.notfound h1 { margin: 0 0 .6rem; font-size: 1.6rem; }
.notfound__text { margin: 0 0 1.5rem; }
.notfound__btn { display: inline-block; }

.load-more__wrap { text-align: center; margin: 0 0 2rem; }
.load-more { cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.load-more[hidden] { display: none; }

/* Narrow screens: collapse each row into a compact card — no horizontal scroll */
@media (max-width: 820px) {
  .catalog, .catalog tbody, .catalog tr, .catalog td { display: block; }
  .catalog {
    border: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    margin: 1rem 0 1.5rem;
  }
  .catalog thead { display: none; }
  .catalog tr {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: .8rem;
    padding: .85rem 1rem;
    margin-bottom: .75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .catalog td { border: 0; padding: 0; font-size: .9rem; }
  /* Drop the desktop fixed-column widths — cards span the full card width. */
  .catalog td:nth-child(3),
  .catalog td:nth-child(4),
  .catalog td:nth-child(5),
  .catalog td.catalog__date { width: auto; }
  .catalog__icon { grid-column: 1; width: auto; }
  .catalog__icon img { width: 52px; height: 52px; }
  .catalog__title { grid-column: 2; font-size: 1.02rem; }
  .catalog td[data-label]:not(.catalog__icon) {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .3rem 0;
    border-top: 1px solid var(--border);
  }
  .catalog td[data-label="Жанр"] { margin-top: .55rem; }
  .catalog td[data-label]:not(.catalog__icon)::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 500;
    flex: none;
  }
  .catalog__pkg { max-width: 60vw; }
}

.game__head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon info" "cta info";
  gap: .75rem 1.2rem;
  align-items: start;
  margin: 1rem 0 1.5rem;
}
.game__icon { grid-area: icon; border-radius: 20px; }
.game__info { grid-area: info; }
.game__cta { grid-area: cta; justify-self: start; text-align: center; }
.game__info h1 { margin: 0 0 .35rem; }
.game section { margin: 1.5rem 0; }
.game__meta { color: var(--muted); font-size: .9rem; margin: 0; }
.game__meta span + span::before { content: " · "; }

/* CSS-only scroll-snap screenshot slider (no JS) */
.slider {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .5rem;
}
.slider::-webkit-scrollbar { height: 6px; }
.slider::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.slider__item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  height: 360px;
  width: auto;
  border-radius: 12px;
}

.mod-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; }
.mod-info h2 { margin-top: 0; }
.mod-info__list { margin: .5rem 0 0; padding-left: 1.2rem; }
.mod-info__list li { margin: .25rem 0; }
.mod-info__list li:last-child { margin-bottom: 0; }

.download-block { margin: 2rem 0; scroll-margin-top: 1rem; }
.download-block .btn { margin: .5rem 0; }
.related { margin-top: 2.5rem; }
/* Other games — single row with horizontal scroll */
.related .grid {
  display: flex;
  grid-template-columns: none;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .5rem;
}
.related .grid::-webkit-scrollbar { height: 6px; }
.related .grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.related .game-card { flex: 0 0 auto; width: 150px; scroll-snap-align: start; }

.download__head { display: flex; gap: 1.2rem; align-items: flex-start; margin: 1rem 0 1.5rem; }

/* Game spec table on the .apk download page (system card style) */
.spec {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}
.spec th, .spec td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--border); font-size: .95rem; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th { color: var(--muted); font-weight: 600; width: 40%; white-space: nowrap; }
.spec td { color: var(--text); word-break: break-word; }

.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 1.5rem 0; color: var(--muted); }

@media (max-width: 520px) {
  .hero h1 { font-size: 1.5rem; }
  .game__head { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .game__icon { order: 1; }
  .game__info { order: 2; }
  .game__cta { order: 3; }
  .slider__item { height: 70vh; max-height: 460px; scroll-snap-align: start; }
}