:root {
  --text-color: #e6e6e6;
  --header-color: #c71b43;

  /* единая высота «пилюли» создания поста */
  --pill-h: 20px;
}

body {
  font-family: Arial, sans-serif;
  background: #000d18;
  margin: 0;
  padding: 0;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 230px;
  background: #000911;
  padding: 20px;
  border-right: 1px solid #001a2e;
  display: flex;
  flex-direction: column;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  margin-bottom: 20px;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  color: #48a8bc;
  text-decoration: none;
}

.sidebar ul li a img {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
  color: #ee0c6f;
  background: rgba(4, 197, 191, 0.07);
  padding: 5px 10px;
  border-radius: 8px;
}

.sidebar ul.more {
  margin-top: auto;
  border-top: 1px solid #001a2e;
  padding-top: 20px;
}

/* Content area */
.content-area {
  margin-left: 250px;
  margin-right: 280px;
  padding: 30px 40px;
}

.main-content {
  margin-left: 250px;
  margin-right: 280px;
  padding: 30px 20px;
}

/* ---------- CREATE POST ---------- */
.create-post {
  width: 700px;
  margin: 20px auto;
  background: #005351;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  max-height: var(--pill-h);   /* фикс: единая высота пилюли в свернутом состоянии */
  overflow: hidden;
}

/* В свёрнутом состоянии — строго по центру и одной строкой */
.create-post:not(.expanded) #post-textarea {
  height: var(--pill-h) !important;
  line-height: var(--pill-h) !important;  /* центр плейсхолдера по вертикали */
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  box-sizing: content-box;
}

.create-post.expanded {
  max-height: none !important;      /* убираем ограничение высоты */
  overflow: visible !important;      /* даём контенту вытолкнуть низ */
  box-shadow: 0 4px 16px rgba(4, 197, 191, 0.35);
}

/* Хедер: textarea + кнопка */
.post-create-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--pill-h);   /* фикс: одна высота для контейнера */
  padding: 0 12px;             /* боковые отступы вместо padding у textarea */
  border-radius: 9999px;
}

#create-post textarea,
.create-post textarea {
  flex: 1;
  border: 0;
  background: transparent;
  color: #00c9c9;
  font-size: 14px;
  line-height: 1.2;
  resize: none;
  outline: none;
  padding: 0;                  /* важно! не вмешиваемся в вертикальное центрирование */
  overflow: hidden;
  width: 100%;
}

.textarea-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  height: 100%;
}

/* Плюс — ровно по центру */
.file-icon { 
  width: var(--pill-h); 
  height: var(--pill-h); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  border-radius: 9999px; 
  cursor: pointer; } 

.file-icon:hover { background: rgba(255, 255, 255, 0.1); }

.file-icon img {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.file-icon .plus-icon {
  width: 16px;
  height: 16px;
  stroke: #04c5bf;   /* фиксированный цвет — больше не пропадёт */
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;   /* чтобы клик шёл по кнопке, а не по svg */
}

/* на всякий случай подсветка при hover/active */
.file-icon:hover .plus-icon { opacity: .9; }
.file-icon:active .plus-icon { transform: scale(.96); }

/* убираем абсолют у картинки внутри кастомного триггера */
#custom-file-trigger {
  font-size: 0 !important;
}

#custom-file-trigger img {
  position: static !important;
  transform: none !important;
  color: #04c5bf;              /* ← ВАЖНО: цвет для currentColor */
  opacity: 1;                  /* подстраховка */
  filter: none;                /* подстраховка */
}

#custom-file-trigger:focus img,
#custom-file-trigger:active img {
  color: #04c5bf;
  opacity: 1;
}

.file-icon.file-selected img {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  display: block !important;
}

#file-preview {
  padding-top: 10px;
  margin-bottom: 12px;
  gap: 12px;
  border-radius: 12px;     /* можно оставить тут, раз он уже есть */
}

.preview-image,
.preview-video {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 0 5px #0006;
}

.post-options {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.create-post.expanded .post-options {
  opacity: 1;
  max-height: 500px;
  margin-top: 10px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Кнопки опций */
.post-options button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  margin: 5px 4px 0 0;
  border: none;
  background-color: #04c5bf;
  color: #000;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
  font-size: 14px;
  line-height: 1;
}
.post-options button:hover {
  background-color: #03b3ad;
}
.post-options button img.option-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: middle;
}

/* Чекбоксы */
.post-options label {
  display: inline-flex;
  align-items: center;
  margin-right: 20px;
  color: var(--text-color);
  font-size: 14px;
  gap: 5px;
  margin-top: 5px;
}

.custom-checkbox {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding-left: 28px;
  margin-right: 20px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-color);
  user-select: none;
}
.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.custom-checkbox .checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 18px;
  background-color: #003c3c;
  border: 2px solid #04c5bf;
  border-radius: 4px;
  transition: 0.2s ease;
}
.custom-checkbox .checkmark:hover {
  box-shadow: 0 0 6px #04c5bf;
  background-color: #014f4f;
}
.custom-checkbox input:checked ~ .checkmark {
  background-color: #04c5bf;
}
.custom-checkbox input:active ~ .checkmark {
  transform: scale(0.95) translateY(-50%);
}
.custom-checkbox .checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border-color: #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: all 0.2s ease;
}
.custom-checkbox input:checked ~ .checkmark::after {
  display: block;
}

/* Отправка */
.post-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.post-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  background-color: #04c5bf;
  color: #000;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(4, 197, 191, 0.3);
}
.post-btn:hover {
  background-color: #03b3ad;
  box-shadow: 0 4px 12px rgba(4, 197, 191, 0.5);
  transform: translateY(-1px);
}
#post-btn:disabled {        /* фикс селектора :disabled */
  opacity: 0.5;
  cursor: not-allowed;
}
#post-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#post-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* скрываем реальный input[type=file] */
input[type="file"] { display: none; }
.file-preview:empty { display: none; }

/* ---------- FEED ---------- */
.feed {
  width: min(100%, 900px);
  max-width: 900px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feed .post {
  position: relative;
  background: transparent;
  border-radius: 15px;
  padding: 0;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: none;
  animation: chatPostIn 0.32s ease both;
  transform-origin: bottom;
}

/* сообщение другого пользователя */
.feed .post.other-user .message-bubble {
  margin-left: 0;
  border-top-left-radius: 0;
}

.feed .post .avatar {
  position: absolute;
  top: 10px;
  left: -50px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}
.feed .post.current-user .avatar {
  left: auto;
  right: -50px;
}

.feed .post .message-bubble {
  background: #04c5bf;
  border-radius: 15px;
  padding: 16px 18px 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color:#000;
}
.feed .post .username { font-weight: bold; color: var(--header-color); }

.feed .post.current-user .message-bubble{
  margin-left: auto;
  margin-right: 0;
  border-top-right-radius: 0;
}

#feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Tails */
.bubble-tail {
  position: absolute;
  width: 20px;
  height: 20px;
  top: 20px;
  z-index: 2;
}

.bubble-tail.left { left: -18px; transform: scaleY(-1); top: 0; } 
.bubble-tail.right { right: -20px; transform: scale(-1, -1); top: 0; } /* цвета хвостиков через CSS, не внутри svg */ 
.bubble-tail path { fill: #04c5bf; }
.feed .post.current-user .bubble-tail path { fill: #04c5bf; }

.post-actions {
  display: flex;
  margin-top: 10px;
  gap: 12px;
}

.action-btn:hover {
  transform: scale(1.15);
  opacity: 0.9;
}

.post-actions .action-btn {
  transition: transform 0.15s ease, opacity 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.post-actions .action-btn img {
  width: 28px;
  height: 28px;
}

/* ---------- Suggestions / Recommendations ---------- */

.suggestions {
  position: fixed;
  top: 80px;
  right: 20px;

  width: 260px;
  padding: 18px;

  border-radius: 24px;
  border: 1px solid rgba(4, 197, 191, 0.18);

  background:
    radial-gradient(circle at top left, rgba(4, 197, 191, 0.12), transparent 34%),
    rgba(0, 10, 18, 0.94);

  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);

  backdrop-filter: blur(10px);
}

.suggestions-header {
  margin-bottom: 16px;
}

.suggestions-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;

  border-radius: 999px;
  border: 1px solid rgba(238, 12, 111, 0.34);
  background: rgba(238, 12, 111, 0.08);

  color: #ff2b86;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.suggestions h3 {
  margin: 0 0 6px;

  color: #eaffff;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 20px;
  font-weight: 900;
}

.suggestions-header p {
  margin: 0;

  color: rgba(223, 252, 255, 0.58);
  font-size: 12px;
  line-height: 1.45;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggested-profile-card {
  position: relative;

  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;

  padding: 12px;

  border-radius: 18px;
  border: 1px solid rgba(4, 197, 191, 0.12);
  background: rgba(0, 26, 46, 0.42);

  color: inherit;
  text-decoration: none;

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

.suggested-profile-card:hover {
  transform: translateY(-2px);
  border-color: rgba(4, 197, 191, 0.38);
  background: rgba(4, 197, 191, 0.08);
  box-shadow: 0 12px 28px rgba(4, 197, 191, 0.08);
}

.suggested-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;

  border: 1px solid rgba(4, 197, 191, 0.36);
  background: rgba(4, 197, 191, 0.08);
}

.suggested-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.suggested-avatar-fallback {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #04c5bf;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
}

.suggested-info {
  min-width: 0;
}

.suggested-name-row {
  display: flex;
  align-items: center;
  gap: 6px;

  min-width: 0;
}

.suggested-username {
  min-width: 0;

  color: #eaffff;
  font-size: 14px;
  font-weight: 900;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.suggested-verified {
  width: 17px;
  height: 17px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: rgba(4, 197, 191, 0.16);
  border: 1px solid rgba(4, 197, 191, 0.5);

  color: #04c5bf;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

.suggested-tag {
  display: block;
  margin-top: 3px;

  color: rgba(223, 252, 255, 0.56);
  font-size: 12px;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.suggested-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;

  margin-top: 8px;
}

.suggested-badges span {
  display: inline-flex;
  padding: 4px 8px;

  border-radius: 999px;
  background: rgba(4, 197, 191, 0.1);
  border: 1px solid rgba(4, 197, 191, 0.18);

  color: #48a8bc;
  font-size: 10px;
  font-weight: 900;
}

.suggested-view {
  grid-column: 1 / -1;

  margin-top: 2px;
  padding-top: 9px;

  border-top: 1px solid rgba(223, 252, 255, 0.06);

  color: #04c5bf;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.suggestions-empty {
  padding: 20px 14px;

  border-radius: 18px;
  border: 1px solid rgba(4, 197, 191, 0.12);
  background: rgba(0, 26, 46, 0.32);

  text-align: center;
}

.suggestions-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;
  background: rgba(4, 197, 191, 0.08);
  border: 1px solid rgba(4, 197, 191, 0.18);

  color: #04c5bf;
  font-size: 22px;
}

.suggestions-empty strong {
  display: block;
  margin-bottom: 6px;

  color: #eaffff;
  font-size: 14px;
}

.suggestions-empty p {
  margin: 0;

  color: rgba(223, 252, 255, 0.55);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .suggestions {
    display: none;
  }

  .main-content {
    margin-right: 20px;
  }
}

/* ---------- Auth buttons (верхний правый угол) ---------- */
.auth-buttons {
  position: absolute;
  top: 20px;
  right: 20px;
}
.auth-buttons .btn {
  background: none;
  color: #007bff;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  text-decoration: underline;
}

/* ---------- Preview toolbar ---------- */
.preview-toolbar{
  display:flex; justify-content:flex-end; align-items:center;
  margin-top: 10px;
}
.preview-mode{
  background: #004645; border:1px solid #016b68; border-radius:10px;
  padding:2px; display:inline-flex; gap:2px;
}
.mode-btn{
  background:transparent; color:#04c5bf; border:none; cursor:pointer;
  padding:6px 10px; border-radius:8px; font-weight:600; font-size:12px;
}
.mode-btn.active{ background:#016b68; color:#e6e6e6; }

/* ---------- Preview base ---------- */
#file-preview{
  padding-top: 10px;
  margin-bottom: 12px;      /* чтобы не прилипало к чекбоксам */
  border-radius: 12px;
}

/* крестик удаления */
.preview-remove{
  position:absolute; right:6px; top:6px;
  background:#000c; color:#fff; border-radius:50%;
  width:22px; height:22px; display:flex; align-items:center; justify-content:center;
  font-size:14px; cursor:pointer; user-select:none;
}

/* счётчик +N на последней плитке */
.preview-more{
  position:absolute; inset:0; background:rgba(0,0,0,.45);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:700; font-size:24px;
}

/* База без дисплея — ничего не ломаем */
#file-preview { padding-top: 10px; }

/* ====== ЕДИНАЯ БАЗА ДЛЯ ПРЕДПРОСМОТРА ====== */

/* =========================
   PREVIEW LAYOUTS (1..12)
   ========================= */

#file-preview[data-mode="grid"]{
  display: grid;
  gap: 12px;
  grid-auto-rows: clamp(120px, 18vw, 210px);
}

/* плитки */
#file-preview .preview-item{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #002b2a;
}

#file-preview .preview-item > img,
#file-preview .preview-item > video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* крестик — добавил z-index, чтобы он был поверх */
#file-preview .preview-remove{
  position:absolute;
  right:6px;
  top:6px;
  z-index: 10;
  background:#000c;
  color:#fff;
  border-radius:50%;
  width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  cursor:pointer;
  user-select:none;
}

/* 1 — одна */
#file-preview.l1{ grid-template-columns: 1fr; }

/* 2 — две рядом */
#file-preview.l2{ grid-template-columns: repeat(2, 1fr); }

/* 3 — большая слева (2x2), справа две */
#file-preview.l3{ grid-template-columns: repeat(3, 1fr); }
#file-preview.l3 .preview-item:nth-child(1){
  grid-column: 1 / span 2;
  grid-row: span 2;
}
#file-preview.l3 .preview-item:nth-child(2){ grid-column: 3; }
#file-preview.l3 .preview-item:nth-child(3){ grid-column: 3; }

/* 4 — 2x2 */
#file-preview.l4{ grid-template-columns: repeat(2, 1fr); }

/* 5 — 2 сверху, 3 снизу */
#file-preview.l5{ grid-template-columns: repeat(6, 1fr); }
#file-preview.l5 .preview-item:nth-child(1),
#file-preview.l5 .preview-item:nth-child(2){ grid-column: span 3; }
#file-preview.l5 .preview-item:nth-child(3),
#file-preview.l5 .preview-item:nth-child(4),
#file-preview.l5 .preview-item:nth-child(5){ grid-column: span 2; }

/* 6 — 3x2 */
#file-preview.l6{ grid-template-columns: repeat(3, 1fr); }

/* 8 — 2 сверху, 6 снизу (оставим сеткой как было) */
#file-preview.l8{ grid-template-columns: repeat(6, 1fr); }
#file-preview.l8 .preview-item:nth-child(1),
#file-preview.l8 .preview-item:nth-child(2){ grid-column: span 3; }
#file-preview.l8 .preview-item:nth-child(n+3){ grid-column: span 2; }

/* 9 — 3x3 */
#file-preview.l9{ grid-template-columns: repeat(3, 1fr); }

/* 7 и 10+ — 2 сверху + лента снизу */
#file-preview.lstrip{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#file-preview.lstrip .preview-top{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  grid-auto-rows: clamp(120px, 18vw, 210px);
}

#file-preview.lstrip .preview-bottom{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

#file-preview.lstrip .preview-bottom .preview-item{
  flex: 0 0 140px;
  min-width: 140px;
  height: 140px;
}

/* мобилка */
@media (max-width: 520px){
  #file-preview.lstrip .preview-top{ grid-template-columns: 1fr; }
  #file-preview.l2,
  #file-preview.l4{ grid-template-columns: 1fr; }
  #file-preview.l5,
  #file-preview.l8{ grid-template-columns: 1fr; }
}


/* ==== VK-style bottom row: ВСЁ видно, без скролла ==== */
#file-preview.lstrip{
  --gap: 12px;
  --bottom-count: 5; /* дефолт, JS перезапишет */
}

#file-preview.lstrip .preview-bottom{
  display: flex;
  gap: var(--gap);
  overflow: hidden;        /* никаких скроллов */
  padding-bottom: 0;
}

#file-preview.lstrip .preview-bottom .preview-item{
  /* ширина = (100% - gap*(n-1)) / n */
  flex: 0 0 calc((100% - (var(--gap) * (var(--bottom-count) - 1))) / var(--bottom-count));
  aspect-ratio: 1 / 1;     /* квадрат */
  height: auto;            /* aspect-ratio сам задаст высоту */
  min-width: 40px;         /* чтобы совсем не исчезало */
  border-radius: 12px;
}

/* =========================
   LIGHTBOX PREVIEW
   ========================= */
.media-lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20000; /* ← ВОТ ЭТО меняем */
  padding: 24px;
}

.media-lightbox.open{ display:flex; }

.media-lightbox .lb-inner{
  position: relative;
  width: min(980px, 96vw);
  max-height: 90vh;
  background: #000a12;
  border: 1px solid #014f4f;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.media-lightbox .lb-body{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
  height: 90vh;
  max-height: 90vh;
  overflow: hidden;
}

.media-lightbox .lb-body::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: var(--lb-bg);
  background-size: cover;
  background-position: center;
  filter: blur(45px);
  transform: scale(1.2);
  opacity: 0.65;
  z-index: 0;
}

.media-lightbox .lb-body::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.25);
  z-index: 1;
}

.media-lightbox .lb-body > *{
  position: relative;
  z-index: 2;
}

.media-lightbox img,
.media-lightbox video{
  max-width: 100%;
  max-height: 100%;
  display:block;
}

.media-lightbox video{ width: 100%; height: 100%; object-fit: contain; }

.media-lightbox .lb-close{
  position:absolute;
  top:10px; right:10px;
  width:34px; height:34px;
  border-radius:50%;
  background: rgba(0,0,0,.55);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index: 2;
  font-size: 18px;
  user-select:none;
}

.media-lightbox .lb-nav{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:44px; height:44px;
  border-radius:50%;
  background: rgba(0,0,0,.45);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index: 2;
  font-size: 26px;
  user-select:none;
}

.media-lightbox .lb-prev{ left:12px; }
.media-lightbox .lb-next{ right:12px; }

/* делаем плитки "кликабельными" */
#file-preview .preview-item{ cursor: pointer; }
#file-preview .preview-remove{ cursor: pointer; } /* уже есть, но ок */

/* =========================
   CAROUSEL MODE (active + thumbs)
   ========================= */

/* крестик на миниатюрах */
#file-preview[data-mode="carousel"] .thumb .preview-remove{
  width: 20px;
  height: 20px;
  font-size: 13px;
  right: 6px;
  top: 6px;
}

#file-preview[data-mode="carousel"]{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

#file-preview[data-mode="carousel"] .carousel-main{
  padding: 0px;
  box-sizing: border-box;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #001b1a;
  height: clamp(220px, 34vw, 420px);
  display:flex;
  align-items:center;
  justify-content:center;
  --bg: none; /* <<< добавь */
}

#file-preview[data-mode="carousel"] .carousel-main img,
#file-preview[data-mode="carousel"] .carousel-main video{
  width: 100%;
  height: 100%;
  object-fit: cover;      /* 🔥 ключевой момент */
  object-position: center;
  display:block;
  border-radius: 0px;
}

/* blur background */
#file-preview[data-mode="carousel"] .carousel-main::before{
  content:"";
  position:absolute;
  border-radius: inherit;  /* ✅ иначе по краям может “светиться” */
  inset:0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  filter: blur(40px);     /* больше */
  transform: scale(1.4);  /* чтобы не было краёв */
  opacity: .65;
  z-index: 0;
}

#file-preview[data-mode="carousel"] .carousel-main::after{
  content:"";
  position:absolute;
  border-radius: inherit;  /* ✅ иначе по краям может “светиться” */
  inset:0;
  background: rgba(0,0,0,.28);
  z-index: 1;
}

#file-preview[data-mode="carousel"] .carousel-main > *{
  position: relative;
  z-index: 2;
}

/* fade */
#file-preview[data-mode="carousel"] .carousel-main.fade-out{ opacity:0; transition:opacity .12s ease; }
#file-preview[data-mode="carousel"] .carousel-main.fade-in{ opacity:1; transition:opacity .16s ease; }

/* arrows */
#file-preview[data-mode="carousel"] .car-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
  z-index: 5;
  font-size: 26px;
}
#file-preview[data-mode="carousel"] .car-prev{ left: 10px; }
#file-preview[data-mode="carousel"] .car-next{ right: 10px; }

/* thumbs row (no overlap) */
#file-preview[data-mode="carousel"] .carousel-thumbs{
  display:flex;
  gap: 10px;
  align-items:center;
}

#file-preview[data-mode="carousel"] .thumb{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #002b2a;
  aspect-ratio: 1 / 1;
  cursor: pointer;

  flex: 1 1 0;
  min-width: 34px;
  transition: flex .18s ease, box-shadow .18s ease;
}
#file-preview[data-mode="carousel"] .thumb.active{
  flex: 2 1 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

#file-preview[data-mode="carousel"] .thumb img,
#file-preview[data-mode="carousel"] .thumb video{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* ===== Fix: крестик в carousel-main всегда ровный и в углу ===== */
#file-preview[data-mode="carousel"] .carousel-main .preview-remove{
  position: absolute;
  top: 12px;
  right: 12px;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;

  font-size: 18px;
  line-height: 1;

  z-index: 20;          /* выше blur/оверлея/видео */
  flex: 0 0 auto;       /* чтобы не "плющило" */
  transform: none;
  pointer-events: auto;
}

/* overlay только для центр-кнопки, НЕ на весь main */
#file-preview[data-mode="carousel"] .car-play{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  cursor: pointer;
}

#file-preview[data-mode="carousel"] .car-play .btn{
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 30px;
  user-select:none;
  backdrop-filter: blur(2px);
}

#file-preview[data-mode="carousel"] .carousel-main.playing .car-play{
  display:none;
}

/* fullscreen кнопка рядом с крестиком */
#file-preview[data-mode="carousel"] .carousel-main .car-full{
  position: absolute;
  top: 12px;
  right: 54px;              /* левее крестика */
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 18px;
  line-height: 1;
  z-index: 20;
  cursor: pointer;
  user-select:none;
}
#file-preview[data-mode="carousel"] .carousel-main .car-full:hover{
  background: rgba(0,0,0,.68);
}

/* =========================
   POST MEDIA uses SAME layout as #file-preview
   ========================= */

/* контейнер медиа в посте = тот же движок */
.post-media{
  margin: 10px 0 12px;
  border-radius: 16px;
  overflow: hidden;
}

/* Снимаем твои старые режимы, чтобы не мешали */
.post-media--grid,
.post-media--carousel{
  display: block !important;
  overflow: visible !important;
  scroll-snap-type: none !important;
  padding-bottom: 0 !important;
}

/* ВАЖНО: делаем .post-media совместимым с твоими правилами #file-preview */
.post-media.media-layout[data-mode="grid"]{
  display: grid;
  gap: 12px;
  grid-auto-rows: clamp(120px, 18vw, 210px);
}

/* плитки */
.post-media.media-layout .preview-item{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #002b2a;
}

.post-media.media-layout .preview-item > img,
.post-media.media-layout .preview-item > video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

/* ==== схемы 1..9 (как в create) ==== */
.post-media.media-layout.l1{ grid-template-columns: 1fr; }
.post-media.media-layout.l2{ grid-template-columns: repeat(2, 1fr); }

.post-media.media-layout.l3{ grid-template-columns: repeat(3, 1fr); }
.post-media.media-layout.l3 .preview-item:nth-child(1){
  grid-column: 1 / span 2;
  grid-row: span 2;
}
.post-media.media-layout.l3 .preview-item:nth-child(2){ grid-column: 3; }
.post-media.media-layout.l3 .preview-item:nth-child(3){ grid-column: 3; }

.post-media.media-layout.l4{ grid-template-columns: repeat(2, 1fr); }

.post-media.media-layout.l5{ grid-template-columns: repeat(6, 1fr); }
.post-media.media-layout.l5 .preview-item:nth-child(1),
.post-media.media-layout.l5 .preview-item:nth-child(2){ grid-column: span 3; }
.post-media.media-layout.l5 .preview-item:nth-child(3),
.post-media.media-layout.l5 .preview-item:nth-child(4),
.post-media.media-layout.l5 .preview-item:nth-child(5){ grid-column: span 2; }

.post-media.media-layout.l6{ grid-template-columns: repeat(3, 1fr); }

.post-media.media-layout.l8{ grid-template-columns: repeat(6, 1fr); }
.post-media.media-layout.l8 .preview-item:nth-child(1),
.post-media.media-layout.l8 .preview-item:nth-child(2){ grid-column: span 3; }
.post-media.media-layout.l8 .preview-item:nth-child(n+3){ grid-column: span 2; }

.post-media.media-layout.l9{ grid-template-columns: repeat(3, 1fr); }

/* ==== 7 и 10+ (2 сверху + нижняя лента без скролла) ==== */
.post-media.media-layout.lstrip{
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  --gap: 12px;
  --bottom-count: 5; /* JS выставит сколько нужно */
}

.post-media.media-layout.lstrip .preview-top{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  grid-auto-rows: clamp(120px, 18vw, 210px);
}

.post-media.media-layout.lstrip .preview-bottom{
  display: flex;
  gap: var(--gap);
  overflow: hidden;     /* без скролла */
  padding-bottom: 0;
}

.post-media.media-layout.lstrip .preview-bottom .preview-item{
  flex: 0 0 calc((100% - (var(--gap) * (var(--bottom-count) - 1))) / var(--bottom-count));
  aspect-ratio: 1 / 1;
  height: auto;
  min-width: 40px;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  padding-right: 6px;
}

.post-header-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-location {
  font-size: 13px;
  opacity: 0.9;
}

.post-meta {
  display: flex;
  align-items: center;
  line-height: 1;
}

.post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.post-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
}

.like-btn .like-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.bookmark-btn .bookmarked {
  display: none;
}

.bookmark-btn.bookmarked .not-bookmarked {
  display: none;
}

.bookmark-btn.bookmarked .bookmarked {
  display: inline-block;
}

.bookmark-btn img {
  width: 24px;
  height: 24px;
  display: block;
}

.action-btn.bookmark-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.bookmark-btn .bookmark-icon {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.bookmark-btn .bookmarked {
  display: none;
}

.bookmark-btn.bookmarked .not-bookmarked {
  display: none;
}

.bookmark-btn.bookmarked .bookmarked {
  display: block;
}

.like-btn.liked img {
  animation: likePop 0.35s ease;
}

@keyframes likePop {
  0%   { transform: scale(0.8); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* =========================
   SAVED POST CAROUSEL
   ========================= */

.post-media.media-layout[data-mode="carousel"] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-media.media-layout[data-mode="carousel"] .carousel-main {
  padding: 0;
  box-sizing: border-box;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #001b1a;
  height: clamp(220px, 34vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-media.media-layout[data-mode="carousel"] .carousel-main img,
.post-media.media-layout[data-mode="carousel"] .carousel-main video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.post-media.media-layout[data-mode="carousel"] .carousel-thumbs {
  display: flex;
  gap: 10px;
  align-items: center;
}

.post-media.media-layout[data-mode="carousel"] .thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #002b2a;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  flex: 1 1 0;
  min-width: 34px;
  transition: flex .18s ease, box-shadow .18s ease;
}

.post-media.media-layout[data-mode="carousel"] .thumb.active {
  flex: 2 1 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.post-media.media-layout[data-mode="carousel"] .thumb img,
.post-media.media-layout[data-mode="carousel"] .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-media.media-layout[data-mode="carousel"] .car-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  z-index: 5;
  font-size: 26px;
}

.post-media.media-layout[data-mode="carousel"] .car-prev {
  left: 10px;
}

.post-media.media-layout[data-mode="carousel"] .car-next {
  right: 10px;
}

.post-media.media-layout[data-mode="carousel"] .carousel-main.fade-out {
  opacity: 0;
  transition: opacity .12s ease;
}

.post-media.media-layout[data-mode="carousel"] .carousel-main.fade-in {
  opacity: 1;
  transition: opacity .16s ease;
}

.post-actions.under-bubble{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top: 10px;
}

.post-actions-left,
.post-actions-right{
  display:flex;
  align-items:center;
  gap:12px;
}

.post-media img,
.post-media video {
  transition: transform 0.25s ease, filter 0.25s ease;
  cursor: pointer;
}

.post-media img:hover,
.post-media video:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.action-count {
  font-size: 13px;
  opacity: 0.7;
  user-select: none;
  min-width: 10px;
}

.post-modal {
  z-index: 10000;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 24px;
}

.post-modal.open {
  display: flex;
}

.post-modal-inner {
  width: min(1280px, 96vw);
  height: min(88vh, 900px);
  background: #001018;
  border: 1px solid #01353b;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(340px, 420px);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.55);
  position: relative;
}

.post-modal-left {
  background: #000814;
  min-width: 0;
  overflow: auto;
  padding: 24px;
  padding-right: 60px;
}

.post-modal-left {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.post-modal-left::-webkit-scrollbar {
  width: 8px;
}

.post-modal-left::-webkit-scrollbar-track {
  background: transparent;
}

.post-modal-left::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}

.post-modal-left:hover {
  scrollbar-color: rgba(125, 163, 167, 0.55) transparent;
}

.post-modal-left:hover::-webkit-scrollbar-thumb {
  background: rgba(125, 163, 167, 0.55);
}

.post-modal-left::-webkit-scrollbar-thumb:hover {
  background: rgba(4, 197, 191, 0.7);
}

.post-modal-right {
  background: #000c14;
  border-left: 1px solid #01353b;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.post-modal-close {
  position: absolute;
  top: 14px;
  right: 10px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  z-index: 20;
  font-size: 18px;
  user-select: none;
}

.post-modal-close:hover {
  background: rgba(0, 0, 0, 0.72);
}

/* список комментариев */
#modal-comments-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

#modal-comment-form {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #01353b;
  background: #000f18;
}

#modal-comment-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #014b54;
  background: #001821;
  color: #dffefe;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

#modal-comment-form button {
  border: none;
  background: #04c5bf;
  color: #001018;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

/* пост внутри модалки */
.post-modal-left .post {
  max-width: 100%;
  margin: 0;
}

.post-modal-left .avatar,
.post-modal-left .bubble-tail,
.post-modal-left .post-actions {
  display: none !important;
}

.post-modal-left .message-bubble {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #e8ffff !important;
}

.post-modal-left .username {
  color: #ee0c6f !important;
}

.post-modal-left .post-meta,
.post-modal-left .post-location,
.post-modal-left .content {
  color: #cde7ea !important;
}

.post-modal-left .post-media {
  margin-top: 14px;
}

/* комментарии */
.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(4, 197, 191, 0.08);
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 34px;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comment-body {
  min-width: 0;
  flex: 1;
}

.comment-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.comment-username {
  color: #04c5bf;
  font-weight: 700;
}

.comment-date {
  color: #7da3a7;
  font-size: 12px;
  white-space: nowrap;
}

.comment-content {
  color: #e3f4f5;
  line-height: 1.35;
}

.no-comments {
  color: #9ab4b8;
  margin: 0;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);

  display: none;
  align-items: center;
  justify-content: center;

  z-index: 20000;
}

.media-lightbox.open {
  display: flex;
}


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

.comment-like-btn,
.comment-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #8fb8bc;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
}

.comment-like-btn:hover,
.comment-reply-btn:hover {
  color: #dffefe;
}

.comment-like-btn .comment-like-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.comment-like-btn.liked {
  color: #ee0c6f;
}

.comment-like-icon.pop-animate {
  animation: commentLikePop 0.35s ease;
}

@keyframes commentLikePop {
  0% {
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.22);
  }
  100% {
    transform: scale(1);
  }
}

.comment-replies {
  margin-top: 10px;
  margin-left: 44px;
  padding-left: 14px;
  border-left: 1px solid rgba(4, 197, 191, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-reply {
  padding-top: 2px;
}

.comment-reply .comment-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.comment-reply .comment-username {
  font-size: 14px;
}

.comment-reply .comment-content {
  font-size: 14px;
}

.comment-toggle-replies {
  margin-top: 8px;
  margin-left: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: #7fcfd0;
  font-size: 13px;
  cursor: pointer;
}

.comment-toggle-replies:hover {
  color: #04c5bf;
  text-decoration: underline;
}

.comment-replies {
  margin-top: 10px;
  margin-left: 44px;
  padding-left: 14px;
  border-left: 1px solid rgba(4, 197, 191, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-replies[hidden] {
  display: none !important;
}

.comment-reply .comment-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.comment-reply .comment-username,
.comment-reply .comment-content {
  font-size: 14px;
}

#modal-comments-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;

  scrollbar-width: thin;                 /* Firefox */
  scrollbar-color: transparent transparent;
}

/* Chrome / Edge / Opera */
#modal-comments-list::-webkit-scrollbar {
  width: 8px;
}

#modal-comments-list::-webkit-scrollbar-track {
  background: transparent;
}

#modal-comments-list::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  transition: background 0.2s ease;
}

/* Появляется при наведении */
#modal-comments-list:hover {
  scrollbar-color: rgba(125, 163, 167, 0.55) transparent;
}

#modal-comments-list:hover::-webkit-scrollbar-thumb {
  background: rgba(125, 163, 167, 0.55);
}

/* Чуть ярче при активной прокрутке/зажатии */
#modal-comments-list::-webkit-scrollbar-thumb:hover {
  background: rgba(4, 197, 191, 0.7);
}

.action-count,
.like-count,
.comment-count {
  position: relative;
  display: inline-block;
  min-width: 18px;
  height: 16px;
  overflow: hidden;
  vertical-align: middle;
  color: #48a8bc;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  text-align: left;
}

.count-value {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  display: block;
  will-change: transform, opacity;
}

.count-value.count-out-up {
  animation: countOutUp 0.22s ease forwards;
}

.count-value.count-in-up {
  animation: countInUp 0.22s ease forwards;
}

@keyframes countOutUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-110%);
    opacity: 0;
  }
}

@keyframes countInUp {
  from {
    transform: translateY(110%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.action-btn:hover .action-count,
.action-btn:hover .like-count,
.action-btn:hover .comment-count {
  color: #04c5bf;
}

.comment-edit-btn,
.comment-delete-btn,
.comment-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #8fb8bc;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
}

.comment-edit-btn:hover,
.comment-report-btn:hover {
  color: #dffefe;
}

.comment-delete-btn:hover {
  color: #ee0c6f;
}

.comment-edit-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30000;
  padding: 20px;
}

.comment-edit-modal.open {
  display: flex;
}

.comment-edit-modal-inner {
  width: min(520px, 94vw);
  background: linear-gradient(180deg, #14213a 0%, #0d162a 100%);
  border: 1px solid rgba(72, 168, 188, 0.2);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: commentEditModalShow 0.18s ease;
}

@keyframes commentEditModalShow {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.comment-edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
}

.comment-edit-modal-title {
  color: #f4f7ff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.comment-edit-modal-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

.comment-edit-modal-close:hover {
  background: rgba(255,255,255,0.12);
}

.comment-edit-modal-body {
  padding: 0 18px 16px;
}

.comment-edit-textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid #1f3558;
  border-radius: 10px;
  background: #050b17;
  color: #f4f7ff;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.45;
  outline: none;
  box-sizing: border-box;
}

.comment-edit-textarea:focus {
  border-color: #ff3b73;
  box-shadow: 0 0 0 3px rgba(255, 59, 115, 0.12);
}

.comment-edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

.comment-edit-cancel,
.comment-edit-save {
  min-width: 96px;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.comment-edit-cancel {
  background: #31476f;
  color: #d8e4ff;
}

.comment-edit-cancel:hover {
  background: #3a5486;
}

.comment-edit-save {
  background: #ff3b73;
  color: #fff;
}

.comment-edit-save:hover {
  background: #ff2a67;
}

.comment-menu-wrapper {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
}

.comment-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #8fb8bc;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  opacity: 0;
  transition:
    opacity 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.comment-item:hover .comment-menu-btn {
  opacity: 1;
}

.comment-menu-btn:hover {
  background: rgba(4, 197, 191, 0.08);
  color: #dffefe;
}

.comment-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 130px;
  padding: 6px;
  border: 1px solid #014b54;
  border-radius: 10px;
  background: #001821;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);

  display: flex;
  flex-direction: column;
  gap: 4px;

  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  visibility: hidden;
  z-index: 1000;

  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
  transform-origin: top right;
}

.comment-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

.comment-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #e3f4f5;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.16s ease, color 0.16s ease;
}

.comment-menu button:hover {
  background: rgba(4, 197, 191, 0.1);
}

.comment-menu .comment-delete-btn:hover {
  background: rgba(238, 12, 111, 0.12);
  color: #ff6b96;
}

.post-meta-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: -4px;
}

.post-menu-wrapper {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.post-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #456e73;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
  transition: background 0.18s ease, color 0.18s ease;
  position: relative;
  top: -2px;
}

.post-menu-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #14353a;
}

.post-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  padding: 6px;
  border: 1px solid rgba(0, 26, 46, 0.25);
  border-radius: 10px;
  background: #022a33;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);

  display: flex;
  flex-direction: column;
  gap: 4px;

  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  visibility: hidden;
  z-index: 1200;

  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  transform-origin: top right;
}

.post-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

.post-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #e3f4f5;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}

.post-menu button:hover {
  background: rgba(4, 197, 191, 0.1);
}

.post-menu .post-delete-btn:hover {
  background: rgba(238, 12, 111, 0.12);
  color: #ff6b96;
}

.post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.post-badge {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  color: #08353a;
  font-weight: 700;
}

.post-badge-ad {
  background: rgba(0, 0, 0, 0.14);
  color: #06272b;
}

.comment-btn.comments-disabled {
  opacity: 0.55;
}

.comment-btn.comments-disabled:hover {
  transform: none;
  opacity: 0.7;
}

.action-count.is-empty {
  opacity: 0;
  visibility: hidden;
  width: 0;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.post-username-link {
  text-decoration: none;
  color: var(--header-color);
  font-weight: bold;
}

.post-username-link:hover {
  text-decoration: none;
  opacity: 0.9;
}

.avatar a {
  display: block;
  width: 100%;
  height: 100%;
}

.avatar a img {
  display: block;
  width: 100%;
  height: 100%;
}

.sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(18, 217, 223, 0.35);
}

.sidebar .sidebar-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 1px solid rgba(18, 217, 223, 0.35);
  overflow: hidden;
}

.sidebar a .sidebar-avatar {
  border-radius: 50%;
}

.sidebar-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #031923;
  color: #12d9df;
  font-weight: 700;
  font-size: 16px;
}

.sidebar .sidebar-avatar,
.sidebar .sidebar-avatar-placeholder {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(18, 217, 223, 0.35);
  background: #031923;
  color: #12d9df;
  font-weight: 700;
  font-size: 16px;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar ul li:first-child a {
  padding-top: 10px;
  padding-bottom: 10px;
}

.post-modal-left .post-actions {
  display: flex;
  margin-top: 14px;
  padding: 10px 4px 0;
}

.post-modal-left .post-actions.under-bubble {
  width: 100%;
  box-sizing: border-box;
}

.post-modal-left .action-btn {
  cursor: pointer;
}

.post-modal-left .post-actions-in-modal {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(4, 197, 191, 0.14);
  box-sizing: border-box;
}

.post-modal-left .post-actions-in-modal .post-actions-left,
.post-modal-left .post-actions-in-modal .post-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-modal-left .post-actions-in-modal .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-modal-left .comment-btn,
.post-modal-left .comment-count {
  display: none !important;
}

.post-modal-left .post-actions-left {
  gap: 14px;
}

.modal-comment-form.is-disabled {
  justify-content: center;
}

.modal-comments-disabled {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(4, 197, 191, 0.08);
  border: 1px solid rgba(4, 197, 191, 0.18);
  color: #9fcfd2;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

/* =========================
   MODAL POST MEDIA LOGICS
========================= */

/* общий фикс: медиа-блок в модалке не должен менять высоту */
.post-modal-left .post-media.media-layout[data-mode="carousel"] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* главный файл всегда одной высоты */
.post-modal-left .post-media.media-layout[data-mode="carousel"] .carousel-main {
  height: 430px;
  min-height: 430px;
  max-height: 430px;
  flex: 0 0 430px;
}

/* 1 FILE: без нижнего списка */
.post-modal-left .post-media.carousel-single {
  height: 430px;
}

.post-modal-left .post-media.carousel-single .carousel-thumbs {
  display: none !important;
}

/* 2-5 FILES: фиксированная нижняя зона */
.post-modal-left .post-media.carousel-small {
  height: 560px;
}

.post-modal-left .post-media.carousel-small .carousel-thumbs {
  height: 118px;
  min-height: 118px;
  max-height: 118px;
  flex: 0 0 118px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;

  overflow: hidden;
}

.post-modal-left .post-media.carousel-small .thumb {
  flex: 1 1 0 !important;
  max-width: 90px;
  min-width: 60px;
  aspect-ratio: 1 / 1;

  opacity: 0.75;
  transform: scale(0.92);

  transition:
    flex 0.28s ease,
    max-width 0.28s ease,
    transform 0.28s ease,
    opacity 0.22s ease,
    box-shadow 0.28s ease;
}

.post-modal-left .post-media.carousel-small .thumb.active {
  flex: 2 1 0 !important;
  max-width: 120px;
  opacity: 1;
  transform: scale(1.04);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* 6-12 FILES: фиксируем высоту, но не меняем старую логику миниатюр */
.post-modal-left .post-media.carousel-large {
  height: 560px;
}

.post-modal-left .post-media.carousel-large .carousel-thumbs {
  height: 118px;
  min-height: 118px;
  max-height: 118px;
  flex: 0 0 118px;

  display: flex;
  align-items: center;
  overflow: hidden;
}

/* 6-12 FILES: больше места под выбранную миниатюру */
.post-modal-left .post-media.carousel-large {
  height: 640px;
}

.post-modal-left .post-media.carousel-large .carousel-thumbs {
  height: 170px;
  min-height: 170px;
  max-height: 170px;
  flex: 0 0 170px;

  display: flex;
  align-items: center;
  overflow: hidden;
}

/* активная миниатюра 6+ должна помещаться целиком */
.post-modal-left .post-media.carousel-large .thumb.active {
  height: 150px;
  max-height: 150px;
}

/* 6-12 FILES: плавность как у small */
.post-modal-left .post-media.carousel-large .thumb {
  flex: 1 1 0 !important;
  max-width: 90px;
  min-width: 60px;
  aspect-ratio: 1 / 1;

  opacity: 0.75;
  transform: scale(0.92);

  transition:
    flex 0.28s ease,
    max-width 0.28s ease,
    height 0.28s ease,
    transform 0.28s ease,
    opacity 0.22s ease,
    box-shadow 0.28s ease;
}

.post-modal-left .post-media.carousel-large .thumb.active {
  flex: 2 1 0 !important;
  max-width: 150px;
  height: 150px;
  max-height: 150px;

  opacity: 1;
  transform: scale(1.04);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* LARGE 6-12: лента без сжатия */
.post-modal-left .post-media.carousel-large .carousel-thumbs {
  justify-content: safe center;
  position: relative;
  height: 170px;
  min-height: 170px;
  max-height: 170px;
  flex: 0 0 170px;

  display: flex;
  align-items: center;
  gap: 12px;

  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.post-modal-left .post-media.carousel-large .carousel-thumbs::-webkit-scrollbar {
  display: none;
}

.post-modal-left .post-media.carousel-large .thumb {
  flex: 0 0 82px !important;
  width: 82px;
  height: 82px;
  min-width: 82px;
  opacity: 0.75;
  transform: scale(0.94);

  transition:
    width 0.28s ease,
    height 0.28s ease,
    transform 0.28s ease,
    opacity 0.22s ease,
    box-shadow 0.28s ease;
}

.post-modal-left .post-media.carousel-large .thumb.active {
  flex: 0 0 150px !important;
  width: 150px;
  height: 150px;
  min-width: 150px;

  opacity: 1;
  transform: scale(1);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* =========================
   FEED CAROUSEL: main + thumbnails
   только обычная лента, не модалка
========================= */

.feed .post-media.media-layout[data-mode="carousel"] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed .post-media.media-layout[data-mode="carousel"] .carousel-main {
  height: 420px;
  flex: 0 0 420px;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-small .carousel-thumbs {
  height: 118px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-small .thumb {
  flex: 0 0 90px !important;
  width: 90px;
  height: 90px;
  min-width: 90px;
  opacity: 0.75;
  transform: scale(0.92);
  transition:
    width 0.28s ease,
    height 0.28s ease,
    transform 0.28s ease,
    opacity 0.22s ease,
    box-shadow 0.28s ease;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-small .thumb.active {
  flex: 0 0 120px !important;
  width: 120px;
  height: 120px;
  min-width: 120px;
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* FEED carousel: фиксируем размер поста, чтобы он не прыгал */
.feed .post-media.media-layout[data-mode="carousel"] {
  height: 560px;
  min-height: 560px;
  max-height: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* главный файл всегда одинаковый */
.feed .post-media.media-layout[data-mode="carousel"] .carousel-main {
  height: 420px;
  min-height: 420px;
  max-height: 420px;
  flex: 0 0 420px;
}

/* нижняя зона миниатюр тоже фиксированная */
.feed .post-media.media-layout[data-mode="carousel"] .carousel-thumbs {
  height: 120px;
  min-height: 120px;
  max-height: 120px;
  flex: 0 0 120px;
  align-items: center;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-single {
  height: 420px;
  min-height: 420px;
  max-height: 420px;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-single .carousel-thumbs {
  display: none !important;
}

/* FEED carousel 6+ — даём активной миниатюре место */
.feed .post-media.media-layout[data-mode="carousel"].carousel-large {
  height: 610px;
  min-height: 610px;
  max-height: 610px;
  overflow: visible;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-large .carousel-main {
  height: 420px;
  min-height: 420px;
  max-height: 420px;
  flex: 0 0 420px;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-large .carousel-thumbs {
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  flex: 0 0 160px;

  align-items: center;
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 0 12px;
  scrollbar-width: none;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-large .carousel-thumbs::-webkit-scrollbar {
  display: none;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-large .thumb {
  flex: 0 0 82px !important;
  width: 82px;
  height: 82px;
  min-width: 82px;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-large .thumb.active {
  flex: 0 0 140px !important;
  width: 140px;
  height: 140px;
  min-width: 140px;
}

/* FEED carousel 6+ — плавный переход как у 2-5 */
.feed .post-media.media-layout[data-mode="carousel"].carousel-large .thumb {
  flex: 0 0 82px !important;
  width: 82px;
  height: 82px;
  min-width: 82px;

  opacity: 0.75;
  transform: scale(0.94);
  transform-origin: center;

  transition:
    flex-basis 0.28s ease,
    width 0.28s ease,
    min-width 0.28s ease,
    height 0.28s ease,
    transform 0.28s ease,
    opacity 0.22s ease,
    box-shadow 0.28s ease;
}

.feed .post-media.media-layout[data-mode="carousel"].carousel-large .thumb.active {
  flex: 0 0 140px !important;
  width: 140px;
  height: 140px;
  min-width: 140px;

  opacity: 1;
  transform: scale(1);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* FEED: фиксируем ширину bubble только для постов с carousel */
.feed .post:has(.post-media.media-layout[data-mode="carousel"]) .message-bubble {
  width: 700px;
  max-width: 700px;
  box-sizing: border-box;
}

/* carousel внутри bubble занимает всю ширину bubble */
.feed .post .post-media.media-layout[data-mode="carousel"] {
  width: 100%;
}

/* главный файл не должен менять ширину поста */
.feed .post .post-media.media-layout[data-mode="carousel"] .carousel-main {
  width: 100%;
}

/* FEED: carousel-пост получает ширину самого широкого файла */
.feed .post:has(.post-media.media-layout[data-mode="carousel"]) .message-bubble {
  width: var(--stable-carousel-width, auto);
  max-width: 700px;
  min-width: 360px;
  box-sizing: border-box;
  transition: width 0.2s ease;
}

.feed .post .post-media.media-layout[data-mode="carousel"] {
  width: 100%;
}

.feed .post .post-media.media-layout[data-mode="carousel"] .carousel-main {
  width: 100%;
}

.feed .post .message-bubble.carousel-width-ready {
  width: var(--stable-carousel-width);
  max-width: 700px;
  min-width: 360px;
  box-sizing: border-box;
  transition: width 0.2s ease;
}

.feed .post .post-media.media-layout[data-mode="carousel"],
.feed .post .post-media.media-layout[data-mode="carousel"] .carousel-main {
  width: 100%;
}

.feed .post .post-media.carousel-large .carousel-thumbs {
  justify-content: center;
}

.feed .post .post-media.carousel-large .carousel-thumbs:has(.thumb:nth-child(8)) {
  justify-content: flex-start;
}

.share-soon-modal {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.share-soon-modal.open {
  display: flex;
}

.share-soon-modal-inner {
  position: relative;
  width: min(420px, 92vw);
  padding: 24px;
  border-radius: 18px;
  background: #001018;
  border: 1px solid rgba(4, 197, 191, 0.28);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
  color: #dffefe;
  text-align: center;
}

.share-soon-modal-inner h3 {
  margin: 0 0 10px;
  color: #04c5bf;
  font-size: 22px;
}

.share-soon-modal-inner p {
  margin: 0 0 20px;
  color: #9fcfd2;
  line-height: 1.4;
}

.share-soon-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #dffefe;
  font-size: 24px;
  cursor: pointer;
}

.share-soon-ok {
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  background: #04c5bf;
  color: #001018;
  font-weight: 700;
  cursor: pointer;
}

.feed .post {
  width: fit-content;
  max-width: 700px;
}

.feed .post.current-user {
  animation-name: chatPostInRight;
  align-self: flex-end;
  margin-left: auto;
  margin-right: 24px;
}

.feed .post.other-user {
  animation-name: chatPostInLeft;
  align-self: flex-start;
  margin-left: 24px;
  margin-right: auto;
}

@keyframes chatPostInRight {
  from {
    opacity: 0;
    transform: translateX(24px) translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes chatPostInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px) translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

.feed .post.current-user .message-bubble {
  border-top-right-radius: 0;
}

.feed .post.other-user .message-bubble {
  border-top-left-radius: 0;
}

.feed .post.current-user .avatar {
  right: -52px;
  left: auto;
}

.feed .post.other-user .avatar {
  left: -52px;
  right: auto;
}

.share-soon-modal {
  position: fixed;
  inset: 0;
  z-index: 40000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.share-soon-modal.open {
  display: flex;
}

.share-soon-modal-inner {
  position: relative;
  width: min(420px, 92vw);
  padding: 24px 22px 20px;
  border-radius: 18px;
  background: #001821;
  border: 1px solid rgba(4, 197, 191, 0.25);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
  color: #e3f4f5;
  text-align: center;
}

.share-soon-modal-inner h3 {
  margin: 0 0 10px;
  color: #04c5bf;
  font-size: 22px;
}

.share-soon-modal-inner p {
  margin: 0 0 18px;
  color: #9fcfd2;
  line-height: 1.45;
}

.share-soon-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
}

.share-soon-ok {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  background: #04c5bf;
  color: #001018;
  font-weight: 700;
  cursor: pointer;
}

.feed .post:hover {
  transform: translateY(-0.5px);
  transition: transform 0.15s ease;
}

.bookmarks-page {
  margin-left: 270px;
  min-height: 100vh;
  padding: 46px 48px 80px;
  background:
    radial-gradient(circle at top left, rgba(4, 197, 191, 0.08), transparent 34%),
    #000d18;
  box-sizing: border-box;
}

.bookmarks-header {
  max-width: 820px;
  margin: 0 auto 26px;
}

.bookmarks-header h1 {
  margin: 0 0 8px;
  color: #eaffff;
  font-size: 34px;
  letter-spacing: 0.2px;
}

.bookmarks-header p {
  margin: 0;
  color: #7da3a7;
  font-size: 15px;
}

.bookmarks-feed {
  max-width: 1040px;
  margin: 0 auto;
}

.bookmarks-empty {
  width: min(520px, 92%);
  margin: 80px auto 0;
  padding: 34px 30px;
  border: 1px solid rgba(4, 197, 191, 0.18);
  border-radius: 24px;
  background: rgba(0, 24, 33, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.bookmarks-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border: 1px solid rgba(4, 197, 191, 0.35);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 197, 191, 0.08);
}

.bookmarks-empty-icon img {
  width: 34px;
  height: 34px;
  opacity: 0.95;
}

.bookmarks-empty h2 {
  margin: 0 0 8px;
  color: #eaffff;
  font-size: 24px;
}

.bookmarks-empty p {
  margin: 0 0 22px;
  color: #8fb8bc;
}

.bookmarks-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 12px;
  background: #04c5bf;
  color: #001018;
  text-decoration: none;
  font-weight: 700;
}

.bookmarks-empty-btn:hover {
  background: #03b3ad;
}

/* FIX: video in lightbox must not cover close/arrows */
.media-lightbox .lb-inner {
  position: relative;
}

.media-lightbox .lb-body {
  position: relative;
  z-index: 1;
}

.media-lightbox .lb-body video {
  position: relative;
  z-index: 2;
}

.media-lightbox .lb-close,
.media-lightbox .lb-nav {
  position: absolute;
  z-index: 50;
  pointer-events: auto;
}

.media-lightbox .lb-close {
  top: 12px;
  right: 12px;
}

.media-lightbox .lb-prev {
  left: 14px;
}

.media-lightbox .lb-next {
  right: 14px;
}

html {
  scrollbar-gutter: stable;
}

/* === Unified avatar fallback === */

.avatar-fallback,
.comment-avatar-fallback,
.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(4, 197, 191, 0.12);
  border: 2px solid #04c5bf;
  color: #04c5bf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  box-sizing: border-box;
}

.avatar-fallback {
  font-size: 16px;
}

.comment-avatar-fallback {
  font-size: 13px;
}

.profile-avatar-fallback {
  font-size: 46px;
}

/* === Avatar fallback link reset === */

.avatar a,
.comment-avatar a,
.profile-avatar-wrap a {
  text-decoration: none !important;
  color: inherit !important;
}

.avatar a:hover,
.avatar a:active,
.avatar a:focus,
.avatar a:visited {
  text-decoration: none !important;
  color: inherit !important;
}

.avatar-fallback,
.avatar-fallback:hover,
.avatar-fallback:active,
.avatar-fallback:focus,
.avatar a:active .avatar-fallback,
.avatar a:focus .avatar-fallback,
.avatar a:visited .avatar-fallback {
  text-decoration: none !important;
  color: #04c5bf !important;
}

.avatar a:focus {
  outline: none;
}

.avatar a:focus-visible {
  outline: 2px solid rgba(4, 197, 191, 0.5);
  outline-offset: 3px;
  border-radius: 50%;
}

/* === Comment actions menu === */

.comment-menu {
  display: none;
}

.comment-menu-wrapper.open .comment-menu {
  display: flex;
}

.comment-menu-wrapper {
  position: relative;
}

.comment-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 50;
  flex-direction: column;
  min-width: 130px;
  padding: 8px;
  border-radius: 12px;
  background: #00131d;
  border: 1px solid rgba(4, 197, 191, 0.22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.comment-menu button {
  border: none;
  background: transparent;
  color: #dffcff;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
}

.comment-menu button:hover {
  background: rgba(4, 197, 191, 0.1);
  color: #04c5bf;
}

.comment-actions button {
  cursor: pointer;
}

/* === Comment three-dots menu final fix === */

.comment-menu-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible !important;
}

.comment-menu-btn {
  position: relative;
  z-index: 20;
  cursor: pointer;
}

.comment-menu {
  display: none !important;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 999;

  min-width: 135px;
  padding: 8px;

  flex-direction: column;
  gap: 4px;

  background: #00131d;
  border: 1px solid rgba(4, 197, 191, 0.28);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.comment-menu-wrapper.open .comment-menu {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.comment-menu button {
  width: 100%;
  border: none;
  background: transparent;
  color: #dffcff;
  padding: 8px 10px;
  border-radius: 8px;

  text-align: left;
  cursor: pointer;

  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.comment-menu button:hover {
  background: rgba(4, 197, 191, 0.12);
  color: #04c5bf;
}

/* Чтобы меню не обрезалось внутри комментария */
.comment-thread,
.comment-item,
.comment-body,
.comment-actions {
  overflow: visible !important;
}

/* === Tatzo toast notifications === */

.tatzo-toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 200000;

  display: flex;
  flex-direction: column;
  gap: 12px;

  width: min(92vw, 380px);
  pointer-events: none;
}

.tatzo-toast {
  width: 100%;
  min-height: 72px;
  padding: 14px 14px;

  display: grid;
  grid-template-columns: 42px 1fr 28px;
  gap: 12px;
  align-items: center;

  background: rgba(0, 18, 28, 0.96);
  border: 1px solid rgba(4, 197, 191, 0.22);
  border-radius: 18px;

  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(4, 197, 191, 0.08);

  backdrop-filter: blur(8px);

  transform: translateX(18px);
  opacity: 0;

  transition:
    opacity 0.22s ease,
    transform 0.22s ease;

  pointer-events: auto;
  box-sizing: border-box;
}

.tatzo-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.tatzo-toast.hide {
  opacity: 0;
  transform: translateX(18px);
}

.tatzo-toast-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(4, 197, 191, 0.12);
  border: 1px solid rgba(4, 197, 191, 0.34);

  color: #04c5bf;
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.tatzo-toast-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tatzo-toast-content strong {
  color: #eaffff;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.tatzo-toast-content span {
  color: rgba(223, 252, 255, 0.78);
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.tatzo-toast-close {
  width: 28px;
  height: 28px;

  border: none;
  border-radius: 50%;
  background: transparent;

  color: rgba(223, 252, 255, 0.62);
  font-size: 22px;
  line-height: 1;

  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.tatzo-toast-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.tatzo-toast-success {
  border-color: rgba(4, 197, 191, 0.34);
}

.tatzo-toast-success .tatzo-toast-icon {
  color: #04c5bf;
}

.tatzo-toast-error {
  border-color: rgba(238, 12, 111, 0.42);
}

.tatzo-toast-error .tatzo-toast-icon {
  background: rgba(238, 12, 111, 0.12);
  border-color: rgba(238, 12, 111, 0.38);
  color: #ff4f91;
}

.tatzo-toast-info {
  border-color: rgba(18, 217, 223, 0.26);
}

/* ===== SIDEBAR CHAT BADGE ===== */

.sidebar ul li a,
.sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.sidebar ul li a span,
.sidebar .sidebar-link span {
  display: inline-flex;
  align-items: center;
}

.sidebar-badge {
  margin-left: auto;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 1.5px solid rgba(255, 0, 119, 0.55);

  background: rgba(255, 0, 119, 0.10);
  color: #ff0c6f;

  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 12px rgba(255, 0, 119, 0.12);
  flex-shrink: 0;
}

/* если хочешь чуть ярче при active */
.sidebar ul li a.active .sidebar-badge,
.sidebar .sidebar-link.active .sidebar-badge {
  background: rgba(255, 0, 119, 0.16);
  border-color: rgba(255, 0, 119, 0.75);
  color: #ff2b86;
}

/* =========================
   SIDEBAR CHAT BADGE
========================= */

.sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

.sidebar ul li a > span:not(.sidebar-badge) {
  display: inline-flex;
  align-items: center;
}

.sidebar-badge {
  margin-left: auto;

  min-width: 24px;
  height: 24px;
  padding: 0 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 1px solid rgba(238, 12, 111, 0.72);

  background: rgba(238, 12, 111, 0.12);
  color: #ff2b86;

  font-size: 12px;
  font-weight: 900;
  line-height: 1;

  box-shadow:
    0 0 0 1px rgba(238, 12, 111, 0.08),
    0 0 14px rgba(238, 12, 111, 0.16);

  flex-shrink: 0;
}

.sidebar ul li a.active .sidebar-badge {
  background: rgba(238, 12, 111, 0.18);
  border-color: rgba(238, 12, 111, 0.95);
  color: #ff4f9a;
}

/* =========================
   SIDEBAR CHAT BADGE FINAL
========================= */

.sidebar ul li a {
  width: 100%;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
}

.sidebar ul li a img,
.sidebar ul li a .sidebar-avatar,
.sidebar ul li a .sidebar-avatar-placeholder {
  grid-column: 1;
  margin-right: 0 !important;
}

.sidebar ul li a > span:not(.sidebar-badge) {
  grid-column: 2;
  min-width: 0;
}

.sidebar-badge {
  grid-column: 3;
  justify-self: end;

  min-width: 24px;
  height: 22px;
  padding: 0 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background: rgba(238, 12, 111, 0.14);
  border: 1px solid rgba(238, 12, 111, 0.85);
  color: #ff2b86;

  font-size: 12px;
  font-weight: 900;
  line-height: 1;

  box-shadow:
    0 0 0 1px rgba(238, 12, 111, 0.08),
    0 0 14px rgba(238, 12, 111, 0.22);

  text-shadow: 0 0 10px rgba(238, 12, 111, 0.35);
}

/* active / hover */
.sidebar ul li a.active .sidebar-badge,
.sidebar ul li a:hover .sidebar-badge {
  background: rgba(238, 12, 111, 0.22);
  border-color: #ee0c6f;
  color: #ff4f9a;

  box-shadow:
    0 0 0 1px rgba(238, 12, 111, 0.16),
    0 0 18px rgba(238, 12, 111, 0.32);
}

/* =========================
   LANGUAGE SWITCHER
========================= */

.sidebar-language {
  margin-top: 14px;
  padding: 0 18px 18px;
}

.language-switcher {
  width: 100%;
}

.language-switcher select {
  width: 100%;
  height: 42px;

  padding: 0 12px;

  border-radius: 14px;
  border: 1px solid rgba(4, 197, 191, 0.22);
  background: rgba(0, 18, 28, 0.96);

  color: #04c5bf;

  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 800;

  outline: none;
  cursor: pointer;
}

.language-switcher select:focus {
  border-color: #04c5bf;
  box-shadow: 0 0 0 3px rgba(4, 197, 191, 0.08);
}

/* =========================
   SIDEBAR MORE MENU
========================= */

.sidebar-more-item {
  position: relative;
}

.sidebar-more-trigger {
  width: 100%;

  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;

  padding: 10px 12px;

  border: none;
  border-radius: 12px;
  background: transparent;

  color: #04c5bf;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  text-align: left;

  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.sidebar-more-trigger img {
  width: 34px;
  height: 34px;
}

.sidebar-more-trigger:hover,
.sidebar-more-trigger.active {
  background: rgba(4, 197, 191, 0.08);
  color: #ee0c6f;
}

.sidebar-more-menu {
  position: absolute;
  left: 12px;
  bottom: 58px;
  z-index: 80;

  width: 230px;
  padding: 14px;

  border-radius: 18px;
  border: 1px solid rgba(4, 197, 191, 0.24);
  background: rgba(0, 18, 28, 0.98);

  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(4, 197, 191, 0.08);

  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;

  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.sidebar-more-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sidebar-more-title {
  margin-bottom: 12px;

  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.sidebar-language-form {
  display: grid;
  gap: 7px;

  margin-bottom: 12px;
}

.sidebar-language-form label {
  color: rgba(223, 252, 255, 0.66);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-language-form select {
  width: 100%;
  height: 42px;

  padding: 0 12px;

  border-radius: 13px;
  border: 1px solid rgba(4, 197, 191, 0.26);
  background: rgba(0, 13, 24, 0.95);

  color: #04c5bf;

  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 900;

  outline: none;
  cursor: pointer;
}

.sidebar-language-form select:focus {
  border-color: #04c5bf;
  box-shadow: 0 0 0 3px rgba(4, 197, 191, 0.08);
}

.sidebar-more-link {
  width: 100%;
  min-height: 42px;

  display: flex;
  align-items: center;

  padding: 0 12px;

  border-radius: 13px;
  border: 1px solid rgba(238, 12, 111, 0.28);
  background: rgba(238, 12, 111, 0.08);

  color: #ff2b86;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 900;
  text-align: left;

  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.sidebar-more-link:hover {
  transform: translateY(-1px);
  background: rgba(238, 12, 111, 0.14);
  border-color: rgba(238, 12, 111, 0.62);
}

.sidebar-more-note {
  margin-top: 12px;

  color: rgba(223, 252, 255, 0.48);
  font-size: 11px;
  line-height: 1.35;
}

.coming-soon-page {
  min-height: 100vh;
  margin-left: 260px;
  padding: 70px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000a12;
}

.coming-soon-card {
  width: min(620px, 100%);
  padding: 42px 36px;
  border: 1px solid rgba(4, 197, 191, 0.22);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(4, 197, 191, 0.16), transparent 36%),
    radial-gradient(circle at bottom right, rgba(238, 12, 111, 0.14), transparent 34%),
    rgba(4, 12, 20, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.coming-soon-icon {
  width: 86px;
  height: 86px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  background: rgba(4, 197, 191, 0.12);
  border: 1px solid rgba(4, 197, 191, 0.28);
  font-size: 42px;
}

.coming-soon-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(238, 12, 111, 0.12);
  border: 1px solid rgba(238, 12, 111, 0.32);
  color: #ee0c6f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coming-soon-card h1 {
  margin: 0 0 12px;
  color: #e9ffff;
  font-size: 36px;
  line-height: 1.1;
}

.coming-soon-card p {
  max-width: 480px;
  margin: 0 auto 22px;
  color: rgba(227, 244, 245, 0.78);
  font-size: 16px;
  line-height: 1.6;
}

.coming-soon-note {
  margin: 26px auto;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(227, 244, 245, 0.68);
  font-size: 14px;
  line-height: 1.55;
}

.coming-soon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: #04c5bf;
  color: #001014;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.coming-soon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(4, 197, 191, 0.25);
}

@media (max-width: 900px) {
  .coming-soon-page {
    margin-left: 0;
    padding: 90px 18px 40px;
  }

  .coming-soon-card {
    padding: 34px 22px;
  }

  .coming-soon-card h1 {
    font-size: 30px;
  }
}

.fancy-empty-card {
  position: relative;
  overflow: hidden;
  max-width: 720px;
  margin: 80px auto 0;
  padding: 48px 40px;
  text-align: center;
  border-radius: 32px;
  border: 1px solid rgba(4, 197, 191, 0.22);
  background: rgba(2, 16, 24, 0.92);
}

.fancy-empty-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(4, 197, 191, 0.14) 0%,
    rgba(4, 197, 191, 0.04) 35%,
    rgba(238, 12, 111, 0.10) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.fancy-empty-card > * {
  position: relative;
  z-index: 1;
}

.bookmarks-empty-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  border: 1px solid rgba(4, 197, 191, 0.22);
  background: rgba(4, 197, 191, 0.08);
}

.bookmarks-empty-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(238, 12, 111, 0.45);
  background: rgba(238, 12, 111, 0.08);
  color: #ff2b86;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.fancy-empty-card h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
}

.fancy-empty-card p {
  max-width: 560px;
  margin: 0 auto 28px;
  color: #c9d7e1;
  font-size: 22px;
  line-height: 1.6;
}

.bookmarks-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 18px;
  background: #19d4d4;
  color: #03131b;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bookmarks-empty-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(25, 212, 212, 0.22);
}

/* ==============================
   COMING SOON PAGE FIX
============================== */

.coming-soon-page {
  margin-left: 260px;
  width: calc(100% - 260px);
  height: 100dvh;
  min-height: 100dvh;
  padding: 24px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #000a12;
  overflow: hidden;
}

.coming-soon-card {
  position: relative;
  overflow: hidden;

  width: min(560px, 100%);
  padding: 34px 32px;
  border-radius: 28px;
  border: 1px solid rgba(4, 197, 191, 0.24);

  background: rgba(2, 16, 24, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  text-align: center;
  z-index: 1;
}

.coming-soon-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(4, 197, 191, 0.13) 0%,
    rgba(4, 197, 191, 0.025) 42%,
    rgba(238, 12, 111, 0.12) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.coming-soon-card > * {
  position: relative;
  z-index: 1;
}

.coming-soon-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 24px;
  background: rgba(4, 197, 191, 0.10);
  border: 1px solid rgba(4, 197, 191, 0.28);
  font-size: 34px;
}

.coming-soon-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 14px;

  border-radius: 999px;
  background: rgba(238, 12, 111, 0.12);
  border: 1px solid rgba(238, 12, 111, 0.42);

  color: #ee0c6f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coming-soon-card h1 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 900;
}

.coming-soon-card p {
  max-width: 460px;
  margin: 0 auto 22px;
  color: rgba(227, 244, 245, 0.88);
  font-size: 16px;
  line-height: 1.55;
}

.coming-soon-note {
  margin: 24px auto;
  padding: 15px 18px;

  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);

  color: rgba(227, 244, 245, 0.72);
  font-size: 14px;
  line-height: 1.5;
}

.coming-soon-btn {
  min-height: 42px;
  padding: 0 24px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  background: #04c5bf;
  color: #001014;

  font-size: 15px;
  font-weight: 900;
  text-decoration: none;

  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.coming-soon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(4, 197, 191, 0.24);
}

@media (max-width: 900px) {
  .coming-soon-page {
    margin-left: 0;
    width: 100%;
    padding: 18px;
  }

  .coming-soon-card {
    padding: 30px 22px;
  }

  .coming-soon-card h1 {
    font-size: 30px;
  }
}


/* ==============================
   BOOKMARKS EMPTY FANCY CARD TWEAK
============================== */

.fancy-empty-card {
  width: min(560px, 100%);
  margin: 72px auto 0;
  padding: 34px 32px;
  border-radius: 28px;
}

.fancy-empty-card h2 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.1;
}

.fancy-empty-card p {
  max-width: 440px;
  margin: 0 auto 26px;
  font-size: 17px;
  line-height: 1.55;
}

.bookmarks-empty-icon {
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  border-radius: 24px;
}

.bookmarks-empty-icon img {
  width: 32px;
  height: 32px;
}

.coming-soon-badge {
  margin-bottom: 16px;
  padding: 6px 14px;
  font-size: 12px;
}

.bookmarks-empty-btn {
  min-height: 42px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
}

/* ==============================
   SIDEBAR MORE POSITION ONLY
============================== */

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sidebar-main-menu {
  flex: 1;
}

.sidebar .more {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(4, 197, 191, 0.12);
  flex-shrink: 0;
}

.sidebar-more-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

/* ==============================
   SIDEBAR FONT + MORE COLOR FINAL
============================== */

.sidebar,
.sidebar a,
.sidebar a span,
.sidebar button,
.sidebar button span {
  font-family: "Poppins", Arial, sans-serif;
}

.sidebar ul li a,
.sidebar-more-trigger {
  color: #48a8bc;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.sidebar ul li a.active,
.sidebar ul li a:hover,
.sidebar-more-trigger:hover,
.sidebar-more-trigger.active {
  color: #ee0c6f;
}

.sidebar-more-trigger {
  color: #48a8bc !important;
}

.sidebar-more-trigger span {
  color: inherit;
}

.sidebar-more-trigger img {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

/* чтобы More не становился тёмным после клика */
.sidebar-more-trigger:focus,
.sidebar-more-trigger:active {
  color: #48a8bc !important;
  outline: none;
}

.sidebar-more-trigger.active {
  color: #ee0c6f !important;
}

/* ==============================
   REPORT PROBLEM PAGE
============================== */

.report-page {
  margin-left: 260px;
  width: calc(100% - 260px);
  height: 100dvh;
  min-height: 100dvh;
  padding: 24px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #000a12;
  overflow: hidden;
}

.report-card {
  position: relative;
  overflow: hidden;

  width: min(640px, 100%);
  padding: 34px 32px;
  border-radius: 28px;
  border: 1px solid rgba(4, 197, 191, 0.24);

  background: rgba(2, 16, 24, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  text-align: center;
}

.report-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(4, 197, 191, 0.13) 0%,
    rgba(4, 197, 191, 0.025) 42%,
    rgba(238, 12, 111, 0.12) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.report-card > * {
  position: relative;
  z-index: 1;
}

.report-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 24px;
  background: rgba(4, 197, 191, 0.10);
  border: 1px solid rgba(4, 197, 191, 0.28);
  font-size: 34px;
}

.report-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 14px;

  border-radius: 999px;
  background: rgba(238, 12, 111, 0.12);
  border: 1px solid rgba(238, 12, 111, 0.42);

  color: #ee0c6f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-card h1 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 900;
}

.report-intro {
  max-width: 500px;
  margin: 0 auto 24px;
  color: rgba(227, 244, 245, 0.82);
  font-size: 15px;
  line-height: 1.5;
}

.report-form {
  text-align: left;
}

.report-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.report-form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.report-form-field-full {
  grid-column: 1 / -1;
}

.report-form-field label {
  color: rgba(223, 252, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.report-field,
.report-textarea {
  width: 100%;
  box-sizing: border-box;

  border-radius: 14px;
  border: 1px solid rgba(4, 197, 191, 0.25);
  background: rgba(0, 13, 24, 0.88);

  color: #eaffff;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 14px;

  outline: none;
}

.report-field {
  height: 44px;
  padding: 0 14px;
}

.report-textarea {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.report-field:focus,
.report-textarea:focus {
  border-color: #04c5bf;
  box-shadow: 0 0 0 3px rgba(4, 197, 191, 0.08);
}

.report-file {
  color: rgba(223, 252, 255, 0.75);
  font-size: 13px;
}

.report-form-field small {
  color: rgba(223, 252, 255, 0.48);
  font-size: 12px;
}

.report-actions {
  margin-top: 22px;

  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.report-cancel,
.report-submit {
  min-height: 42px;
  padding: 0 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.report-cancel {
  border: 1px solid rgba(223, 252, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(223, 252, 255, 0.78);
}

.report-submit {
  border: none;
  background: #04c5bf;
  color: #001014;
}

.report-errors {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(238, 12, 111, 0.32);
  background: rgba(238, 12, 111, 0.08);
  color: #ff8ab7;
  font-size: 13px;
}

@media (max-width: 900px) {
  .report-page {
    margin-left: 0;
    width: 100%;
    padding: 18px;
  }

  .report-card {
    padding: 30px 22px;
  }

  .report-card h1 {
    font-size: 30px;
  }

  .report-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   MORE MENU REPORT BUTTON FIX
============================== */

.sidebar-more-menu .sidebar-more-link {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(238, 12, 111, 0.32);
  background: rgba(238, 12, 111, 0.08);

  color: #ff2b86;
  text-decoration: none;

  font-family: "Poppins", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;

  cursor: pointer;
}

.sidebar-more-menu .sidebar-more-link span {
  display: inline;
  color: inherit;
  white-space: nowrap;
}

.sidebar-more-menu .sidebar-more-link:hover {
  background: rgba(238, 12, 111, 0.14);
  border-color: rgba(238, 12, 111, 0.62);
  color: #ff4f9a;
  transform: none;
}

/* ==============================
   RECOMMENDATIONS FINAL FIX
============================== */

.suggestions {
  position: fixed;
  top: 80px;
  right: 20px;

  width: 260px;
  padding: 18px;

  border-radius: 24px;
  border: 1px solid rgba(4, 197, 191, 0.18);

  background:
    radial-gradient(circle at top left, rgba(4, 197, 191, 0.12), transparent 34%),
    rgba(0, 10, 18, 0.94);

  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);

  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.suggestions-header {
  margin-bottom: 16px;
}

.suggestions-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;

  border-radius: 999px;
  border: 1px solid rgba(238, 12, 111, 0.34);
  background: rgba(238, 12, 111, 0.08);

  color: #ff2b86;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.suggestions h3 {
  margin: 0 0 6px;

  color: #eaffff;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 20px;
  font-weight: 900;
}

.suggestions-header p {
  margin: 0;

  color: rgba(223, 252, 255, 0.58);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggested-profile-card {
  position: relative;

  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;

  padding: 12px;

  border-radius: 18px;
  border: 1px solid rgba(4, 197, 191, 0.12);
  background: rgba(0, 26, 46, 0.42);

  color: inherit !important;
  text-decoration: none !important;

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

.suggested-profile-card:hover {
  transform: translateY(-2px);
  border-color: rgba(4, 197, 191, 0.38);
  background: rgba(4, 197, 191, 0.08);
  box-shadow: 0 12px 28px rgba(4, 197, 191, 0.08);
}

.suggested-avatar {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px;
  min-height: 46px;

  border-radius: 50%;
  overflow: hidden;

  border: 1px solid rgba(4, 197, 191, 0.36);
  background: rgba(4, 197, 191, 0.08);
}

.suggested-avatar img {
  width: 100% !important;
  height: 100% !important;
  display: block;

  object-fit: cover;
  border-radius: 50%;
}

.suggested-avatar-fallback {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #04c5bf;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
}

.suggested-info {
  min-width: 0;
}

.suggested-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.suggested-username {
  min-width: 0;

  color: #eaffff;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.suggested-verified {
  width: 17px;
  height: 17px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: rgba(4, 197, 191, 0.16);
  border: 1px solid rgba(4, 197, 191, 0.5);

  color: #04c5bf;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

.suggested-tag {
  display: block;
  margin-top: 3px;

  color: rgba(223, 252, 255, 0.56);
  font-size: 12px;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.suggested-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;

  margin-top: 8px;
}

.suggested-badges span {
  display: inline-flex;
  padding: 4px 8px;

  border-radius: 999px;
  background: rgba(4, 197, 191, 0.1);
  border: 1px solid rgba(4, 197, 191, 0.18);

  color: #48a8bc;
  font-size: 10px;
  font-weight: 900;
}

.suggested-view {
  grid-column: 1 / -1;

  margin-top: 2px;
  padding-top: 9px;

  border-top: 1px solid rgba(223, 252, 255, 0.06);

  color: #04c5bf;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.suggestions-empty {
  padding: 20px 14px;

  border-radius: 18px;
  border: 1px solid rgba(4, 197, 191, 0.12);
  background: rgba(0, 26, 46, 0.32);

  text-align: center;
}

.suggestions-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;
  background: rgba(4, 197, 191, 0.08);
  border: 1px solid rgba(4, 197, 191, 0.18);

  color: #04c5bf;
  font-size: 22px;
}

.suggestions-empty strong {
  display: block;
  margin-bottom: 6px;

  color: #eaffff;
  font-size: 14px;
}

.suggestions-empty p {
  margin: 0;

  color: rgba(223, 252, 255, 0.55);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .suggestions {
    display: none;
  }

  .main-content {
    margin-right: 20px;
  }
}