/* Общий стиль всех страниц сайта.
   Вынесен из index.html: страниц стало три, и держать пятьсот строк
   оформления в каждой значит однажды поправить цвет в одной из них. */

  :root {
    --bg: #0d0f14;
    --panel: rgba(13, 15, 20, 0.35);
    --panel-hover: rgba(20, 24, 34, 0.48);
    --text: #e7ebf2;
    --muted: #b0b7c5;
    --accent: #4f7cff;
    --accent-hover: #3f68e0;
    --border: rgba(255, 255, 255, 0.13);
    --success: #4ec98a;
    --danger: #ff6b6b;
  }

  * {
    box-sizing: border-box;
  }

  html,
  body {
    margin: 0;
    padding: 0;
  }

  html {
    background: var(--bg);
  }

  body {
    position: relative;

    background:
      linear-gradient(
        180deg,
        rgba(13, 15, 20, 0.48) 0%,
        rgba(13, 15, 20, 0.78) 100%
      ),
      url("/share/f603027b-5117-4098-9c11-4b356192572d.png")
      center center / cover fixed no-repeat;

    color: var(--text);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;

    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;

    background:
      radial-gradient(
        circle at 50% 10%,
        rgba(79, 124, 255, 0.14),
        transparent 42%
      );

    pointer-events: none;
    z-index: 0;
  }

  main {
    position: relative;
    z-index: 1;

    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    /* Верхний отступ учитывает закреплённую панель: без него заголовок
       уезжал бы под неё. */
    padding: 108px 24px 48px;
    text-align: center;
  }

  .logo {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 12px;

    animation: fadeUp 0.55s ease both;

    text-shadow: 
      -1px -1px 0 #000,  
      1px -1px 0 #000,
      -1px  1px 0 #000,  
      1px  1px 0 #000;
  }

  .tagline {
    color: var(--muted);
    font-size: 18px;
    margin: 0 auto 40px;
    max-width: 520px;

    animation: fadeUp 0.55s ease 0.08s both;

    text-shadow: 
      -1px -1px 0 #000,  
      1px -1px 0 #000,
      -1px  1px 0 #000,  
      1px  1px 0 #000;
  }

  .card {
    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 16px;

    padding: 32px 28px;
    margin: 0 auto;
    max-width: 460px;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);

    transition:
      background 0.2s ease,
      border-color 0.2s ease,
      transform 0.2s ease,
      box-shadow 0.2s ease;

    animation: fadeUp 0.55s ease both;
  }

  .card:hover {
    background: var(--panel-hover);

    border-color: rgba(255, 255, 255, 0.19);

    transform: translateY(-2px);

    box-shadow:
      0 12px 40px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .card:nth-of-type(1) {
    animation-delay: 0.16s;
  }

  .card:nth-of-type(2) {
    animation-delay: 0.25s;
  }

  .card:nth-of-type(3) {
    animation-delay: 0.34s;
  }

  .platform {
    color: var(--muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px;
  }

  /* Скрытое — скрыто, чем бы его ни объявили.

     Атрибут hidden работает через стиль браузера, и любое собственное правило
     с display его перебивает: у .download-btn стоит inline-flex, поэтому
     кнопка рисовалась даже помеченная скрытой. Это правило возвращает hidden
     обещанное поведение для всех элементов разом. */
  /* Второстепенные кнопки кабинета: тот же силуэт, что у главной, но
     сдержаннее — они не призыв к действию, а служебные действия. */
  .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #e8e8ef;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
  }

  .action-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
  }

  /* Выход — красным: действие обратимое, но заметное, и путать его с
     соседними служебными кнопками не нужно. */
  .action-btn.danger {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.35);
  }

  .action-btn.danger:hover {
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.55);
  }

  .action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
  }

  [hidden] {
    display: none !important;
  }

  .download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    background: var(--accent);
    color: #fff;

    text-decoration: none;

    font-size: 17px;
    font-weight: 600;

    padding: 14px 28px;
    border-radius: 10px;

    transition:
      background 0.15s ease,
      transform 0.15s ease,
      box-shadow 0.15s ease;
  }

  .download-btn:hover {
    background: var(--accent-hover);

    transform: translateY(-1px);

    box-shadow:
      0 6px 20px rgba(79, 124, 255, 0.25);
  }

  .download-btn:active {
    transform: translateY(0);
  }

  .tg-btn {
    background: #229ED9;
  }

  .tg-btn:hover {
    background: #1c8ec2;

    box-shadow:
      0 6px 20px rgba(34, 158, 217, 0.25);
  }

  .meta {
    color: var(--muted);
    font-size: 13px;
    margin: 18px 0 0;
  }

  .card + .card {
    margin-top: 20px;
  }

  .beta-btn {
    background: #6b46c1;
  }

  .beta-btn:hover {
    background: #5b3aa8;

    box-shadow:
      0 6px 20px rgba(107, 70, 193, 0.3);
  }

  .badge {
    display: inline-block;

    background: #6b46c1;
    color: #fff;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.06em;
    text-transform: uppercase;

    padding: 3px 8px;
    border-radius: 6px;

    margin-bottom: 10px;

    box-shadow:
      0 4px 14px rgba(107, 70, 193, 0.25);
  }

  .card h2 {
    font-size: 19px;
    margin: 0 0 4px;
  }

  .card .sub {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 20px;
  }

  .status-card {
    padding: 22px 24px;
    margin-top: 20px;

    animation-delay: 0.43s;
  }

  .status-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
  }

  .status-list {
    display: flex;
    flex-direction: column;
    gap: 9px;

    text-align: left;
  }

  .status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 13px;
  }

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

  .status-value {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--text);
    font-weight: 600;
  }

  .status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--success);

    box-shadow:
      0 0 10px rgba(78, 201, 138, 0.6);
  }

  .status-dot.offline {
    background: var(--danger);

    box-shadow:
      0 0 10px rgba(255, 107, 107, 0.6);
  }

  .status-dot.loading {
    background: #8b93a4;

    box-shadow: none;

    animation: pulse 1s infinite;
  }

  .note {
    position: relative;
    z-index: 1;

    color: var(--muted);
    font-size: 13px;

    margin: 28px auto 0;
    max-width: 460px;

    text-align: left;

    border-top: 1px solid var(--border);
    padding-top: 20px;

    animation: fadeUp 0.55s ease 0.5s both;
  }

  .note ul {
    margin: 8px 0 0;
    padding-left: 20px;
  }

  .note li {
    margin: 4px 0;
  }

  .note details {
    margin-top: 14px;
  }

  .note summary {
    cursor: pointer;

    color: var(--text);
    font-weight: 600;
    font-size: 13px;

    list-style: none;
  }

  .note summary::-webkit-details-marker {
    display: none;
  }

  .note summary::before {
    content: "▸ ";
    color: var(--accent);
  }

  .note details[open] summary::before {
    content: "▾ ";
  }

  .note ol {
    margin: 10px 0 0;
    padding-left: 20px;
  }

  .note ol li {
    margin: 6px 0;
  }

  .note .hint {
    margin: 12px 0 0;
    font-style: italic;
  }

  footer {
    position: relative;
    z-index: 1;

    color: var(--muted);
    font-size: 13px;

    text-align: center;

    padding: 24px;

    border-top: 1px solid var(--border);

    animation: fadeUp 0.55s ease 0.6s both;
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(15px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes pulse {
    0%, 100% {
      opacity: 0.4;
    }

    50% {
      opacity: 1;
    }
  }

  @media (max-width: 600px) {
    main {
      padding: 40px 16px 36px;
    }

    .logo {
      font-size: 36px;
    }

    .tagline {
      font-size: 16px;
      margin-bottom: 30px;
    }

    .card {
      padding: 26px 20px;
    }

    .download-btn {
      width: 100%;
    }
  }

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

/* --- Страницы «Что нового» и «В разработке» ------------------------------- */

/* Карточка на этих страницах шире главной: там кнопка, здесь текст, и в 460
   пикселей списки читаются плохо. */
.page {
  max-width: 720px;
  text-align: left;
}

.page h2 {
  font-size: 20px;
  margin: 0 0 6px;
}

/* Номер версии — крупно и приглушённо: он метка, а не заголовок раздела. */
.ver {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}

.entry {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 18px;
}

.entry:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* --- Свёрнутая версия в списке изменений --------------------------------- */

.page details {
  border-top: 1px solid var(--border);
}

.page details:first-of-type {
  border-top: none;
}

.page summary {
  display: flex;
  align-items: baseline;
  gap: 12px;

  padding: 14px 0;
  cursor: pointer;

  /* Свой треугольник у списка уродливый и разный в браузерах — рисуем ниже. */
  list-style: none;
  transition: color 0.15s ease;
}

.page summary::-webkit-details-marker {
  display: none;
}

/* Стрелка поворачивается при раскрытии: без неё непонятно, что строка вообще
   нажимается. */
.page summary::before {
  content: "";
  flex: none;

  width: 7px;
  height: 7px;

  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);

  transition: transform 0.15s ease, border-color 0.15s ease;
}

.page details[open] > summary::before {
  transform: rotate(45deg);
}

.page summary:hover::before {
  border-color: var(--text);
}

.page summary .ver {
  margin: 0;
}

.page summary .date {
  color: var(--muted);
  font-size: 13px;
  margin-left: auto;
}

.page details ul {
  padding-bottom: 14px;
}

.entry ul,
.page ul {
  margin: 0;
  padding-left: 20px;
}

.entry li,
.page li {
  margin: 0 0 6px;
}

/* Пометка стадии в планах: словами, а не цветом — цвет сам по себе ничего не
   сообщает тому, кто видит страницу впервые. */
.stage {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 9px;
  margin-left: 8px;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .page {
    padding: 26px 20px;
  }
}

/* --- Верхняя навигация ---------------------------------------------------- */

/* Полосы у панели нет: она перекрывала фоновую картинку во всю ширину. Есть
   только сами кнопки — читаемость им даёт собственная подложка, а не общая.

   Кнопки закреплены и видны всегда, а не спрятаны за наведением: меню, которое
   надо сперва найти, не решает задачу «разделы никто не замечает», да и на
   телефоне наведения нет вовсе. */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;

  display: flex;
  justify-content: center;

  padding: 18px 24px;

  /* Полоса невидима, но по-прежнему лежит поверх страницы. Без этого она
     перехватывала бы клики по всей ширине сверху — например по кнопке
     скачивания, если та окажется под ней при прокрутке. */
  pointer-events: none;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 8px;

  /* Клики возвращаем самим кнопкам. */
  pointer-events: auto;
}

.topbar-links a {
  color: var(--text);
  font-size: 15px;
  text-decoration: none;

  padding: 8px 16px;
  border-radius: 999px;

  /* Своя подложка у каждой кнопки: поверх светлого участка картинки белый
     текст иначе теряется. */
  background: rgba(13, 15, 20, 0.62);
  border: 1px solid var(--border);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.topbar-links a:hover {
  background: rgba(20, 24, 34, 0.82);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Текущий раздел: и цветом, и фоном. Одного цвета мало — на тёмном фоне
   разницу между приглушённым и акцентным замечают не все. */
.topbar-links a.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.topbar-links a.active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

@media (max-width: 600px) {
  .topbar {
    padding: 12px;
  }

  .topbar-links {
    gap: 6px;
  }

  .topbar-links a {
    font-size: 13px;
    padding: 7px 12px;
  }

  main {
    padding-top: 88px;
  }
}

/* Вкладки на странице «Что нового»: переключение между клиентами. Клиента
   два, у каждого свои выпуски, и мешать их в одном списке незачем. */
.tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 18px;
}

.tab {
  appearance: none;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tab:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
