/* Beon — тёмная тема по макету example/home.html (палитра снята с beon.vip). */

:root {
  --page: #202328;
  --panel: #23272d;
  --block: #2a2e37;
  --line: #191c22;
  --head: #793825;
  --head-text: #d9cdc2;
  --btn: #315a7f;
  --btn-hover: #3a6b98;
  --link: #3a83c5;
  --text: #b9bec7;
  --title: #c6cad1;
  --muted: #8b9099;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font: 13px/1.4 Arial, Helvetica, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- шапка ---------- */
.top {
  display: flex; align-items: center; gap: 40px;
  height: 80px; padding: 0 32px;
  border-bottom: 1px solid #2b2f37;
}
.logo img { display: block; height: 56px; width: auto; }

.nav {
  display: flex; gap: 28px;
  align-self: stretch; align-items: center;
  border-bottom: 1px solid #4a4f59;
  margin-bottom: 14px;
  font-size: 14.5px;
}
.nav a { color: #b6bbc4; white-space: nowrap; }
.nav a.active { color: #e3e6ea; }

.top-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.icon-btn {
  position: relative;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 3px;
  background: #1b1e24; color: #9aa1ac; cursor: pointer;
}
.icon-btn:hover { color: #d3d8e0; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn--small { width: 30px; height: 30px; }
.badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 8px; background: #b23b3b; color: #fff;
  font-size: 10px; line-height: 15px; text-align: center;
}

.theme-btn {
  padding: 0; border: 0; background: none;
  color: #e8c14a; font-size: 20px; line-height: 1; cursor: pointer;
}

.btn {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid #1d242c; border-radius: 3px;
  background: var(--block); color: #a7acb5;
  font: inherit; cursor: pointer;
}
.btn--primary { background: var(--btn); color: #e8eef4; border-color: #274a68; text-align: center; }
.btn--left { display: table; }
.btn--primary:hover { background: var(--btn-hover); text-decoration: none; }

/* ---------- сетка ---------- */
.layout {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 32px 40px;
  align-items: start;
}
.side { display: grid; gap: 8px; }

/* ---------- блоки левой колонки ---------- */
.block { background: var(--block); border: 1px solid var(--line); }

.block__head {
  height: 24px; margin: 0;
  background: var(--head); color: var(--head-text);
  font-size: 12.5px; font-weight: 400; line-height: 24px; text-align: center;
}

.block__body { padding: 12px; font-size: 13px; }
.block__body--center { text-align: center; }
.block__body--feed { display: grid; gap: 14px; }

.side-username { margin: 4px 0 12px; font-size: 20px; color: #c9cdd3; }

.avatar,
.entry__thumb {
  display: grid; place-items: center;
  background: #565656; color: #4b4b4b;
}
.avatar--lg { width: 202px; height: 202px; margin: 0 auto; border-radius: 2px; }
.avatar svg, .entry__thumb svg { width: 64px; height: 64px; stroke-width: 1.2; }

.rating {
  margin: 14px 0 12px; padding: 0;
  list-style: none; text-align: left;
}
.rating li { display: flex; align-items: center; gap: 5px; padding: 3px 0; font-size: 13.5px; }
.rating .num { color: #8f949d; }
.rating svg { width: 13px; height: 13px; color: #6f7580; }

.community { display: flex; gap: 10px; text-align: left; }
.community__logo { width: 56px; height: 56px; flex: none; background: #fff; }
.community__name { font-size: 13px; }
.community p { margin: 4px 0 0; }

.online { margin: 0; text-align: left; }

.update { display: flex; gap: 8px; text-align: left; }
.update__ava { width: 20px; height: 20px; flex: none; background: #5a5a5a; }
.update p { margin: 0; font-size: 12px; line-height: 1.45; }
.update .time { color: var(--muted); }
.update strong { color: var(--title); }

/* ---------- лента ---------- */
.main { display: grid; gap: 8px; align-content: start; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 0 0 2px; }
.tabs, .pager { display: flex; gap: 5px; }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none; white-space: nowrap;
  padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--block); color: #a7acb5;
  font: inherit; font-size: 13px; cursor: pointer;
}
.tab:hover { color: #dfe3e8; }
.tab--active { background: var(--btn); border-color: #274a68; color: #e8eef4; }

.entry {
  padding: 14px 16px 16px;
  background: var(--panel);
  border: 1px solid #262a31;
}

.entry__title {
  margin: 0 0 2px;
  font-size: 23px; font-weight: 600; line-height: 1.2;
  color: #4179b8;
}

.entry__meta { margin: 0 0 10px; color: var(--muted); font-size: 12px; }

.entry__body { display: flex; gap: 12px; align-items: flex-start; }
.entry__thumb { width: 100px; height: 135px; flex: none; cursor: pointer; }
.entry__thumb svg { width: 40px; height: 40px; }

.entry__text { flex: 1; min-width: 0; }
.entry__text p {
  margin: 0 0 10px;
  font-size: 14px; font-style: italic; font-weight: 600;
  color: #d9dce2;
}
.entry__more { font-weight: 600; }
.entry__stats {
  display: flex; gap: 16px; margin-top: 12px;
  color: #5d7d9d; font-size: 13px;
}
.entry__stats span { display: flex; align-items: center; gap: 5px; }
.entry__stats svg { width: 14px; height: 14px; }

.verified { color: #3a83c5; font-size: 11px; }

.copyright { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

/* ---------- общие добавления ---------- */
h1 a, .entry__title a { color: inherit; }
.entry__title a:hover { color: #e3e6ea; text-decoration: none; }
.muted { color: var(--muted); }
.mark { margin-right: 4px; font-size: 12px; }
.top-user { color: var(--title); }
.top-avatar { width: 26px; height: 26px; border-radius: 2px; object-fit: cover; }
.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.gallery a { display: block; line-height: 0; }
.gallery img { max-width: 220px; max-height: 220px; border-radius: 2px; }
.form--inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.profile-head img.avatar { object-fit: cover; }
.entry__stats a { color: inherit; }
.entry__stats a:hover { color: #d3d8e0; text-decoration: none; }
.entry__text--full { font-style: normal; font-weight: 400; color: var(--text); line-height: 1.65; }
.entry__text--full p { font-style: normal; font-weight: 400; color: var(--text); }
.entry--full { padding: 20px; }
.entry__actions, .topic-actions, .post__actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.entry--full .entry__actions { margin-top: 4px; }
.btn--active { background: #7c3b4a; border-color: #64303c; color: #ffe9ec; }
.btn--danger { background: #5f2b2b; border-color: #4a2121; color: #f0d6d6; }
.btn--danger:hover { background: #713333; }
.link-btn { padding: 0; border: 0; background: none; color: #7f8791; font: inherit; font-size: 12px; cursor: pointer; }
.link-btn:hover { color: #d3d8e0; }

/* ---------- формы ---------- */
.form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 6px; }
.form-row label { color: var(--title); font-size: 13px; }
.field {
  width: 100%; padding: 8px 10px;
  border: 1px solid #1b1e24; border-radius: 3px;
  background: #1c1f25; color: #d9dce2;
  font: inherit; font-size: 14px;
}
.field:focus { outline: 1px solid #3a6b98; border-color: #3a6b98; }
.field--area { min-height: 90px; resize: vertical; line-height: 1.5; }
.form-error, .form-row ul { margin: 2px 0 0; padding: 0; list-style: none; color: #d98b8b; font-size: 12px; }

/* ---------- панели и страницы ---------- */
.panel { padding: 20px; background: var(--panel); border: 1px solid #262a31; }
.panel--narrow { max-width: 460px; }
.panel__title { margin: 0 0 16px; font-size: 22px; font-weight: 600; color: #c6cad1; }
.page-title { margin: 0 0 4px; font-size: 26px; font-weight: 600; color: #c6cad1; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 12px; }
.breadcrumbs { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.section-title { margin: 20px 0 10px; font-size: 18px; font-weight: 600; color: #c6cad1; }
.empty { padding: 20px; background: var(--panel); border: 1px dashed #2f343d; color: var(--muted); }
.notice { margin: 12px 0 0; padding: 10px 12px; background: #23272d; border: 1px solid #2b2f37; color: var(--muted); }
.flash { padding: 10px 14px; border: 1px solid #2b2f37; background: #23272d; }
.flash--error { border-color: #6c3636; color: #e2b3b3; }
.flash--success { border-color: #2f5a3a; color: #b8ddc1; }
.pager--bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }

/* ---------- комментарии ---------- */
.comments { margin-top: 8px; padding: 16px; background: var(--panel); border: 1px solid #262a31; }
.comment { padding: 12px 0; border-top: 1px solid #262a31; }
.comment:first-of-type { border-top: 0; }
.comment__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.comment__delete { display: inline; }
.comment__body { margin-top: 6px; color: var(--text); font-size: 14px; line-height: 1.55; }

/* ---------- форум ---------- */
.forum-list { background: var(--panel); border: 1px solid #262a31; }
.forum-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid #262a31; }
.forum-row:first-child { border-top: 0; }
.forum-row__main { min-width: 0; }
.forum-row__main p { margin: 2px 0 0; font-size: 12px; }
.forum-row__last { flex: none; width: 38%; text-align: right; font-size: 12px; }
.forum-row__last p { margin: 0; }
.forum-row__name { font-size: 16px; color: #4179b8; }
.forum-row__name:hover { color: #6aa3dd; text-decoration: none; }
.post { padding: 16px; background: var(--panel); border: 1px solid #262a31; }
.post__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.post__body { color: var(--text); line-height: 1.6; }

/* ---------- сообщества и профиль ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.card-community { padding: 14px 16px; background: var(--panel); border: 1px solid #262a31; }
.card-community h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.card-community p { margin: 4px 0 0; font-size: 13px; }
.members { margin: 6px 0 0; font-size: 13px; }
.profile-head { display: flex; gap: 16px; align-items: flex-start; padding: 16px; background: var(--panel); border: 1px solid #262a31; }
.profile-head .avatar--lg { margin: 0; width: 120px; height: 120px; flex: none; }
.profile-head .page-title { margin-top: 4px; }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .top { gap: 20px; padding: 0 16px; }
  .nav { gap: 16px; }
  .nav a:nth-child(n+4) { display: none; }
  .layout { grid-template-columns: 260px minmax(0, 1fr); padding: 10px 16px 30px; }
  .avatar--lg { width: 100%; height: auto; aspect-ratio: 1; }
}

@media (max-width: 760px) {
  .top { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px 16px; }
  .logo img { height: 44px; }
  .nav { order: 3; flex-basis: 100%; margin: 0; border: 0; gap: 18px; font-size: 13px; overflow-x: auto; }
  .nav a:nth-child(n+4) { display: block; }
  .theme-btn { display: none; }
  .btn--primary { padding: 6px 10px; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 10px 14px 30px; }
  .side { display: none; }
  .toolbar { flex-wrap: wrap; gap: 6px; }
  .pager { display: none; }
  .entry__title { font-size: 20px; }
  .forum-row { flex-direction: column; gap: 6px; }
  .forum-row__last { width: 100%; text-align: left; }
  .profile-head { flex-direction: column; }
  .entry--full, .panel, .comments { padding: 14px; }
}

/* ---------- визуальный редактор (Quill) ---------- */
.rich-editor { background: #1e2126; border: 1px solid #2b3038; }
.rich-editor .ql-toolbar.ql-snow { border: 0 !important; border-bottom: 1px solid #2b3038 !important; background: #23272d; padding: 6px 8px; }
.rich-editor .ql-container.ql-snow { border: 0 !important; height: 320px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
.rich-editor .ql-editor { min-height: 300px; color: #e6e8eb; line-height: 1.55; }
.rich-editor .ql-editor.ql-blank::before { color: #8b9099; font-style: normal; }
.rich-editor .ql-editor a { color: #8ab4f8; }
.rich-editor .ql-editor blockquote { border-left: 3px solid #4a5160; color: #b9c0cb; }
.rich-editor .ql-editor img { max-width: 100%; }
.rich-editor .ql-snow .ql-stroke { stroke: #b9bec7; }
.rich-editor .ql-snow .ql-fill { fill: #b9bec7; }
.rich-editor .ql-snow .ql-picker { color: #b9bec7; }
.rich-editor .ql-snow .ql-picker-options { background: #23272d; border-color: #3a4048; }
.rich-editor .ql-snow .ql-picker-item:hover,
.rich-editor .ql-snow .ql-picker-label:hover,
.rich-editor .ql-snow button:hover { color: #fff; }
.rich-editor .ql-snow .ql-active .ql-stroke { stroke: #8ab4f8; }
.rich-editor .ql-snow .ql-active .ql-fill { fill: #8ab4f8; }
.rich-editor .ql-snow .ql-tooltip { background: #23272d; border-color: #3a4048; color: #e6e8eb; box-shadow: 0 2px 8px #0006; }
.rich-editor .ql-snow .ql-tooltip input[type=text] { background: #1e2126; border-color: #3a4048; color: #e6e8eb; }
.rich-editor .ql-snow .ql-tooltip a.ql-action,
.rich-editor .ql-snow .ql-tooltip a.ql-remove { color: #8ab4f8; }
