@import url("https://fonts.googleapis.com/css2?family=Geologica:wght@300;400;500;600&family=Manrope:wght@500;600;700;800&family=Rubik:wght@400;500;600;700&display=swap");

/* ==========================================================================
   TRENDMAP MAIN STYLES
   Полная версия стилей: layout, sidebar, topbar, filters, trend cards.
   ========================================================================== */

/* THEME TOKENS: базовые цвета интерфейса */
:root {
  --bg: #05090a;
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.14);
  --green: #84ff5a;
  --green-soft: rgba(132,255,90,0.16);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);
  --card: #0b1214;
}

/* BASE RESET: общий сброс и шрифт */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at 55% 0%, rgba(81,255,100,0.07), transparent 30%), var(--bg);
  color: var(--text);
  font-family: "Rubik", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

/* APP LAYOUT: левая панель и основная область */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) !important;
}

/* TRENDMAP COLLAPSED MAIN AREA START */
.app-shell.sidebar-collapsed .main-area {
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  grid-column: 1 / -1 !important;
}
/* TRENDMAP COLLAPSED MAIN AREA END */


.app-shell.sidebar-collapsed .sidebar {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.app-shell.sidebar-collapsed .sidebar-open {
  display: grid;
}

/* SIDEBAR: левая навигационная панель */
.sidebar {
  min-width: 0;
  min-height: 100vh;
  padding: 18px 12px 16px 16px;
  background: rgba(5,10,12,0.98);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
}

/* SIDEBAR BUTTONS: кнопки свернуть/развернуть */
.sidebar-open {
  position: fixed;
  left: 12px;
  top: 18px;
  z-index: 50;
  display: none;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.82);
}

.icon-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.82);
}

/* BRAND: логотип TrendMap */
.brand--home {
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.brand--home:hover .brand__name {
  color: #b5ff9d;
}

.brand--home:focus-visible {
  outline: 2px solid rgba(132,255,90,0.72);
  outline-offset: 5px;
  border-radius: 8px;
}

.brand-row {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand__logo {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  color: var(--green);
}

.brand__name {
  color: var(--green);
  font-size: 21px;
  font-weight: 820;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

/* USER CARD: блок аккаунта в сайдбаре */
.user-card {
  min-height: 62px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line-strong);
}

.user-card__avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #63d653, #2e913b);
  color: #fff;
  font-size: 14px;
  font-weight: 820;
}

.user-card__name {
  color: #fff;
  font-size: 14px;
  font-weight: 760;
}

.user-card__status {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

/* SIDEBAR NAVIGATION: сохраненные и уведомления */
.sidebar-nav {
  margin: 13px 0 16px;
  display: grid;
  gap: 6px;
}

.sidebar-link {
  min-height: 29px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.80);
  text-decoration: none;
  font-size: 14px;
}

.sidebar-link__badge {
  margin-left: auto;
  min-width: 23px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: #baff9e;
  font-size: 12px;
  font-weight: 760;
}

/* CATEGORIES: список категорий */
.categories-head {
  width: 100%;
  min-height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  text-align: left;
}

.categories-head__chevron {
  color: var(--green);
  transition: transform 160ms ease;
}

.categories-panel--collapsed .categories-list {
  display: none;
}

.categories-panel--collapsed .categories-head__chevron {
  transform: rotate(180deg);
}

.categories-list {
  margin-top: 10px;
  display: grid;
  gap: 4px;
}

.category-card {
  width: 100%;
  min-height: 34px;
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.78);
  text-align: left;
}

.category-card__icon {
  width: 17px;
  flex: 0 0 17px;
  padding-top: 1px;
  text-align: center;
  opacity: 0.86;
}

.category-card__name {
  min-width: 0;
  font-size: 13px;
  line-height: 1.28;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* MAIN AREA: правая область приложения */
.main-area {
  min-width: 0;
  overflow: hidden;
}

/* TOPBAR: верхняя панель */
.topbar {
  height: 64px;
  padding: 0 20px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6,12,14,0.86);
  border-bottom: 1px solid var(--line);
}

/* STATUS TABS: Растущие / Топ / Затухающие */
.status-tabs {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.status-tab {
  position: relative;
  height: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.78);
  font-size: 15px;
  font-weight: 760;
}

.status-tab--active {
  color: var(--green);
}

.status-tab--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--green);
}

/* PLATFORM TABS: переключатели платформ */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.platform-tabs {
  display: flex;
  height: 34px;
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.035);
}

.platform-tab {
  height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 740;
  white-space: nowrap;
}

.platform-tab:first-child {
  border-left: 0;
}

.platform-tab--active {
  background: var(--green-soft);
  color: #e0ffd8;
}

.platform-icon {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

/* TOPBAR AVATAR: аватар справа */
.topbar-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #63d653, #2e913b);
  color: #fff;
  font-size: 14px;
  font-weight: 820;
}

.online-dot {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #071011;
}

/* PAGE HEADER: заголовок и фильтры */
.page {
  padding: 0 20px 28px 24px;
}

.page-head {
  padding: 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-head h1 {
  margin: 0;
  color: #fff;
  font-family: "Geologica", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.026em;
}

.page-head p {
  margin: 10px 0 0;
  max-width: 640px;
  color: rgba(255,255,255,0.72);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.filters {
  display: flex;
  gap: 10px;
}

.filter-button {
  height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.90);
  font-size: 14px;
}

/* TREND GRID: шесть карточек в ряд */
.trend-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

/* TREND CARD: контейнер одной карточки */
.trend-card {
  min-width: 0;
  height: 340px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.trend-card:hover {
  border-color: rgba(132,255,90,0.34);
  box-shadow: 0 18px 36px rgba(0,0,0,0.32);
}

/* CARD PREVIEW: жесткая рамка превью без img */
.trend-card__preview {
  position: relative;
  width: 100%;
  height: 188px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background: #101719;
}

/* CARD MEDIA: фон-картинка внутри превью */
.trend-card__media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  filter: saturate(0.86) contrast(1.04) brightness(0.78);
}

/* CARD CATEGORY: плашка категории сверху */
.trend-card__category-pill {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 3;
  max-width: calc(100% - 18px);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(13,18,16,0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(8px);
}


/* CARD PREVIEW METRICS: реальные просмотры, лайки и комментарии */
.trend-card__preview-metrics {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 7px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 9px;
  background: rgba(7,12,10,0.72);
  color: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.trend-card__preview-metric {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(255,255,255,0.92);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.trend-card__preview-metric svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* CARD PLAY: только последние шесть карточек */
.trend-card__play {
  display: none;
}

.trend-card--needs-play .trend-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.62);
  box-shadow: 0 6px 18px rgba(0,0,0,0.42);
  backdrop-filter: blur(8px);
}

.trend-card--needs-play .trend-card__play::before {
  content: "";
  margin-left: 3px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid rgba(255,255,255,0.95);
}

/* CARD BODY: нижняя часть карточки */
.trend-card__body {
  height: 152px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(12,19,21,1), rgba(7,12,14,1));
  display: flex;
  flex-direction: column;
}

/* CARD PROBABILITY: две зеленые плашки */
.trend-card__growth-row {
  margin-bottom: 0;
  display: flex;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
}

.trend-card__growth-label {
  min-width: 0;
  justify-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(132,255,90,0.13);
  color: var(--green);
  font-size: 9px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.01em;
  max-width: calc(100% - 54px);
  flex: 1 1 auto;
}

.trend-card__growth-value {
  justify-self: end;
  padding: 3px 7px 4px;
  border-radius: 999px;
  background: rgba(132,255,90,0.13);
  color: var(--green);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* CARD TEXT: название и описание */
.trend-card__title {
  margin: 0;
  color: #fff;
  font-family: "Geologica", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.012em;
  margin-top: auto;
  margin-bottom: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}



/* TREND MODAL: детальная карточка тренда */
body.modal-open {
  overflow: hidden;
}

.trend-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  color: #fff;
}

.trend-modal--open {
  display: block;
}

.trend-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(12px);
}

.trend-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(920px, calc(100vw - 42px));
  max-height: calc(100vh - 42px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(15,24,26,0.98), rgba(7,12,14,0.98));
  box-shadow: 0 28px 90px rgba(0,0,0,0.58);
}

.trend-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.trend-modal__grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.trend-modal__preview {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 18px;
  background: #101719;
}

.trend-modal__media {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  filter: saturate(0.88) contrast(1.04) brightness(0.78);
}

.trend-modal__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 62px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.66);
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  backdrop-filter: blur(8px);
}

.trend-modal__content {
  min-width: 0;
  padding: 8px 6px 4px 0;
}

.trend-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.trend-modal__meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(132,255,90,0.12);
  color: var(--green);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.trend-modal__content h2 {
  margin: 0;
  color: #fff;
  font-family: "Geologica", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.026em;
}

.trend-modal__hook {
  margin: 16px 0 0;
  color: rgba(255,255,255,0.88);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.42;
}

.trend-modal__description {
  margin: 10px 0 0;
  color: rgba(255,255,255,0.62);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.48;
}

.trend-modal__chart {
  margin-top: 22px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.09);
}

.trend-modal__label {
  display: block;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.48);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.trend-modal__chart strong {
  color: rgba(255,255,255,0.86);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.trend-modal__sparkline {
  width: 100%;
  height: 74px;
  margin-top: 12px;
  color: var(--green);
}

.trend-modal__repeat {
  margin-top: 18px;
}

.trend-modal__repeat ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.72);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.trend-modal__link {
  margin-top: 22px;
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green);
  color: #071011;
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.category-card--active {
  border-color: rgba(132,255,90,0.34);
  background: rgba(132,255,90,0.10);
}

/* ACTIVE CONTROLS: кликабельные вкладки и фильтры */
.status-tab,
.platform-tab,
.filter-button,
.category-card,
.trend-card {
  cursor: pointer;
}

.filter-button--active {
  border-color: rgba(132,255,90,0.34);
  background: rgba(132,255,90,0.12);
  color: #e0ffd8;
}

/* EMPTY STATE: заглушка для будущих разделов */
.empty-state {
  grid-column: 1 / -1;
  min-height: 340px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(circle at 50% 0%, rgba(132,255,90,0.12), transparent 36%),
    rgba(255,255,255,0.035);
  text-align: center;
}

.empty-state__badge {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(132,255,90,0.13);
  color: var(--green);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.empty-state h2 {
  margin: 4px 0 0;
  color: #fff;
  font-family: "Geologica", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.024em;
}

.empty-state p {
  max-width: 430px;
  margin: 0;
  color: rgba(255,255,255,0.62);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

/* SIDEBAR NAVIGATION: кнопки sidebar в едином стиле с панелью */
.sidebar-link {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: rgba(255,255,255,0.82);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.055);
  color: #fff;
}

.sidebar-link__badge {
  margin-left: auto;
}

.sidebar-link--active {
  border-color: rgba(132,255,90,0.28);
  background: rgba(132,255,90,0.10);
  color: #e0ffd8;
}

/* NOTIFICATIONS VIEW: экран уведомлений */
.notifications-view {
  grid-column: 1 / -1;
  min-height: 340px;
  padding: 28px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.035);
}

.notifications-view__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.notifications-view__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.notifications-view h2 {
  margin: 0;
  color: #fff;
  font-family: "Geologica", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.024em;
}

.notifications-view__count {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(132,255,90,0.13);
  color: var(--green);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item__dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--green);
}

.notification-item strong {
  color: rgba(255,255,255,0.92);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.notification-item p {
  margin: 5px 0 0;
  color: rgba(255,255,255,0.60);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.notification-item > span:last-child {
  color: rgba(255,255,255,0.42);
  font-family: "Manrope", "Rubik", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  white-space: nowrap;
}

/* ==========================================================================
   MOBILE LAYOUT: телефон до 767 px
   Две карточки в ряд, иконочная верхняя панель и выезжающий sidebar.
   ========================================================================== */

/* TREND MODAL VIDEO COLUMN AND METRICS */
.trend-modal__video-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trend-modal__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.trend-modal__metric {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 10px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 11px;
  background: rgba(255,255,255,0.045);
}

.trend-modal__metric svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-modal__metric strong,
.trend-modal__metric span {
  display: block;
}

.trend-modal__metric strong {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.trend-modal__metric span {
  margin-top: 4px;
  color: rgba(255,255,255,0.55);
  font-size: 9px;
  line-height: 1;
}

.trend-modal__published {
  color: rgba(255,255,255,0.76) !important;
}

.trend-modal__status {
  color: var(--green) !important;
  border-color: rgba(132,255,90,0.24) !important;
  background: rgba(57,164,61,0.13) !important;
}

@media (max-width: 767px) {
  .trend-card__preview-metrics {
    left: 6px;
    right: 6px;
    bottom: 6px;
    gap: 2px;
    padding: 5px 4px;
    border-radius: 8px;
  }

  .trend-card__preview-metric {
    gap: 3px;
    font-size: 8.5px;
  }

  .trend-card__preview-metric svg {
    width: 11px;
    height: 11px;
  }

  .trend-modal__video-column {
    gap: 9px;
  }

  .trend-modal__metrics {
    gap: 5px;
    padding: 0 12px;
  }

  .trend-modal__metric {
    gap: 6px;
    padding: 9px 6px;
  }

  .trend-modal__metric svg {
    width: 16px;
    height: 16px;
  }

  .trend-modal__metric strong {
    font-size: 12px;
  }

  .trend-modal__metric span {
    font-size: 8px;
  }
}

@media (max-width: 767px) {
  html,
  body {
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
  }

  /* MOBILE APP: основная область занимает всю ширину */
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr) !important;
  }

  .main-area {
    width: 100%;
    overflow: visible;
  }

  /* MOBILE SIDEBAR: выезжающая панель поверх страницы */
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 120;
    width: min(82vw, 320px);
    min-height: 100dvh;
    padding: 18px 12px 16px 16px;
    border-right: 1px solid var(--line);
    background: rgba(5,10,12,0.99);
    box-shadow: 22px 0 48px rgba(0,0,0,0.52);
    transform: translateX(0);
    transition: transform 180ms ease, visibility 180ms ease;
  }

  .app-shell.sidebar-collapsed .sidebar {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* MOBILE MENU BUTTON: три полоски слева */
  .sidebar-open,
  .app-shell.sidebar-collapsed .sidebar-open {
    position: fixed;
    left: 10px;
    top: 11px;
    z-index: 110;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: rgba(10,17,19,0.96);
    color: rgba(255,255,255,0.92);
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  }

  .app-shell:not(.sidebar-collapsed) .sidebar-open {
    display: none;
  }

  .sidebar-open svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }

  /* MOBILE TOPBAR: статусы по центру, платформы справа */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    width: 100%;
    height: 56px;
    padding: 0 8px 0 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    background: rgba(6,12,14,0.96);
    backdrop-filter: blur(14px);
  }

  .status-tabs {
    min-width: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
  }

  .status-tab {
    width: 33px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border-radius: 9px;
    color: rgba(255,255,255,0.64);
  }

  .status-tab--active {
    background: var(--green-soft);
    color: var(--green);
  }

  .status-tab--active::after {
    display: none;
  }

  .status-tab__icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .status-tab__label {
    display: none;
  }

  .topbar-right {
    min-width: 0;
    gap: 0;
  }

  .platform-tabs {
    height: 34px;
    overflow: visible;
    gap: 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .platform-tab {
    width: 33px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: rgba(255,255,255,0.64);
  }

  .platform-tab:first-child {
    border: 0;
  }

  .platform-tab--active {
    background: var(--green-soft);
    color: var(--green);
  }

  .platform-icon {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    font-size: 0;
  }

  .platform-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .platform-icon__fill {
    fill: currentColor;
    stroke: none;
  }

  .platform-tab__label,
  .topbar-avatar {
    display: none;
  }

  /* MOBILE PAGE HEADER: компактная шапка контента */
  .page {
    width: 100%;
    padding: 0 8px 22px;
  }

  .page-head {
    padding: 17px 2px 14px;
    display: block;
  }

  .page-head h1 {
    font-size: clamp(25px, 7vw, 31px);
    line-height: 1.04;
  }

  .page-head p {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
  }

  .filters {
    margin-top: 12px;
    display: flex;
    gap: 7px;
  }

  .filter-button {
    height: 34px;
    min-width: 0;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 11px;
    white-space: nowrap;
  }

  /* MOBILE GRID: строго две карточки в ряд */
  .trend-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  /* MOBILE CARD: тот же внешний вид в компактном размере */
  .trend-card {
    height: 310px;
    border-radius: 9px;
  }

  .trend-card__preview {
    height: 178px;
    border-radius: 9px 9px 0 0;
  }

  .trend-card__category-pill {
    top: 7px;
    left: 7px;
    max-width: calc(100% - 14px);
    padding: 4px 7px;
    font-size: 9px;
  }

  .trend-card--needs-play .trend-card__play {
    width: 40px;
    height: 40px;
  }

  .trend-card--needs-play .trend-card__play::before {
    border-top-width: 7px;
    border-bottom-width: 7px;
    border-left-width: 11px;
  }

  .trend-card__body {
    height: 132px;
    padding: 9px 8px 10px;
  display: flex;
  flex-direction: column;
}

  .trend-card__growth-row {
    margin-bottom: 0;
    column-gap: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

  .trend-card__growth-label {
    max-width: calc(100% - 46px);
    padding: 4px 5px;
    overflow: hidden;
    font-size: 7.5px;
    text-overflow: ellipsis;
  line-height: 1;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

  .trend-card__growth-value {
    padding: 3px 5px 4px;
    font-size: 15px;
  flex: 0 0 auto;
}

  .trend-card__title {
    font-size: 12px;
    line-height: 1.18;
  margin-top: auto;
  margin-bottom: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

  

  /* MOBILE TREND MODAL: карточка тренда на весь экран телефона */
  .trend-modal {
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
  }

  .trend-modal__overlay {
    position: fixed;
    inset: 0;
    background: #05090a;
    backdrop-filter: none;
  }

  .trend-modal__panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: none;
    border: 0;
    border-radius: 0;
    background: linear-gradient(
      180deg,
      rgba(15,24,26,1),
      rgba(7,12,14,1)
    );
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
  }

  /* MOBILE MODAL CLOSE: учитывает вырез и системную строку */
  .trend-modal__close {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 1010;
    width: 38px;
    height: 38px;
    border-color: rgba(255,255,255,0.18);
    background: rgba(5,9,10,0.76);
    font-size: 25px;
    backdrop-filter: blur(12px);
  }

  /* MOBILE MODAL GRID: видео сверху, информация ниже */
  .trend-modal__grid {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0;
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  /* MOBILE MODAL PREVIEW: вертикальное видео на всю доступную ширину */
  .trend-modal__preview {
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: 9 / 12;
    max-height: 62dvh;
    border-radius: 16px;
  }

  .trend-modal__media {
    background-position: center center;
  }

  .trend-modal__play {
    width: 58px;
    height: 58px;
    font-size: 20px;
  }

  /* MOBILE MODAL CONTENT: те же данные, что на десктопе */
  .trend-modal__content {
    min-width: 0;
    padding: 18px 4px 4px;
  }

  .trend-modal__meta {
    gap: 6px;
    margin-bottom: 14px;
    padding-right: 42px;
  }

  .trend-modal__meta span {
    padding: 5px 8px;
    font-size: 10px;
  }

  .trend-modal__content h2 {
    padding-right: 4px;
    font-size: clamp(25px, 7.2vw, 32px);
    line-height: 1.08;
  }

  .trend-modal__hook {
    margin-top: 13px;
    font-size: 14px;
    line-height: 1.42;
  }

  .trend-modal__description {
    margin-top: 9px;
    font-size: 12px;
    line-height: 1.48;
  }

  .trend-modal__chart {
    margin-top: 18px;
    padding: 13px;
    border-radius: 14px;
  }

  .trend-modal__label {
    font-size: 11px;
  }

  .trend-modal__chart strong {
    font-size: 12px;
  }

  .trend-modal__sparkline {
    height: 66px;
    margin-top: 10px;
  }

  .trend-modal__repeat {
    margin-top: 17px;
  }

  .trend-modal__repeat ul {
    margin-top: 8px;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.52;
  }

  .trend-modal__link {
    width: 100%;
    height: 46px;
    margin-top: 19px;
    padding: 0 16px;
    font-size: 13px;
  }

  /* MOBILE TOUCH: hover-эффект не должен зависать после касания */
  .trend-card:hover {
    border-color: var(--line-strong);
    box-shadow: none;
  }
}

/* HOME FILTERS: общая сортировка доступна только на главной витрине */
.filters--hidden {
  display: none;
}


/* TRENDMAP REEL CARD CLEAN V2 START */

/*
 * Категории снова прозрачные.
 * Зеленый фон остается только у выбранной категории.
 */
.categories-list .category-card {
  background: transparent !important;
  border-color: transparent !important;
}

.categories-list .category-card:hover {
  background: rgba(255,255,255,0.045) !important;
}

.categories-list .category-card--active {
  background: rgba(57,164,61,0.15) !important;
  border-color: rgba(132,255,90,0.18) !important;
}


/*
 * Карточка полностью вертикальная.
 * Все правила ограничены контейнером trendCardsList.
 */
#trendCardsList .trend-card {
  position: relative;
  min-width: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #101719;
  cursor: pointer;
}

#trendCardsList .trend-card__preview {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #101719;
}

#trendCardsList .trend-card__media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  filter:
    saturate(0.92)
    contrast(1.03)
    brightness(0.84);
}

#trendCardsList .trend-card__body,
#trendCardsList .trend-card__title,
#trendCardsList .trend-card__description,
#trendCardsList .trend-card__play {
  display: none !important;
}

#trendCardsList .trend-card__preview::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 38%;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(5,9,8,0),
      rgba(5,9,8,0.25) 30%,
      rgba(5,9,8,0.84) 100%
    );
}

#trendCardsList .trend-card__bottom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}


/*
 * Одинаковый отступ слева от глаза
 * и справа от комментариев.
 */
#trendCardsList .trend-card__preview-metrics {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  width: 100%;
  gap: 5px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  background: rgba(7,12,10,0.72);
  color: rgba(255,255,255,0.94);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

#trendCardsList .trend-card__preview-metric {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 3px;
  color: rgba(255,255,255,0.95);
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

#trendCardsList .trend-card__preview-metric svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Вероятность роста и процент */
#trendCardsList .trend-card__growth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 9px;
  margin: 0;
}

#trendCardsList .trend-card__growth-label,
#trendCardsList .trend-card__growth-value {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9px;
  background: rgba(7,12,10,0.74);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

#trendCardsList .trend-card__growth-label {
  min-width: 0;
  flex: 1 1 auto;
  padding: 6px 8px;
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  font-weight: 730;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#trendCardsList .trend-card__growth-value {
  flex: 0 0 auto;
  justify-content: center;
  padding: 5px 9px;
  color: var(--green);
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
}


/*
 * Метрики под открытым роликом.
 * Только значок и цифра, без слов и зеленых полей.
 */
.trend-modal__metrics {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 22px !important;
  padding: 2px 1px 0 !important;
}

.trend-modal__metric {
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.trend-modal__metric svg {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 auto;
  fill: none !important;
  stroke: var(--green) !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-modal__metric strong {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.trend-modal__metric span {
  display: none !important;
}


@media (max-width: 767px) {
  #trendCardsList .trend-card {
    aspect-ratio: 9 / 16;
    border-radius: 10px;
  }

  #trendCardsList .trend-card__bottom {
    right: 7px;
    bottom: 7px;
    left: 7px;
    gap: 6px;
  }

  #trendCardsList .trend-card__preview-metrics {
    gap: 3px;
    padding: 6px 8px;
    border-radius: 8px;
  }

  #trendCardsList .trend-card__preview-metric {
    gap: 3px;
    padding: 0 2px;
    font-size: 8.5px;
  }

  #trendCardsList .trend-card__preview-metric svg {
    width: 12px;
    height: 12px;
  }

  #trendCardsList .trend-card__growth-label {
    padding: 5px 6px;
    font-size: 7.5px;
  }

  #trendCardsList .trend-card__growth-value {
    padding: 4px 7px;
    font-size: 15px;
  }

  .trend-modal__metrics {
    gap: 18px !important;
    padding: 1px 12px 0 !important;
  }

  .trend-modal__metric svg {
    width: 18px !important;
    height: 18px !important;
  }

  .trend-modal__metric strong {
    font-size: 13px;
  }
}

/* TRENDMAP REEL CARD CLEAN V2 END */


/* TRENDMAP FINAL UI FIX START */

/* =========================================================
   ДЕСКТОПНЫЙ ХЕДЕР
   Растущие, Топ и Затухающие снова находятся в шапке.
   ========================================================= */

@media (min-width: 768px) {
  .topbar {
    position: relative !important;
    inset: auto !important;
    z-index: 30 !important;

    width: 100% !important;
    min-height: 68px !important;
    height: 68px !important;

    display: flex !important;
    align-items: stretch !important;
    justify-content: space-between !important;

    padding: 0 20px 0 24px !important;
    margin: 0 !important;

    overflow: visible !important;
    transform: none !important;
  }

  .status-tabs {
    position: static !important;
    inset: auto !important;

    height: 68px !important;

    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    transform: none !important;
  }

  .status-tab {
    position: relative !important;
    inset: auto !important;

    width: auto !important;
    min-width: 0 !important;
    height: 68px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    padding: 0 18px !important;
    margin: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;

    color: rgba(255,255,255,0.74) !important;

    font-size: 14px !important;
    font-weight: 720 !important;
    line-height: 1 !important;

    box-shadow: none !important;
    transform: none !important;
  }

  .status-tab:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.035) !important;
  }

  .status-tab--active {
    color: var(--green) !important;
    background: transparent !important;
    box-shadow:
      inset 0 -2px 0 var(--green) !important;
  }

  .status-tab__icon {
    position: static !important;

    width: 20px !important;
    height: 20px !important;

    display: block !important;

    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;

    transform: none !important;
  }

  .status-tab__label {
    position: static !important;

    display: inline !important;

    width: auto !important;
    height: auto !important;

    color: inherit !important;

    font-size: inherit !important;
    line-height: inherit !important;

    transform: none !important;
  }

  .topbar-right {
    position: static !important;
    inset: auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;

    margin-left: auto !important;
    transform: none !important;
  }

  .platform-tabs {
    position: static !important;

    display: flex !important;
    align-items: center !important;
    gap: 0 !important;

    margin: 0 !important;
    transform: none !important;
  }

  .platform-tab {
    position: static !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;

    color: rgba(255,255,255,0.90) !important;
    transform: none !important;
  }
}


/* =========================================================
   БЕЛЫЕ ИКОНКИ ПЛАТФОРМ
   ========================================================= */

.platform-tab .platform-icon,
.platform-tab .platform-icon svg {
  color: rgba(255,255,255,0.94) !important;
}

.platform-tab .platform-icon svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.platform-tab .platform-icon__fill {
  fill: currentColor !important;
  stroke: none !important;
}


/* =========================================================
   НИЖНЯЯ ЧАСТЬ ПРЕВЬЮ
   Метрики сверху, вероятность роста снизу.
   Плашки больше не перекрываются.
   ========================================================= */

#trendCardsList .trend-card__bottom {
  position: absolute !important;
  right: 9px !important;
  bottom: 9px !important;
  left: 9px !important;
  z-index: 20 !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 7px !important;

  width: auto !important;
  height: auto !important;

  margin: 0 !important;
  padding: 0 !important;

  overflow: visible !important;
  transform: none !important;
}

#trendCardsList .trend-card__preview-metrics {
  position: static !important;
  inset: auto !important;
  order: 1 !important;

  box-sizing: border-box !important;

  width: 100% !important;
  height: 34px !important;

  display: grid !important;
  grid-template-columns:
    repeat(3, minmax(0, 1fr)) !important;
  align-items: center !important;
  justify-content: stretch !important;
  gap: 6px !important;

  margin: 0 !important;
  padding: 0 11px !important;

  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 10px !important;

  background: rgba(7,12,10,0.74) !important;
  color: rgba(255,255,255,0.96) !important;

  overflow: hidden !important;

  backdrop-filter: blur(11px) !important;
  -webkit-backdrop-filter: blur(11px) !important;

  transform: none !important;
}

#trendCardsList .trend-card__preview-metric {
  min-width: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;

  margin: 0 !important;
  padding: 0 2px !important;

  color: rgba(255,255,255,0.96) !important;

  font-size: 10px !important;
  font-weight: 750 !important;
  line-height: 1 !important;

  white-space: nowrap !important;
}

#trendCardsList .trend-card__preview-metric svg {
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 auto !important;

  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.75 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

#trendCardsList .trend-card__growth-row {
  position: static !important;
  inset: auto !important;
  order: 2 !important;
  z-index: 21 !important;

  box-sizing: border-box !important;

  width: 100% !important;
  min-height: 30px !important;
  height: 30px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 9px !important;

  margin: 0 !important;
  padding: 0 !important;

  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;

  transform: none !important;
}

#trendCardsList .trend-card__growth-label,
#trendCardsList .trend-card__growth-value {
  position: static !important;
  inset: auto !important;

  box-sizing: border-box !important;
  min-height: 30px !important;
  height: 30px !important;

  display: inline-flex !important;
  align-items: center !important;

  margin: 0 !important;

  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 9px !important;

  background: rgba(7,12,10,0.76) !important;

  opacity: 1 !important;
  visibility: visible !important;

  backdrop-filter: blur(11px) !important;
  -webkit-backdrop-filter: blur(11px) !important;

  transform: none !important;
}

#trendCardsList .trend-card__growth-label {
  min-width: 0 !important;
  flex: 1 1 auto !important;

  padding: 0 9px !important;

  overflow: hidden !important;

  color: #ffffff !important;

  font-size: 9px !important;
  font-weight: 730 !important;
  line-height: 1 !important;

  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

#trendCardsList .trend-card__growth-value {
  flex: 0 0 auto !important;
  justify-content: center !important;

  padding: 0 10px !important;

  color: var(--green) !important;

  font-size: 17px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}


/* =========================================================
   МЕТРИКИ ПОД ОТКРЫТЫМ РОЛИКОМ
   Центрирование, только иконка и цифра.
   ========================================================= */

.trend-modal__metrics {
  box-sizing: border-box !important;

  width: 100% !important;

  display: grid !important;
  grid-template-columns:
    repeat(3, max-content) !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 28px !important;

  margin: 0 !important;
  padding: 3px 0 0 !important;
}

.trend-modal__metric {
  min-width: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.trend-modal__metric svg {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 auto !important;

  fill: none !important;
  stroke: var(--green) !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.trend-modal__metric strong {
  display: block !important;

  margin: 0 !important;

  color: #ffffff !important;

  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.trend-modal__metric span {
  display: none !important;
}


@media (max-width: 767px) {
  #trendCardsList .trend-card__bottom {
    right: 7px !important;
    bottom: 7px !important;
    left: 7px !important;
    gap: 6px !important;
  }

  #trendCardsList .trend-card__preview-metrics {
    height: 30px !important;
    padding: 0 8px !important;
  }

  #trendCardsList .trend-card__preview-metric {
    gap: 3px !important;
    font-size: 8.5px !important;
  }

  #trendCardsList .trend-card__preview-metric svg {
    width: 12px !important;
    height: 12px !important;
  }

  #trendCardsList .trend-card__growth-row,
  #trendCardsList .trend-card__growth-label,
  #trendCardsList .trend-card__growth-value {
    min-height: 27px !important;
    height: 27px !important;
  }

  #trendCardsList .trend-card__growth-label {
    padding: 0 6px !important;
    font-size: 7.5px !important;
  }

  #trendCardsList .trend-card__growth-value {
    padding: 0 7px !important;
    font-size: 15px !important;
  }

  .trend-modal__metrics {
    gap: 20px !important;
  }

  .trend-modal__metric svg {
    width: 18px !important;
    height: 18px !important;
  }

  .trend-modal__metric strong {
    font-size: 13px !important;
  }
}

/* TRENDMAP FINAL UI FIX END */


/* TRENDMAP METRIC SPACING START */

/* Карточка остается общей областью размещения */
#trendCardsList .trend-card__bottom {
  position: absolute !important;
  inset: 0 !important;
  z-index: 20 !important;

  display: block !important;

  width: 100% !important;
  height: 100% !important;

  margin: 0 !important;
  padding: 0 !important;

  pointer-events: none !important;
}


/*
 * Просмотры, лайки и комментарии немного выше.
 * Только белые иконки и цифры.
 */
#trendCardsList .trend-card__preview-metrics {
  position: absolute !important;
  top: 44% !important;
  right: 12px !important;
  bottom: auto !important;
  left: auto !important;

  z-index: 22 !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;

  width: auto !important;
  height: auto !important;

  gap: 14px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  background: transparent !important;

  overflow: visible !important;

  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  transform: translateY(-50%) !important;
}

#trendCardsList .trend-card__preview-metric {
  min-width: 40px !important;
  width: auto !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;

  gap: 4px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  background: transparent !important;
  color: #ffffff !important;

  font-size: 10px !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums !important;

  white-space: nowrap !important;
  overflow: visible !important;

  text-shadow:
    0 1px 2px rgba(0,0,0,0.98),
    0 2px 7px rgba(0,0,0,0.92) !important;
}

#trendCardsList .trend-card__preview-metric svg {
  width: 21px !important;
  height: 21px !important;

  flex: 0 0 auto !important;

  fill: none !important;
  stroke: #ffffff !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;

  filter:
    drop-shadow(0 1px 2px rgba(0,0,0,0.98))
    drop-shadow(0 2px 5px rgba(0,0,0,0.88)) !important;
}


/*
 * Внизу остается одна черная плашка.
 * Она строго отцентрирована.
 */
#trendCardsList .trend-card__growth-row {
  position: absolute !important;
  right: 0 !important;
  bottom: 15px !important;
  left: 0 !important;
  top: auto !important;

  z-index: 23 !important;

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

  width: 100% !important;
  height: auto !important;

  margin: 0 !important;
  padding: 0 !important;

  pointer-events: none !important;
  transform: none !important;
}

#trendCardsList .trend-card__growth-label {
  display: none !important;
}

/*
 * Только стрелка и процент.
 * Без фона, рамки, плашки и размытия.
 */
#trendCardsList .trend-card__growth-value {
  position: relative !important;

  min-width: 0 !important;
  width: auto !important;
  height: auto !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;
  color: var(--green) !important;

  box-shadow: none !important;

  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  cursor: help !important;
  pointer-events: auto !important;
}

#trendCardsList .trend-card__growth-icon {
  width: 32px !important;
  height: 32px !important;

  flex: 0 0 auto !important;

  display: block !important;

  color: var(--green) !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.1 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;

  filter:
    drop-shadow(0 2px 2px rgba(0,0,0,0.95))
    drop-shadow(0 3px 8px rgba(0,0,0,0.90)) !important;
}

#trendCardsList .trend-card__growth-number {
  display: block !important;

  color: var(--green) !important;

  font-size: 38px !important;
  font-weight: 920 !important;
  line-height: 1 !important;
  letter-spacing: -0.055em !important;
  font-variant-numeric: tabular-nums !important;

  white-space: nowrap !important;

  text-shadow:
    0 2px 2px rgba(0,0,0,0.98),
    0 3px 9px rgba(0,0,0,0.92) !important;
}

/* Подсказка остается черной и появляется отдельно */
#trendCardsList .trend-card__growth-value::after {
  position: absolute !important;
  right: 50% !important;
  bottom: calc(100% + 10px) !important;

  z-index: 30 !important;

  content: attr(data-growth-tooltip) !important;

  min-width: max-content !important;

  padding: 8px 11px !important;

  border: 1px solid rgba(255,255,255,0.16) !important;
  border-radius: 9px !important;

  background: rgba(5,9,8,0.94) !important;
  color: #ffffff !important;

  font-size: 11px !important;
  font-weight: 720 !important;
  line-height: 1 !important;

  opacity: 0 !important;
  visibility: hidden !important;

  pointer-events: none !important;

  transform:
    translateX(50%)
    translateY(4px) !important;

  transition:
    opacity 130ms ease,
    transform 130ms ease,
    visibility 130ms ease !important;
}

#trendCardsList
.trend-card__growth-value:hover::after,
#trendCardsList
.trend-card__growth-value:focus-visible::after,
#trendCardsList
.trend-card__growth-value.is-tooltip-open::after {
  opacity: 1 !important;
  visibility: visible !important;

  transform:
    translateX(50%)
    translateY(0) !important;
}

@media (max-width: 767px) {
  #trendCardsList .trend-card__preview-metrics {
    top: 42% !important;
    right: 8px !important;
    gap: 11px !important;
  }

  #trendCardsList .trend-card__preview-metric {
    min-width: 32px !important;
    gap: 3px !important;
    font-size: 8px !important;
  }

  #trendCardsList .trend-card__preview-metric svg {
    width: 18px !important;
    height: 18px !important;
  }

  #trendCardsList .trend-card__growth-row {
    bottom: 11px !important;
  }

  #trendCardsList .trend-card__growth-value {
    gap: 7px !important;
  }

  #trendCardsList .trend-card__growth-icon {
    width: 26px !important;
    height: 26px !important;
  }

  #trendCardsList .trend-card__growth-number {
    font-size: 31px !important;
  }

  #trendCardsList .trend-card__growth-value::after {
    bottom: calc(100% + 8px) !important;
    font-size: 10px !important;
  }
}

/* TRENDMAP METRIC SPACING END */


/* TRENDMAP MOBILE TOOLTIP FIX START */

/*
 * На сенсорных экранах :hover залипает после касания.
 * Поэтому hover принудительно скрыт, а показ управляется
 * только временным классом is-tooltip-open.
 */
@media (hover: none), (pointer: coarse), (max-width: 767px) {
  #trendCardsList
  .trend-card__growth-value:hover::after,
  #trendCardsList
  .trend-card__growth-value:focus::after,
  #trendCardsList
  .trend-card__growth-value:focus-visible::after {
    opacity: 0 !important;
    visibility: hidden !important;

    transform:
      translateX(50%)
      translateY(4px) !important;
  }

  #trendCardsList
  .trend-card__growth-value.is-tooltip-open::after {
    opacity: 1 !important;
    visibility: visible !important;

    transform:
      translateX(50%)
      translateY(0) !important;
  }
}

/* TRENDMAP MOBILE TOOLTIP FIX END */

/* TRENDMAP SCORE BADGE START */
.trend-card__growth-row {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  width: max-content !important;
  max-width: calc(100% - 18px) !important;
  padding: 7px 13px 8px !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  border-radius: 14px !important;
  background: rgba(4,7,5,0.84) !important;
  color: #70ff55 !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.36) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.trend-card__growth-row * {
  color: inherit !important;
}
/* TRENDMAP SCORE BADGE END */

/* TRENDMAP FINAL SCORE BADGE START */

/*
 * Черная плашка вероятности роста на превью Reel.
 * Финальный блок перекрывает старое правило с голым процентом.
 */
#trendCardsList .trend-card__growth-value {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  min-width: 0 !important;
  width: auto !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 12px !important;

  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 10px !important;
  background: rgba(7, 12, 10, 0.84) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;

  color: var(--green) !important;
  font-size: 17px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-shadow: none !important;
}

#trendCardsList
.trend-card__growth-value
.trend-card__growth-icon {
  width: 22px !important;
  height: 22px !important;
  color: var(--green) !important;
}

#trendCardsList
.trend-card__growth-value
.trend-card__growth-number {
  color: var(--green) !important;
  font-size: 17px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  text-shadow: none !important;
}

@media (max-width: 767px) {
  #trendCardsList .trend-card__growth-value {
    height: 30px !important;
    min-height: 30px !important;
    gap: 6px !important;
    padding: 0 9px !important;
  }

  #trendCardsList
  .trend-card__growth-value
  .trend-card__growth-icon {
    width: 19px !important;
    height: 19px !important;
  }

  #trendCardsList
  .trend-card__growth-value
  .trend-card__growth-number {
    font-size: 15px !important;
  }
}

/* TRENDMAP FINAL SCORE BADGE END */

/* TRENDMAP REMOVE OUTER SCORE BOX — FINAL START */

/*
 * Внешняя оболочка больше не создает визуальный или размерный блок.
 * Ее дочерняя кнопка с процентом остается в DOM.
 */
#trendCardsList .trend-card__growth-row {
  display: contents !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/*
 * Единственная оставшаяся плашка:
 * стрелка и процент внутри trend-card__growth-value.
 */
#trendCardsList .trend-card__growth-value {
  position: absolute !important;
  right: auto !important;
  bottom: 15px !important;
  left: 50% !important;
  z-index: 23 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  width: auto !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 12px !important;

  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 10px !important;
  background: rgba(7, 12, 10, 0.84) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;

  color: var(--green) !important;
  pointer-events: auto !important;
  transform: translateX(-50%) !important;
}

#trendCardsList .trend-card__growth-number {
  display: inline !important;
  color: var(--green) !important;
  font-size: 17px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

@media (max-width: 767px) {
  #trendCardsList .trend-card__growth-value {
    bottom: 11px !important;
    height: 30px !important;
    min-height: 30px !important;
    gap: 6px !important;
    padding: 0 9px !important;
  }

  #trendCardsList .trend-card__growth-number {
    font-size: 15px !important;
  }
}

/* TRENDMAP REMOVE OUTER SCORE BOX — FINAL END */

/* TRENDMAP SIDEBAR CATEGORY COUNTS START */

/* Иконки категорий полностью удалены из публичного списка. */
.categories-list .category-card__icon {
  display: none !important;
}

/* Название слева, реальный счетчик Reel справа. */
.categories-list .category-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
}

.categories-list .category-card__name {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.categories-list .category-card__count {
  min-width: 25px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);

  font-family: "Manrope", "Rubik", sans-serif;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}

.categories-list
.category-card--active
.category-card__count {
  border-color: rgba(132, 255, 90, 0.28);
  background: rgba(132, 255, 90, 0.13);
  color: #baff9e;
}

/* TRENDMAP SIDEBAR CATEGORY COUNTS END */

/* TRENDMAP RESPONSIVE SIDEBAR START */

/*
 * Десктопный сайдбар получает достаточно места
 * для длинных названий и счетчиков категорий.
 */
.app-shell {
  grid-template-columns:
    clamp(230px, 16vw, 270px)
    minmax(0, 1fr) !important;
}

.sidebar {
  width: 100% !important;
  min-width: 0 !important;
  padding: 18px 14px 16px 16px !important;
  overflow-x: hidden !important;
}

.categories-panel,
.categories-list {
  width: 100% !important;
  min-width: 0 !important;
}

/*
 * В каждой строке две колонки:
 * название занимает доступное место,
 * счетчик всегда остается видимым справа.
 */
.categories-list .category-card {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;

  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 10px !important;

  padding: 6px 8px !important;
  margin: 0 !important;

  border: 1px solid transparent !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.categories-list .category-card__icon {
  display: none !important;
}

.categories-list .category-card__name {
  min-width: 0 !important;
  width: 100% !important;

  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;

  font-size: 13px !important;
  line-height: 1.25 !important;
  text-align: left !important;
}

.categories-list .category-card__count {
  position: static !important;
  inset: auto !important;

  min-width: 26px !important;
  height: 22px !important;
  padding: 0 7px !important;
  margin: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: end !important;
  flex: 0 0 auto !important;

  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.76) !important;

  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1 !important;

  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.categories-list .category-card--active {
  border-color: rgba(132,255,90,0.24) !important;
  background: rgba(132,255,90,0.10) !important;
}

.categories-list
.category-card--active
.category-card__count {
  border-color: rgba(132,255,90,0.30) !important;
  background: rgba(132,255,90,0.16) !important;
  color: #baff9e !important;
}

/*
 * На среднем экране сайдбар немного уже,
 * но счетчик по-прежнему не обрезается.
 */
@media (min-width: 768px) and (max-width: 1180px) {
  .app-shell {
    grid-template-columns:
      230px
      minmax(0, 1fr) !important;
  }

  .categories-list .category-card {
    column-gap: 8px !important;
    padding-right: 7px !important;
  }

  .categories-list .category-card__name {
    font-size: 12px !important;
  }
}

/*
 * Мобильный сайдбар остается выезжающим
 * и занимает удобную ширину экрана.
 */
@media (max-width: 767px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr) !important;
  }

  .sidebar {
    width: min(88vw, 320px) !important;
    max-width: 320px !important;
    padding: 18px 14px 18px 16px !important;
  }

  .categories-list .category-card {
    min-height: 40px !important;
    padding: 7px 8px !important;
  }

  .categories-list .category-card__name {
    font-size: 13px !important;
  }

  .categories-list .category-card__count {
    min-width: 27px !important;
    height: 23px !important;
  }
}

/* TRENDMAP RESPONSIVE SIDEBAR END */

/* TRENDMAP PLAIN CATEGORY COUNTS START */

/* Счетчики категорий: только число, без плашки. */
.categories-list .category-card__count,
.categories-list .category-card--active .category-card__count {
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;

  color: rgba(255,255,255,0.62) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.categories-list
.category-card--active
.category-card__count {
  color: var(--green) !important;
}

/* TRENDMAP PLAIN CATEGORY COUNTS END */


.tm-analysis-card__copy-audio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  opacity: 0.7;
  cursor: pointer;
  border-radius: 6px;
}

.tm-analysis-card__copy-audio:hover {
  opacity: 1;
  background: rgba(255,255,255,0.08);
}

.tm-analysis-card__copy-audio svg {
  display: block;
}


/* TRENDMAP REAL PERCENT LEFT START */

#trendCardsList .trend-card__growth-value {
  position: absolute !important;
  left: 9px !important;
  right: auto !important;
  bottom: 15px !important;
  transform: none !important;
  margin: 0 !important;
}

@media (max-width: 767px) {
  #trendCardsList .trend-card__growth-value {
    left: 7px !important;
    right: auto !important;
    bottom: 11px !important;
    transform: none !important;
  }
}

/* TRENDMAP REAL PERCENT LEFT END */


/* TRENDMAP AUTHOR GREEN START */

#trendCardsList
.trend-card--author-under-category
> .trend-card__author {
  color: #68d453 !important;
}

/* TRENDMAP AUTHOR GREEN END */





/* TRENDMAP PREVIEW BRIGHT START */

#trendCardsList .trend-card__preview::before,
#trendCardsList .trend-card__preview::after {
  display: none !important;
  opacity: 0 !important;
  background: none !important;
}

#trendCardsList .trend-card__media {
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  box-shadow: none !important;
}

/* TRENDMAP PREVIEW BRIGHT END */


/* TRENDMAP METRICS ONE CLEAN FIX START */

#trendCardsList .trend-card__preview {
  --tm-card-edge: 9px;
  position: relative !important;
}

/* Один и тот же точный отступ:
   плашки слева — метрики справа. */
#trendCardsList .trend-card__category-pill,
#trendCardsList .trend-card__author,
#trendCardsList .trend-card__growth-value {
  left: var(--tm-card-edge) !important;
}

#trendCardsList
.trend-card__preview
> .trend-card__preview-metrics {
  position: absolute !important;

  top: 50% !important;
  right: var(--tm-card-edge) !important;
  bottom: auto !important;
  left: auto !important;

  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;

  transform: translateY(-50%) !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;

  z-index: 50 !important;
}

#trendCardsList
.trend-card__preview
> .trend-card__preview-metrics
.trend-card__preview-metric {
  width: max-content !important;
  min-width: 0 !important;
  margin: 0 !important;

  text-shadow:
    0 2px 2px rgba(0, 0, 0, 1),
    0 4px 9px rgba(0, 0, 0, 1),
    0 0 16px rgba(0, 0, 0, 0.95) !important;
}

#trendCardsList
.trend-card__preview
> .trend-card__preview-metrics
svg {
  filter:
    drop-shadow(0 2px 2px rgba(0, 0, 0, 1))
    drop-shadow(0 4px 8px rgba(0, 0, 0, 1)) !important;
}

@media (max-width: 767px) {
  #trendCardsList .trend-card__preview {
    --tm-card-edge: 7px;
  }
}

/* TRENDMAP METRICS ONE CLEAN FIX END */

/* TRENDMAP SAVED REELS FINAL CSS START */

#savedLink {
  text-decoration: none !important;
}

#savedLink .sidebar-link__icon {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

#savedLink .sidebar-link__icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#savedLink .sidebar-link__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 23px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(104, 212, 83, 0.16);
  color: #8ee77e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.tm-saved-final-button {
  appearance: none;
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 8px;
  padding: 0;
  border: 1px solid rgba(104, 212, 83, 0.38);
  border-radius: 10px;
  background: rgba(7, 13, 9, 0.82);
  color: #8ee77e;
  cursor: pointer;
}

.tm-saved-final-button svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tm-saved-final-button.is-saved {
  border-color: rgba(104, 212, 83, 0.72);
  background: rgba(104, 212, 83, 0.20);
}

.tm-saved-final-button.is-saved path {
  fill: currentColor;
}

/* TRENDMAP SAVED REELS FINAL CSS END */

/* TRENDMAP NEURAL SECTION CSS START */

#notificationsLink {
  text-decoration: none !important;
}

#notificationsLink .sidebar-link__label {
  display: block;
}

.neural-placeholder {
  width: min(760px, 100%);
  margin-top: 12px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  background: rgba(16, 22, 17, 0.92);
}

.neural-placeholder__eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  color: #68d453;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.neural-placeholder h2 {
  margin: 0 0 14px;
  color: #f4f7f3;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

.neural-placeholder p {
  max-width: 680px;
  margin: 0;
  color: #b7c0b8;
  font-size: 16px;
  line-height: 1.65;
}

.neural-placeholder__note {
  margin-top: 14px !important;
  color: #7f8b81 !important;
  font-size: 14px !important;
}

@media (max-width: 767px) {
  .neural-placeholder {
    padding: 22px 18px;
    border-radius: 16px;
  }
}

/* TRENDMAP NEURAL SECTION CSS END */

/* TRENDMAP SIDEBAR CLEAN STYLE START */

/* Никаких зеленых или серых залитых полей. */
#savedLink,
#notificationsLink,
#categoriesList .category-card,
#savedLink:hover,
#notificationsLink:hover,
#categoriesList .category-card:hover,
#savedLink.sidebar-link--active,
#notificationsLink.sidebar-link--active,
#categoriesList .category-card--active,
#savedLink[aria-current="page"],
#notificationsLink[aria-current="page"] {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Один шрифт и один размер у Сохраненных, Нейросетей и категорий. */
#savedLink,
#notificationsLink,
#savedLink .sidebar-link__label,
#notificationsLink .sidebar-link__label,
#categoriesList .category-card,
#categoriesList .category-card__name {
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

/* Неактивные пункты — одинакового спокойного цвета. */
#savedLink,
#notificationsLink,
#categoriesList .category-card,
#savedLink .sidebar-link__label,
#notificationsLink .sidebar-link__label,
#categoriesList .category-card__name {
  color: rgba(242, 246, 242, 0.78) !important;
}

/* Активный раздел выделяется только зеленым текстом. */
#savedLink.sidebar-link--active,
#notificationsLink.sidebar-link--active,
#savedLink.sidebar-link--active .sidebar-link__label,
#notificationsLink.sidebar-link--active .sidebar-link__label,
#savedLink[aria-current="page"],
#notificationsLink[aria-current="page"],
#categoriesList .category-card--active,
#categoriesList .category-card--active .category-card__name,
#categoriesList .category-card--active .category-card__count {
  color: #68d453 !important;
}

/* При наведении меняется только цвет текста. */
#savedLink:hover,
#notificationsLink:hover,
#categoriesList .category-card:hover,
#savedLink:hover .sidebar-link__label,
#notificationsLink:hover .sidebar-link__label,
#categoriesList .category-card:hover .category-card__name {
  color: #ffffff !important;
}

/* TRENDMAP SIDEBAR CLEAN STYLE END */

/* TRENDMAP PILL TOOLTIP REPAIR START */

:root {
  --tm-preview-pill-bg: rgba(5, 8, 5, 0.94);
  --tm-preview-pill-border: rgba(104, 212, 83, 0.16);
  --tm-preview-pill-green: #68d453;
}

/*
 * Одинаковый визуальный стиль трех плашек.
 * Размеры, высота, шрифт и отступы процента не меняются.
 */
#trendCardsList .trend-card__category-pill,
#trendCardsList .trend-card__author-pill,
#trendCardsList .trend-card__growth-value {
  border-color: var(--tm-preview-pill-border) !important;
  border-style: solid !important;
  border-width: 1px !important;
  border-radius: 999px !important;

  background: var(--tm-preview-pill-bg) !important;
  background-color: var(--tm-preview-pill-bg) !important;
  background-image: none !important;

  opacity: 1 !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.26) !important;
}

/*
 * Автор остается под категорией.
 */
#trendCardsList .trend-card__author-pill {
  position: absolute !important;
  top: 34px !important;
  left: 10px !important;
  z-index: 7 !important;

  display: inline-flex !important;
  align-items: center !important;

  max-width: calc(100% - 20px) !important;
  min-height: 21px !important;
  padding: 4px 8px !important;

  overflow: hidden !important;
  color: var(--tm-preview-pill-green) !important;

  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;

  pointer-events: none !important;
}

/*
 * Процент возвращается к собственным исходным размерам.
 * Здесь нет height, padding, width и font-size.
 */
#trendCardsList .trend-card__growth-value {
  position: absolute !important;
  overflow: visible !important;

  color: var(--tm-preview-pill-green) !important;

  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Убираем браузерный курсор со знаком вопроса. */
#trendCardsList .trend-card__growth-value:hover {
  cursor: pointer !important;
}

/*
 * Отдельная плавающая подсказка.
 * Она находится в body, поэтому карточка ее не обрезает.
 */
.tm-growth-tooltip-floating {
  position: fixed;
  z-index: 100000;

  box-sizing: border-box;
  width: max-content;
  max-width: min(220px, calc(100vw - 24px));
  padding: 8px 12px;

  border: 1px solid rgba(104, 212, 83, 0.16);
  border-radius: 9px;

  background: #050805;
  color: #f4f7f3;

  font-family: "Manrope", "Rubik", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;

  box-shadow:
    0 7px 22px rgba(0, 0, 0, 0.56);

  transform: translate(-50%, -50%);

  pointer-events: none;
}

.tm-growth-tooltip-floating[hidden] {
  display: none !important;
}

/*
 * На мобильном не создаем другую версию плашек.
 * Меняется только положение автора под категорией.
 */
@media (max-width: 767px) {
  #trendCardsList .trend-card__author-pill {
    top: 32px !important;
    left: 8px !important;
    max-width: calc(100% - 16px) !important;
  }

  .tm-growth-tooltip-floating {
    max-width: calc(100vw - 20px);
    padding: 7px 10px;
    font-size: 10px;
  }
}

/* TRENDMAP PILL TOOLTIP REPAIR END */

/* TM REMOVE LEGACY TOOLTIP PARTS START */

/*
 * Удаляем старую CSS-подсказку и ее стрелку.
 * Новая .tm-growth-tooltip-floating остается рабочей.
 */
#trendCardsList .trend-card__growth-value::before,
#trendCardsList .trend-card__growth-value::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* TM REMOVE LEGACY TOOLTIP PARTS END */


/* TRENDMAP SIDEBAR QUALITY MOTION START */

@media (min-width: 768px) {

  /*
   * ОДНО основное движение:
   * плавно меняется только ширина левой колонки.
   */
  .app-shell {
    grid-template-columns:
      205px
      minmax(0, 1fr) !important;

    transition:
      grid-template-columns
      360ms
      cubic-bezier(.4, 0, .2, 1) !important;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns:
      46px
      minmax(0, 1fr) !important;
  }


  /*
   * Сам sidebar больше НЕ едет translateX(-100%).
   * Он просто следует за сужающейся колонкой.
   */
  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    visibility: visible !important;
    opacity: 1 !important;

    transform: none !important;

    overflow: hidden !important;

    transition: none !important;
  }


  /*
   * Уезжает только СОДЕРЖИМОЕ панели.
   * За счет этого движение выглядит как drawer,
   * но геометрия страницы не конфликтует сама с собой.
   */
  .sidebar > * {
    opacity: 1;

    transform:
      translate3d(0, 0, 0);

    transition:
      transform
        260ms
        cubic-bezier(.4, 0, .2, 1),
      opacity
        170ms
        ease !important;

    will-change:
      transform,
      opacity;
  }

  .app-shell.sidebar-collapsed .sidebar > * {
    opacity: 0;

    transform:
      translate3d(-22px, 0, 0);

    pointer-events: none;
  }


  /*
   * Main-area просто следует за изменением сетки.
   */
  .app-shell.sidebar-collapsed .main-area {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;

    transform: none !important;
  }


  /*
   * Маленькая кнопка открытия.
   */
  #sidebarOpen {
    position: fixed !important;

    left: 9px !important;
    top: 18px !important;

    z-index: 250 !important;

    display: grid !important;
    place-items: center !important;

    width: 28px !important;
    height: 28px !important;

    padding: 0 !important;
    margin: 0 !important;

    border:
      1px solid rgba(132,255,90,.18) !important;

    border-radius: 8px !important;

    background:
      rgba(8,15,16,.94) !important;

    color:
      #84ff5a !important;

    box-shadow:
      0 3px 9px rgba(0,0,0,.17) !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transform:
      translate3d(-4px,0,0)
      scale(.96) !important;

    transition:
      opacity 150ms ease,
      transform 190ms cubic-bezier(.4,0,.2,1),
      visibility 0s linear 190ms !important;
  }


  /*
   * Появляется ПОСЛЕ того, как sidebar уже почти свернулся.
   * Поэтому нет ощущения, что элементы сталкиваются.
   */
  .app-shell.sidebar-collapsed #sidebarOpen {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;

    transform:
      translate3d(0,0,0)
      scale(1) !important;

    transition:
      opacity 160ms ease 210ms,
      transform 190ms cubic-bezier(.4,0,.2,1) 190ms,
      visibility 0s linear 0s !important;
  }


  #sidebarOpen svg {
    display: none !important;
  }

  #sidebarOpen::before {
    content: "";

    width: 6px;
    height: 6px;

    border-top:
      1.5px solid currentColor;

    border-right:
      1.5px solid currentColor;

    transform:
      translateX(-1px)
      rotate(45deg);
  }


  .app-shell.sidebar-collapsed #sidebarOpen:hover {
    background:
      rgba(132,255,90,.08) !important;

    border-color:
      rgba(132,255,90,.34) !important;
  }


  .app-shell.sidebar-collapsed #sidebarOpen:active {
    transform:
      scale(.96) !important;
  }

}

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .sidebar > *,
  #sidebarOpen {
    transition: none !important;
  }
}

/* TRENDMAP SIDEBAR QUALITY MOTION END */

/* TRENDMAP MOBILE SHELL UNIFIED START */
@media (max-width: 767px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    display: block !important;
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 220 !important;
    width: min(86vw, 320px) !important;
    min-width: 0 !important;
    max-width: 320px !important;
    min-height: 100dvh !important;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 12px calc(16px + env(safe-area-inset-bottom, 0px)) 16px !important;
    border: 0 !important;
    border-right: 1px solid rgba(255,255,255,.09) !important;
    background: rgba(5,10,12,.995) !important;
    box-shadow: 20px 0 46px rgba(0,0,0,.52) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translate3d(0,0,0) !important;
    pointer-events: auto !important;
    transition: transform 260ms cubic-bezier(.4,0,.2,1), opacity 190ms ease !important;
    will-change: transform, opacity;
  }

  .app-shell.sidebar-collapsed .sidebar {
    opacity: 0 !important;
    transform: translate3d(-104%,0,0) !important;
    pointer-events: none !important;
    box-shadow: none !important;
  }

  #sidebarOpen,
  .sidebar-open {
    position: fixed !important;
    left: 10px !important;
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    z-index: 230 !important;
    display: grid !important;
    place-items: center !important;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(132,255,90,.20) !important;
    border-radius: 8px !important;
    background: rgba(8,15,16,.96) !important;
    color: #84ff5a !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate3d(-5px,0,0) !important;
    transition: opacity 150ms ease, transform 190ms cubic-bezier(.4,0,.2,1), visibility 0s linear 190ms !important;
  }

  .app-shell.sidebar-collapsed #sidebarOpen,
  .app-shell.sidebar-collapsed .sidebar-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0,0,0) !important;
    transition: opacity 160ms ease 120ms, transform 190ms cubic-bezier(.4,0,.2,1) 100ms, visibility 0s linear 0s !important;
  }

  #savedLink,
  #notificationsLink,
  #categoriesList .category-card {
    min-height: 42px !important;
    touch-action: manipulation;
  }
}
/* TRENDMAP MOBILE SHELL UNIFIED END */
