/* ==========================================================================
   MyBB — ТЁМНАЯ ТЕМА (Dark Ember)
   Файл: style.css — СТРУКТУРА
   Требует style_cs.1788256439.css, подключённый ПЕРЕД этим файлом (переменные --*).
   Здесь: типографика, отступы, радиусы, сетка, тени-геометрия, анимации.
   Цвета сюда не добавляем — все правки палитры делаются в style_cs.1788256439.css.
   ========================================================================== */

/* ---------- Подключение шрифта (можно убрать, если шрифт уже подключён
   в шаблоне headerinclude через <link>) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

* { box-sizing: border-box; }

html {
  font-size: 15px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { text-decoration: none; }

hr {
  border: 0;
  border-top: 1px solid;
  margin: 20px 0;
}

img { max-width: 100%; height: auto; }

/* ---------- Скроллбар: геометрия (цвета в style_cs.1788256439.css) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border-radius: 10px; border-width: 3px; border-style: solid; }

/* ==========================================================================
   Контейнер страницы
   ========================================================================== */
#container, .bodyline {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.panel, .box, .fieldset, .usercp_container, .tborder {
  border: 1px solid;
  border-radius: 14px;
  padding: 0;
  margin-bottom: 24px;
  overflow: hidden;
}

/* Таблицы внутри панелей теряют собственные отступы браузера */
table.tborder {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.trow1, .trow2 {
  border-top: 1px solid;
  transition: background-color .12s ease;
}
.trow1 td, .trow2 td {
  padding: 14px 16px;
  vertical-align: middle;
}

/* ==========================================================================
   Шапка форума
   ========================================================================== */
#header, .header {
  border-radius: 16px;
  border: 1px solid;
  padding: 28px 32px;
  margin: 20px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

#logo, .site-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.site-tagline {
  font-size: .85rem;
  margin-top: 4px;
  font-weight: 400;
}

.welcomeblock, .welcomeblock_member {
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Главное меню */
.mainmenu, #menu {
  border-radius: 12px;
  border: 1px solid;
  padding: 6px;
  margin-bottom: 20px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.mainmenu a, #menu a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}

/* Хлебные крошки */
.navigation, #breadcrumb {
  font-size: .82rem;
  padding: 10px 4px 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Заголовки таблиц: thead / tcat
   ========================================================================== */
.thead, thead th {
  padding: 12px 16px;
  font-size: .82rem;
  font-weight: 600;
  text-align: left;
}

.tcat {
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tfoot, .tfoot1, .tfoot2 {
  padding: 10px 16px;
  font-size: .78rem;
  border-top: 1px solid;
}

/* ==========================================================================
   Список форумов
   ========================================================================== */
.forumbit_nopermission, .forumbit {
  border-top: 1px solid;
}

.forumbit td {
  padding: 16px;
}

.forumicon, .forumbit_icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.forumdata .forumtitle, .forumlink {
  font-size: 1rem;
  font-weight: 600;
}

.forumdata .forumdescription, .foruminfo .forumdescription {
  font-size: .85rem;
  margin-top: 4px;
  line-height: 1.5;
}

.forumsubtitle, .subforums {
  font-size: .78rem;
  margin-top: 8px;
}

.forumlastpost {
  font-size: .8rem;
  line-height: 1.5;
  text-align: right;
  min-width: 180px;
}

.forumstats {
  font-size: .78rem;
  text-align: center;
  min-width: 90px;
}
.forumstats strong { display: block; font-size: .95rem; }

.threadprefix, .thread-prefix {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid;
  font-size: .72rem;
  font-weight: 600;
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ==========================================================================
   Пагинация
   ========================================================================== */
.pagination, .pages {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  font-size: .85rem;
  flex-wrap: wrap;
}
.pagination a, .pages a, .pagination .current, .pages .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid;
  font-weight: 500;
  transition: all .15s ease;
}

/* ==========================================================================
   Просмотр сообщений (постбит)
   ========================================================================== */
.post, .postbit, .postbit_standard {
  border-radius: 14px;
  border: 1px solid;
  padding: 20px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  transition: border-color .15s ease;
}

.post_author, .author_information {
  text-align: center;
  font-size: .85rem;
}
.author_information strong { display: block; font-size: 1rem; margin-top: 8px; }

.author_avatar img, .postbit_avatar img {
  border-radius: 12px;
  border: 2px solid;
  width: 100%;
  max-width: 140px;
}

.usertitle, .post_usertitle {
  font-size: .78rem;
  margin-top: 4px;
  font-style: normal;
}

.userstars { font-size: .75rem; letter-spacing: 1px; margin-top: 4px; }

.post_body, .postbody, .post_content {
  font-size: .95rem;
  line-height: 1.65;
}
.post_content p { margin: 0 0 14px; }
.post_content p:last-child { margin-bottom: 0; }

.post_date, .postfooter, .post_meta {
  font-size: .78rem;
  border-top: 1px solid;
  margin-top: 14px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.signature {
  font-size: .82rem;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed;
}

/* ==========================================================================
   Цитаты и код
   ========================================================================== */
.quote, blockquote {
  border-left: 3px solid;
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: .9rem;
}
.quoted_message { font-size: .78rem; margin-bottom: 6px; font-weight: 600; }

.code, pre.code, .codeblock {
  border: 1px solid;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: .82rem;
  line-height: 1.6;
  overflow-x: auto;
}

.spoiler_content {
  border: 1px solid;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 10px 0;
}

/* ==========================================================================
   Формы и кнопки
   ========================================================================== */
input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="search"], textarea, select, .textbox {
  border: 1px solid;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: .9rem;
  transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
  width: 100%;
}

textarea { resize: vertical; min-height: 120px; }

label, .form_label { font-size: .85rem; font-weight: 500; margin-bottom: 6px; display: inline-block; }

input[type="submit"], input[type="button"], .button, .mybb_button, .button_secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease, border-color .15s ease;
}
input[type="submit"]:active, .button:active { transform: translateY(1px); }

/* ==========================================================================
   Мелкий текст / служебные классы
   ========================================================================== */
.smalltext { font-size: .78rem; }
.highlight { padding: 1px 4px; border-radius: 4px; }
.error, .error_message, .success_message, .warning_message {
  border: 1px solid;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: .88rem;
}

/* ==========================================================================
   Подвал
   ========================================================================== */
#footer, .footer {
  border-radius: 14px;
  border: 1px solid;
  padding: 20px 24px;
  margin: 24px 0;
  font-size: .8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.copyright { font-size: .78rem; text-align: center; }

/* ==========================================================================
   Адаптивность
   ========================================================================== */
@media (max-width: 768px) {
  #header, .header { padding: 20px; flex-direction: column; align-items: flex-start; }
  .post, .postbit, .postbit_standard { grid-template-columns: 1fr; }
  .post_author, .author_information { display: flex; align-items: center; gap: 12px; text-align: left; }
  .author_avatar img, .postbit_avatar img { max-width: 56px; }
  .forumlastpost, .forumstats { display: none; }
  .trow1 td, .trow2 td { padding: 12px; }
}

/* ---------- Уважение к reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Видимый фокус для клавиатурной навигации (геометрия) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-offset: 2px;
  outline-width: 2px;
  outline-style: solid;
}
