/* NonSense Repacks — OLED-моно.
   Только чёрный, белый и серые между ними. Фон не чистый #000:
   на нём граница с любым светлым элементом режет глаза. */

:root {
  --bg: #0b0b0b;
  --bg-card: #121212;
  --bg-hover: #1a1a1a;
  --line: #222;
  --line-soft: #1a1a1a;
  --fg: #f2f2f2;
  --muted: #8a8a8a;
  --dim: #5e5e5e;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Общая колонка для шапки, контента и подвала. Без неё на широком мониторе
   логотип и поиск разъезжаются по краям экрана и не совпадают с контентом. */
.inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 28px;
}

a { color: inherit; text-decoration: none; }

.muted { color: var(--muted); }

/* ---------------------------------------------------------------- шапка */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-block: 12px;
  background: rgba(11, 11, 11, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.brand b { font-weight: 600; }
.brand img { display: block; }

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

.nav a {
  padding: 7px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--fg); background: var(--bg-hover); }
.nav a.active { color: var(--bg); background: var(--fg); }

/* Ссылка наружу: та же кнопка, но со стрелкой — видно, что уводит с сайта. */
.nav a.out { display: inline-flex; align-items: center; gap: 5px; }
.nav a.out svg { width: 13px; height: 13px; opacity: .7; }
.nav a.out:hover svg { opacity: 1; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  max-width: 460px;
  margin-left: auto;
}

.search svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--dim);
  pointer-events: none;
  transition: color .15s;
}
.search:focus-within svg { color: var(--fg); }

.search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  background: #171717;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.search input:hover { border-color: #3a3a3a; }
.search input:focus { border-color: #555; background: #1c1c1c; }
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { filter: invert(.55); cursor: pointer; }

/* ---------------------------------------------------------------- каркас */

.view {
  flex: 1;
  padding-block: 36px 64px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.section-title span { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--dim); }

/* ---------------------------------------------------------------- каталог */

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

.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: #3a3a3a; transform: translateY(-2px); }

.card .cover {
  display: block;
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  background: #161616;
  filter: saturate(.25) contrast(1.05);
  transition: filter .2s;
}
.card:hover .cover { filter: saturate(1) contrast(1); }

.card .body { padding: 14px 16px 16px; }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }

.card .line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.tag {
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.tag.solid { background: var(--fg); border-color: var(--fg); color: var(--bg); }

.empty {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
}

/* ---------------------------------------------------------------- релиз */

.back {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--muted);
}
.back:hover { color: var(--fg); }

.release-head {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
}

.release-head img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.release-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

.release-head .sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

.release-head p.desc { margin: 0 0 20px; color: #cfcfcf; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-bottom: 22px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.facts div { padding: 12px 14px; background: var(--bg-card); }
.facts dt { margin: 0 0 3px; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--dim); }
.facts dd { margin: 0; font-size: 14px; }

.downloads { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--fg);
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--bg-hover); border-color: #3a3a3a; }
.btn.primary { background: var(--fg); border-color: var(--fg); color: var(--bg); font-weight: 600; }
.btn.primary:hover { background: #fff; }
.btn.off { opacity: .45; pointer-events: none; }

.block { margin-bottom: 34px; }
.block h2 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.features { margin: 0; padding: 0; list-style: none; }
.features li {
  position: relative;
  padding: 7px 0 7px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.features li:last-child { border-bottom: none; }
.features li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

/* Список файлов раздачи — как на трекере: папки раскрываются, размер справа.
   Раскрытие на <details>, без единой строчки JavaScript: без него список
   тоже работает, просто все ветки открыты. */
.block h2 .count { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--dim); }

.files, .files ul { margin: 0; padding: 0; list-style: none; }
.files ul { padding-left: 22px; border-left: 1px solid var(--line-soft); margin-left: 6px; }
.files li { font-size: 14px; }

.files .what { overflow-wrap: anywhere; }
.files .size { color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }

.files .file {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 2px;
  color: #cfcfcf;
}

.files summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 2px;
  cursor: pointer;
  list-style: none;
  border-radius: 6px;
}
.files summary::-webkit-details-marker { display: none; }
.files summary:hover { background: var(--bg-hover); }
/* У файла плюсика нет, но отступ такой же — иначе имена в одной папке
   встают лесенкой относительно вложенных папок. */
.files .what::before {
  content: "";
  display: inline-block;
  width: 14px;
}
.files summary .what::before {
  content: "+";
  color: var(--muted);
  font-weight: 600;
}
.files details[open] > summary .what::before { content: "−"; }
.files details[open] > summary { color: var(--fg); }

.reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.reqs section {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.reqs h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.reqs ul { margin: 0; padding-left: 18px; color: #cfcfcf; font-size: 14px; }
.reqs li { margin-bottom: 4px; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.shots img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  filter: saturate(.3);
  transition: filter .2s;
  cursor: zoom-in;
}
.shots img:hover { filter: saturate(1); }

/* ---------------------------------------------------------------- about */

.prose { max-width: 720px; }
.prose h1 { margin: 0 0 8px; font-size: 28px; font-weight: 600; }
.prose h2 { margin: 32px 0 10px; font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: .6px; }
.prose p { color: #cfcfcf; }
.prose ul { color: #cfcfcf; padding-left: 20px; }
.prose li { margin-bottom: 6px; }

.link {
  color: var(--fg);
  border-bottom: 1px solid #444;
  transition: border-color .15s;
}
.link:hover { border-color: var(--fg); }

/* ---------------------------------------------------------------- подвал */

.bottom {
  padding-block: 20px 26px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--dim);
}

.bottom-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* ---------------------------------------------------------------- лайтбокс */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0, 0, 0, .92);
  cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* ---------------------------------------------------------------- узкий экран */

@media (max-width: 860px) {
  .inner { padding-inline: 18px; }
  .top { padding-block: 12px; }
  .top-inner { flex-wrap: wrap; gap: 12px 18px; }
  .search { margin-left: 0; max-width: none; }
  .view { padding-block: 26px 48px; }
  .release-head { grid-template-columns: 1fr; gap: 20px; }
  .release-head h1 { font-size: 24px; }
}
