:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #151b24;
  --panel2: #1b2330;
  --line: rgba(255,255,255,.09);
  --text: #e6edf3;
  --dim: #96a3b2;
  --gold: #ffcd78;
  --green: #78dc8c;
  --red: #e06a5a;
  --top-bg: rgba(13,17,23,.92);
  --hero-top: #16202c;
  --button-bg: #223047;
  --button-hover: #2c3d59;
  --button-text: #e6edf3;
  --primary-bg: #ffcd78;
  --primary-hover: #ffd98f;
  --primary-text: #1a1408;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel2: #edf2f7;
  --line: rgba(24,35,48,.15);
  --text: #18212d;
  --dim: #5c6877;
  --gold: #a95b00;
  --green: #167a32;
  --red: #b83b31;
  --top-bg: rgba(255,255,255,.92);
  --hero-top: #e5edf6;
  --button-bg: #245d9b;
  --button-hover: #1c4b80;
  --button-text: #ffffff;
  --primary-bg: #d97706;
  --primary-hover: #b85f00;
  --primary-text: #ffffff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* --- шапка с меню --- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--top-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 22px; height: 58px; }
.brand { font-weight: 600; font-size: 17px; color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.top nav a { color: var(--dim); text-decoration: none; font-size: 15px; }
.top nav a:hover, .top nav a.here { color: var(--gold); }
.theme-toggle {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  padding: 0; color: var(--text); background: var(--panel2);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: background .15s, transform .15s;
}
.theme-toggle:hover { background: var(--panel); transform: translateY(-1px); }
.theme-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-sun { display: none; }
html[data-theme="light"] .theme-icon-sun { display: block; }
html[data-theme="light"] .theme-icon-moon { display: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* --- заглавный экран --- */
header.hero {
  display: grid;
  place-items: center;
  min-height: 540px;
  padding: 90px 0 78px;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(5,14,25,.56), rgba(5,14,25,.38) 48%, rgba(5,14,25,.56)),
    linear-gradient(180deg, rgba(6,18,31,.12), rgba(6,18,31,.56)),
    url("img/hero-city-desktop.jpg") center center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
/* УТВЕРЖДЕНО АВТОРОМ 27.09.2026: два разных баннера главной и общего острова.
   Не заменять и не сводить обратно к одному изображению без нового прямого поручения автора. */
header.hero.hero-home {
  background:
    linear-gradient(90deg, rgba(5,14,25,.48), rgba(5,14,25,.30) 48%, rgba(5,14,25,.48)),
    linear-gradient(180deg, rgba(6,18,31,.08), rgba(6,18,31,.52)),
    url("img/hero-home-desktop.jpg") center center / cover no-repeat;
}
header.hero.hero-network {
  background:
    linear-gradient(90deg, rgba(5,14,25,.46), rgba(5,14,25,.28) 48%, rgba(5,14,25,.46)),
    linear-gradient(180deg, rgba(6,18,31,.08), rgba(6,18,31,.52)),
    url("img/hero-network-desktop.jpg") center center / cover no-repeat;
}
header.hero .wrap { max-width: 1000px; }
h1 { margin: 0 0 12px; font-size: 46px; letter-spacing: -.5px; line-height: 1.15; }
header.hero h1 { color: #fff; font-size: clamp(54px, 6.5vw, 84px); text-shadow: 0 3px 24px rgba(0,0,0,.75); }
.sub { color: var(--dim); font-size: 19px; margin: 0 auto; max-width: 640px; }
header.hero .sub { max-width: 960px; color: rgba(255,255,255,.94); font-size: 22px; text-shadow: 0 2px 12px rgba(0,0,0,.85); }
.studio { color: var(--gold); font-size: 14px; margin-top: 20px; }
header.hero .studio { color: #ffd88f; font-size: 16px; font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,.9); }

section { padding: 50px 0; border-bottom: 1px solid var(--line); }
h2 { font-size: 27px; margin: 0 0 8px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.lead { color: var(--dim); margin: 0 0 24px; }
p { margin: 0 0 14px; }
.dim { color: var(--dim); }

/* --- карточки --- */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.card h3 { min-height: 1.65em; }
.card p { min-height: 6.6em; font-size: 15px; color: var(--dim); margin-bottom: 16px; }
.download-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  min-height: 91px;
}
.download-actions .btn { width: 100%; margin: 0; text-align: center; }

.btn {
  display: inline-block;
  background: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 18px;
  text-decoration: none;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--button-hover); }
.btn.main { background: var(--primary-bg); color: var(--primary-text); border-color: transparent; font-weight: 600; }
.btn.main:hover { background: var(--primary-hover); }
.meta { display: block; min-height: 3.2em; color: var(--dim); font-size: 13px; margin-top: 10px; }

/* --- снимки --- */
.shots { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.shot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.shot img { width: 100%; }
.shot span { display: block; padding: 12px 16px; font-size: 14px; color: var(--dim); }

.wide { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 24px; }

/* --- состояние сервера --- */
.status { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.up { background: var(--green); }
.dot.down { background: var(--red); }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { color: var(--dim); width: 40%; }

ul { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 7px; }

/* --- формы --- */
form { max-width: 430px; }
label { display: block; font-size: 14px; color: var(--dim); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password] {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
}
input:focus { outline: none; border-color: var(--gold); }
.note { font-size: 13px; color: var(--dim); margin-top: 8px; }
.msg { border-radius: 8px; padding: 12px 14px; margin: 16px 0; font-size: 15px; }
.msg.ok { background: rgba(120,220,140,.12); border: 1px solid rgba(120,220,140,.35); }
.msg.err { background: rgba(224,106,90,.12); border: 1px solid rgba(224,106,90,.35); }

footer { padding: 34px 0 60px; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; }

/* --- карьера и звания, отличия (15.09.2026) --- */
.ranks { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); margin: 0 0 24px; }
.rank-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.rank-card h3 { margin-bottom: 2px; }
.rank-card .who { color: var(--dim); font-size: 13px; margin: 0 0 10px; }
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { position: relative; display: flex; justify-content: space-between; gap: 12px; margin: 0;
  padding: 6px 0 6px 24px; border-bottom: 1px dashed var(--line); font-size: 15px; }
.ladder li:last-child { border-bottom: 0; }
.ladder li::before { content: ""; position: absolute; left: 3px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; border: 2px solid var(--gold); background: var(--panel2); }
.ladder li.top::before, .ladder li.open::before { background: var(--gold); }
.ladder li span { color: var(--dim); white-space: nowrap; font-size: 14px; }
.ladder li.open span { color: var(--gold); }
.rules { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 0 0 24px; }
.rule { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 15px; }
.rule b { display: block; font-size: 22px; color: var(--gold); line-height: 1.2; margin-bottom: 4px; }
.perks { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.perk { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.perk b { display: block; font-size: 18px; margin-bottom: 6px; }
.perk p { color: var(--dim); font-size: 15px; margin: 0; }
.perk .tag { display: inline-block; font-size: 12px; color: var(--gold); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 9px; margin-bottom: 8px; }

@media (max-width: 640px) {
  h1 { font-size: 34px; }
  .sub { font-size: 17px; }
  /* Шапка на телефоне с 29.09.2026 оформлена в chasti/shapka.php. */
  .download-actions { flex-direction: column; }
  .download-actions .btn { width: 100%; text-align: center; }
  .card h3, .card p { min-height: 0; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  header.hero {
    min-height: 610px;
    padding: 80px 0 64px;
    background:
      linear-gradient(180deg, rgba(5,14,25,.2), rgba(5,14,25,.52)),
      url("img/hero-city-mobile.jpg") center 54% / cover no-repeat;
  }
  header.hero.hero-home {
    background:
      linear-gradient(180deg, rgba(5,14,25,.15), rgba(5,14,25,.58)),
      url("img/hero-home-mobile.jpg") center 48% / cover no-repeat;
  }
  header.hero.hero-network {
    background:
      linear-gradient(180deg, rgba(5,14,25,.15), rgba(5,14,25,.58)),
      url("img/hero-network-mobile.jpg") center 48% / cover no-repeat;
  }
  header.hero h1 { font-size: 42px; }
  header.hero .sub { font-size: 17px; }
  header.hero .studio { font-size: 14px; }
}

/* Ролик об игре: плеер во всю ширину блока, как и картинки */
.treyler {
  width: 100%;
  max-width: 1100px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: #05070c;
  display: block;
  margin-top: 18px;
}

/* Шаги «Стать тестером» в карточке сетевой беты (17.09.2026) */
.card ol.shagi { margin: 10px 0 12px; padding-left: 22px; font-size: 15px; line-height: 1.45; }
.card ol.shagi li { margin: 4px 0; }

/* --- пошаговый вход в тест Google Play (23.10.2026): одна кнопка за раз --- */
.card ol.shagi li[data-shag] { margin: 10px 0; }
.card ol.shagi .btn { display: block; margin: 8px 0 2px; text-align: center; }
.card p.tester-uzhe { min-height: 0; font-size: 14px; margin: -6px 0 4px; }
.shagi-js li.potom { color: var(--dim); }
.shagi-js li.potom .btn, .shagi-js li.potom .podrobno,
.shagi-js li.gotovo .podrobno { display: none; }
.shagi-js li.gotovo { color: var(--dim); }
.shagi-js li.gotovo > b::after { content: " ✓"; color: var(--green); }
.shagi-js li.gotovo .btn { background: var(--button-bg); color: var(--button-text);
  border-color: var(--line); font-weight: 400; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.tester-zhdat { display: block; margin-top: 6px; font-size: 14px; color: var(--gold); }
.tester-zhdat[hidden] { display: none; }

/* --- вкладки сайта (29.09.2026): шапка страницы, разделы, кнопка «Скачать» --- */
section[id], .card[id], footer { scroll-margin-top: 72px; }
header.page-head { padding: 46px 0 30px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--hero-top), var(--bg)); }
header.page-head h1 { font-size: 42px; }
header.page-head .sub { margin: 0; max-width: 760px; }
.page-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.page-nav a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--text); text-decoration: none; font-size: 14px; }
.page-nav a:hover { border-color: var(--gold); color: var(--gold); }

section.cta { text-align: center; background: var(--panel); }
section.cta .lead { max-width: 640px; margin: 0 auto 26px; }
.btn.big { padding: 15px 56px; font-size: 20px; border-radius: 12px; }
.cta-platformy { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 15px; }

.plitki { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plitka { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: var(--panel); color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s; }
.plitka:hover { border-color: var(--gold); transform: translateY(-2px); }
.plitka img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.plitka b { display: block; padding: 14px 16px 2px; font-size: 19px; color: var(--gold); }
.plitka span { display: block; padding: 0 16px 16px; font-size: 14px; color: var(--dim); }

@media (max-width: 640px) {
  header.page-head { padding: 32px 0 24px; }
  header.page-head h1 { font-size: 32px; }
  .btn.big { display: block; padding: 14px 20px; }
  .plitki { grid-template-columns: minmax(0, 1fr); }
}
