/* ============================================================
   SLProject X — страница загрузок (buba.levvs.monster)
   Стиль 1:1 с лаунчером. Зона отчуждения.
   ============================================================ */

/* ============ FONTS (bundled, offline, SIL OFL — free for commercial use) ====
   Pixelify Sans = пиксельный «майнкрафт»-дисплейный шрифт (заголовки/бренд/кнопки)
   Inter        = чистый «айфонный» гротеск для текста                          */
@font-face {
  font-family: "Pixelify Sans";
  src: url("assets/fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/JetBrainsMono.ttf") format("truetype");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

/* ============ TOKENS (идентичны лаунчеру) ============ */
:root {
  --bg:        #0d0a0b;
  --bg-side:   #110c0d;
  --panel:     #15100f;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.05);

  --text:        #cfcccd;
  --text-bright: #f2f0f1;
  --muted:       #7d7779;

  --accent:       #c1121f;
  --accent-hover: #e0202e;
  --ok:           #4caf50;

  --mono: "JetBrains Mono", "Consolas", monospace;
  --ui:   "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "Pixelify Sans", "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0; }
html { height: 100%; }
body {
  min-height: 100%;
  font-family: var(--ui);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* фон: скриншот сервера под тёмным градиентом — как в лаунчере */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(13, 10, 11, 0.74), rgba(13, 10, 11, 0.88)),
    url("assets/bg.jpg") center / cover no-repeat fixed;
}

/* тонкая красная кромка сверху — акцент Зоны */
body::after {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 22%, var(--accent) 78%, transparent);
  z-index: 60; opacity: .85;
}

/* ============ LAYOUT ============ */
.page {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 20px 40px;
  gap: 22px;
}

/* ============ BRAND ============ */
.brand { text-align: center; }
.logo-tile {
  width: 92px; height: 92px; margin: 0 auto 16px;
  background: #0c0809;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.logo-tile img { width: 60px; height: 60px; }
.brand-title {
  font-family: var(--display);
  font-size: 30px; font-weight: 700; letter-spacing: 1px;
  color: var(--text-bright); line-height: 1;
}
.brand-title .x { color: var(--accent); }
.brand-sub {
  font-family: var(--display);
  font-size: 11px; letter-spacing: 4px; color: var(--muted);
  margin-top: 8px; text-transform: uppercase;
}

/* ============ HERO HEADLINE ============ */
.hero-headline {
  font-family: var(--display);
  font-size: 14px; font-weight: 600; letter-spacing: 2px;
  color: var(--text); text-transform: uppercase; text-align: center;
  display: flex; align-items: center; gap: 14px;
}
.hero-headline::before,
.hero-headline::after {
  content: ""; width: 30px; height: 1px; background: var(--accent); opacity: .7;
}

/* ============ DOWNLOAD CARD ============ */
.card {
  width: 100%; max-width: 480px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 26px 26px 24px;
}
.card-label {
  font-size: 10px; letter-spacing: 2px; color: var(--muted);
  text-transform: uppercase; margin-bottom: 14px;
}

/* большая кнопка загрузки — как .play-btn лаунчера */
.dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; cursor: pointer;
  font-family: var(--display);
  background: var(--accent); color: #fff; border: none;
  font-weight: 700; font-size: 15px; letter-spacing: 0.5px;
  padding: 18px 20px; text-transform: uppercase; text-decoration: none;
  white-space: nowrap;
  transition: .12s;
}
.dl-btn:hover { background: var(--accent-hover); }
.dl-btn:active { transform: translateY(1px); }
.dl-btn svg { width: 22px; height: 22px; flex: none; }

/* мета: версия / размер / ОС */
.meta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 20px; border: 1px solid var(--line-2);
}
.meta-cell { padding: 12px 10px; text-align: center; }
.meta-cell + .meta-cell { border-left: 1px solid var(--line-2); }
.meta-k { font-size: 9px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.meta-v { font-family: var(--mono); font-size: 13px; color: var(--text-bright); margin-top: 5px; }

/* дата публикации — тонкая строка под мета-сеткой */
.meta-date {
  margin-top: 12px; text-align: center;
  font-size: 10px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase;
}
.meta-date span { font-family: var(--mono); color: var(--text); letter-spacing: .5px; }

/* ============ STEPS ============ */
.steps {
  width: 100%; max-width: 480px;
  background: rgba(21, 16, 15, 0.72);
  border: 1px solid var(--line);
  padding: 20px 22px;
}
.steps-title {
  font-family: var(--display);
  font-size: 12px; letter-spacing: 2px; color: var(--muted);
  text-transform: uppercase; margin-bottom: 14px;
}
.steps ol { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li {
  counter-increment: s; position: relative; padding-left: 34px;
  font-size: 13.5px; line-height: 1.5; color: var(--text);
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent-hover); font-family: var(--mono);
  font-size: 12px; font-weight: 700;
}
.steps b { color: var(--text-bright); font-weight: 700; }

/* примечание про SmartScreen — стиль .fm-hint лаунчера */
.hint {
  width: 100%; max-width: 480px;
  padding: 11px 13px;
  background: rgba(193, 18, 31, .10);
  border-left: 2px solid var(--accent);
  color: var(--text); font-size: 12px; line-height: 1.55;
}

/* ============ FOOTER ============ */
.footer {
  width: 100%; max-width: 480px; margin-top: 6px;
  border-top: 1px solid var(--line-2); padding-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
}
.footer .server { display: flex; align-items: center; }
.footer .server code {
  font-family: var(--mono); font-size: 12.5px; color: var(--text-bright);
  letter-spacing: .3px; user-select: all;
}
.footer .credits { text-align: right; }
.foot-creator { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--text-bright); }
.foot-sponsor { font-family: var(--ui); font-size: 11px; letter-spacing: .3px; color: var(--muted); margin-top: 3px; }
.foot-version { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--muted); margin-top: 3px; }

/* ============ NEWS PAGE (главная) ============ */
.news-page-wrap { justify-content: flex-start; }

/* ссылка «назад к новостям» на странице загрузок */
.back-link {
  align-self: flex-start;
  font-family: var(--display);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: .12s;
}
.back-link:hover { color: var(--text-bright); }

.news-feed {
  width: 100%; max-width: 640px;
  display: flex; flex-direction: column; gap: 16px;
}

.news-card {
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.news-body { padding: 16px 18px; }
.news-date {
  font-family: var(--mono); font-size: 11px; letter-spacing: .5px;
  color: var(--muted); margin-bottom: 8px;
}
.news-text {
  font-size: 14px; line-height: 1.6; color: var(--text);
  white-space: normal; word-wrap: break-word; overflow-wrap: anywhere;
}
.news-text a { color: var(--accent-hover); text-decoration: none; }
.news-text a:hover { text-decoration: underline; }
/* инлайн кастом-эмодзи канала (анимированный webp) */
.news-text .ce {
  width: 1.25em; height: 1.25em; vertical-align: -0.28em;
  display: inline-block; margin: 0 1px; object-fit: contain;
}
.news-link {
  display: inline-block; margin-top: 12px;
  font-family: var(--display); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent-hover); text-decoration: none;
  border: 1px solid var(--accent); padding: 7px 12px; transition: .12s;
}
.news-link:hover { background: var(--accent); color: #fff; }

/* сетка фото 1..4 */
.news-media { display: grid; gap: 2px; background: #0c0809; }
.news-media.n1 { grid-template-columns: 1fr; }
.news-media.n2 { grid-template-columns: 1fr 1fr; }
.news-media.n3 { grid-template-columns: 1fr 1fr; }
.news-media.n3 .news-shot:first-child { grid-column: 1 / -1; }
.news-media.n4 { grid-template-columns: 1fr 1fr; }
.news-shot {
  position: relative; cursor: pointer; border: none; padding: 0;
  background: #0c0809; overflow: hidden; aspect-ratio: 16 / 10;
}
.news-media.n1 .news-shot { aspect-ratio: 16 / 9; }
.news-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: .2s; }
/* одиночное фото — целиком, без обрезки (баннеры канала часто широкие) */
.news-media.n1 .news-shot img { object-fit: contain; background: #0a0708; }
.news-shot:hover img { transform: scale(1.03); opacity: .92; }
.news-shot[data-more]::after {
  content: attr(data-more);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(12, 8, 9, .68); color: #fff;
  font-family: var(--display); font-size: 24px; font-weight: 700;
}

.news-empty {
  width: 100%; max-width: 640px; text-align: center;
  padding: 30px 16px; color: var(--muted); font-size: 13px;
  background: rgba(21, 16, 15, .6); border: 1px solid var(--line-2);
}
.news-err { color: var(--accent-hover); }

/* кнопка «Скачать лаунчер» на странице новостей */
.news-dl-btn { width: 100%; max-width: 640px; margin-top: 4px; }

.foot-tg {
  display: inline-block; margin-top: 3px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .5px;
  color: var(--muted); text-decoration: none;
}
.foot-tg:hover { color: var(--accent-hover); }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 4, 5, .92); padding: 40px;
}
.lightbox.hidden { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border: 1px solid var(--line); }
.lb-close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: none; color: #fff; cursor: pointer;
  font-size: 26px; line-height: 1; opacity: .8;
}
.lb-close:hover { opacity: 1; }
.hidden { display: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 520px) {
  .page { padding: 40px 14px 30px; gap: 18px; }
  .brand-title { font-size: 27px; letter-spacing: 2px; }
  .brand-sub { letter-spacing: 6px; }
  .card, .steps { padding: 20px 18px; }
  .dl-btn { font-size: 16px; padding: 16px 18px; }
  .hero-headline { font-size: 13px; letter-spacing: 3px; }
  .hero-headline::before, .hero-headline::after { margin: 0 8px; }
  .footer { justify-content: center; text-align: center; }
  .footer .credits { text-align: center; }
  .news-body { padding: 14px 15px; }
  .lightbox { padding: 16px; }
}
