/* ===== Шрифт ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== Переменные ===== */
:root {
  --bg: #08090d;
  --bg-soft: #0d0f16;

  --surface: rgba(19, 22, 32, 0.86);
  --surface-solid: #131620;
  --surface-light: #1a1f2d;
  --surface-hover: #232a3b;

  --text: #f4f6fb;
  --text-muted: #a5adbd;
  --text-soft: #c7ccd8;

  --accent: #f2a45d;
  --accent-2: #ffcf8a;
  --accent-soft: rgba(242, 164, 93, 0.16);
  --accent-border: rgba(242, 164, 93, 0.45);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --row-bg: rgba(255, 255, 255, 0.025);
  --row-alt: rgba(255, 255, 255, 0.045);
  --row-hover: rgba(242, 164, 93, 0.12);

  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

/* ===== База ===== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(135deg, #08090d 0%, #0b0d14 48%, #07080c 100%);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
  z-index: -1;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ===== Header ===== */
header {
  position: relative;
  padding: 34px 26px 28px;
  text-align: center;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

header h1 {
  display: inline-block;
  margin: 0;
  font-size: clamp(32px, 4.4vw, 68px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  background: linear-gradient(
    90deg,
    #ffcf8a 0%,
    #f2a45d 28%,
    #ffd69f 68%,
    #ffe2b7 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header input {
  display: block;
  width: min(760px, 94%);
  margin: 24px auto 0;
  padding: 15px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(10, 12, 18, 0.78);
  color: var(--text);
  font: inherit;
  outline: none;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

header input::placeholder {
  color: var(--text-muted);
}

header input:focus {
  border-color: var(--accent-border);
  box-shadow:
    0 0 0 4px var(--accent-soft),
    0 16px 44px rgba(0, 0, 0, 0.36);
  transform: translateY(-1px);
}

/* ===== Layout ===== */
main {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px;
  gap: 22px;
}

/* ===== Категории ===== */
.categories-panel {
  flex: 0 0 260px;
  align-self: flex-start;
  position: sticky;
  top: 20px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.categories {
  margin: 0;
  padding: 0;
}

.categories li {
  position: relative;
  list-style: none;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.categories li:last-child {
  margin-bottom: 0;
}

.categories li:hover {
  background: rgba(242, 164, 93, 0.12);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(242, 164, 93, 0.22) inset;
  transform: translateX(3px);
}

.categories li.active {
  color: #16110b;
  background: linear-gradient(135deg, rgba(242, 164, 93, 0.95), rgba(255, 207, 138, 0.9));
  box-shadow: 0 10px 28px rgba(242, 164, 93, 0.18);
}

/* ===== Основная область ===== */
.table-container {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow-x: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

/* ===== Фильтры ===== */
#movieSeriesFilters,
#subfilters,
#genreFilters {
  display: none;
  vertical-align: top;
  margin: 0 12px 16px 0;
}

#movieSeriesFilters:not(:empty),
#subfilters:not(:empty),
#genreFilters:not(:empty) {
  display: inline-flex;
}

#genreFilters {
  margin-right: 0;
}

#movieSeriesFilters:empty,
#subfilters:empty,
#genreFilters:empty {
  display: none !important;
  margin: 0 !important;
}

.dropdown {
  position: relative;
  display: inline-block;
  width: 235px;
  margin: 0;
}

.dropdown-button {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.dropdown-button::after {
  content: "⌄";
  float: right;
  color: var(--text-muted);
}

.dropdown-button:hover,
.dropdown.open .dropdown-button {
  border-color: var(--accent-border);
  background: var(--surface-hover);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  z-index: 20;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(14, 17, 25, 0.98);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
}

.dropdown.open .dropdown-menu {
  display: block;
}

.sg-legend {
  display: none;
}

.dropdown-menu label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.dropdown-menu label:hover {
  background: rgba(242, 164, 93, 0.12);
  color: #fff;
  border-color: rgba(242, 164, 93, 0.22);
}

.dropdown-menu label:has(input[type="checkbox"]:checked) {
  background: linear-gradient(135deg, rgba(242, 164, 93, 0.92), rgba(255, 207, 138, 0.86));
  color: #16110b;
  border-color: rgba(255, 207, 138, 0.65);
  box-shadow: 0 8px 22px rgba(242, 164, 93, 0.18);
}

.dropdown-menu label:has(input[type="checkbox"]:checked)::after {
  content: "✓";
  margin-left: auto;
  font-weight: 800;
}

.dropdown-menu input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ===== Таблица ===== */
table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  border-radius: 18px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px;
  text-align: left;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    #151925;
  border-bottom: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  user-select: none;
}

thead th:first-child {
  border-top-left-radius: 18px;
}

thead th:last-child {
  border-top-right-radius: 18px;
}

tbody td {
  padding: 13px 14px;
  text-align: left;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  vertical-align: middle;
  line-height: 1.5;
  font-size: 14px;
  font-weight: 400;
}

tbody tr:nth-child(even) {
  background: var(--row-alt);
}

tbody tr:nth-child(odd) {
  background: var(--row-bg);
}

tbody tr {
  transition: background 0.16s ease;
}

tbody tr:hover {
  background: var(--row-hover);
}

tbody tr:hover td {
  color: var(--text);
}

tbody td:first-child {
  color: #fff;
  font-weight: 700;
}

/* ===== Ссылки ===== */
a {
  color: #f2a45d;
  text-decoration: none;
  transition:
    color 0.16s ease,
    opacity 0.16s ease;
}

a:hover {
  color: #ffcf8a;
  text-decoration: none;
}

.stream-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 28px;
}

.stream-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--border);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.stream-link-icon img {
  display: block;
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.stream-link-icon:hover {
  transform: translateY(-2px) scale(1.04);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(242, 164, 93, 0.45);
  box-shadow: 0 10px 24px rgba(242, 164, 93, 0.16);
}

.stream-link-icon--disabled {
  display: none;
}

/* ===== Ширины: фильмы / мультфильмы / аниме ===== */
/* Название | Год | Жанры | Рецензия | Оценка | Ссылка */
.films-table th:nth-child(1),
.films-table td:nth-child(1) {
  width: 250px;
}

.films-table th:nth-child(2),
.films-table td:nth-child(2) {
  width: 82px;
  text-align: center;
}

.films-table th:nth-child(3),
.films-table td:nth-child(3) {
  width: 180px;
}

.films-table th:nth-child(4),
.films-table td:nth-child(4) {
  width: auto;
  text-align: justify;
  text-align-last: left;
}

.films-table th:nth-child(5),
.films-table td:nth-child(5) {
  width: 88px;
  text-align: center;
}

.films-table th:nth-child(6),
.films-table td:nth-child(6) {
  width: 104px;
  text-align: center;
}

/* ===== Ширины: сериалы / мультсериалы / аниме-сериалы ===== */
/* Название | Сезоны | Год | Жанры | Рецензия | Оценка | Ссылка */
.series-table th:nth-child(1),
.series-table td:nth-child(1) {
  width: 240px;
}

.series-table th:nth-child(2),
.series-table td:nth-child(2) {
  width: 105px;
  text-align: center;
}

.series-table th:nth-child(3),
.series-table td:nth-child(3) {
  width: 82px;
  text-align: center;
}

.series-table th:nth-child(4),
.series-table td:nth-child(4) {
  width: 200px;
}

.series-table th:nth-child(5),
.series-table td:nth-child(5) {
  width: auto;
  text-align: justify;
  text-align-last: left;
}

.series-table th:nth-child(6),
.series-table td:nth-child(6) {
  width: 88px;
  text-align: center;
}

.series-table th:nth-child(7),
.series-table td:nth-child(7) {
  width: 104px;
  text-align: center;
}

/* ===== Ширины: документалки ===== */
/* Название | Год | Рецензия | Ссылка */
.docs-table th:nth-child(1),
.docs-table td:nth-child(1) {
  width: 260px;
}

.docs-table th:nth-child(2),
.docs-table td:nth-child(2) {
  width: 82px;
  text-align: center;
}

.docs-table th:nth-child(3),
.docs-table td:nth-child(3) {
  width: auto;
  text-align: justify;
  text-align-last: left;
}

.docs-table th:nth-child(4),
.docs-table td:nth-child(4) {
  width: 104px;
  text-align: center;
}

/* ===== Ширины: прохождения игр ===== */
/* Название | Год | Рецензия | Ссылка */
.games-table th:nth-child(1),
.games-table td:nth-child(1) {
  width: 260px;
}

.games-table th:nth-child(2),
.games-table td:nth-child(2) {
  width: 82px;
  text-align: center;
}

.games-table th:nth-child(3),
.games-table td:nth-child(3) {
  width: auto;
  text-align: justify;
  text-align-last: left;
}

.games-table th:nth-child(4),
.games-table td:nth-child(4) {
  width: 104px;
  text-align: center;
}

/* ===== Ширины: простые видео-категории ===== */
/* Название | Рецензия | Ссылка */
.video-table th:nth-child(1),
.video-table td:nth-child(1),
.music-table th:nth-child(1),
.music-table td:nth-child(1),
.other-table th:nth-child(1),
.other-table td:nth-child(1) {
  width: 290px;
}

.video-table th:nth-child(2),
.video-table td:nth-child(2),
.music-table th:nth-child(2),
.music-table td:nth-child(2),
.other-table th:nth-child(2),
.other-table td:nth-child(2) {
  width: auto;
  text-align: justify;
  text-align-last: left;
}

.video-table th:nth-child(3),
.video-table td:nth-child(3),
.music-table th:nth-child(3),
.music-table td:nth-child(3),
.other-table th:nth-child(3),
.other-table td:nth-child(3) {
  width: 104px;
  text-align: center;
}

/* ===== Эксклюзивно на Boosty ===== */
/* Название | Год | Жанры | Рецензия | Ссылка */
.exclusive-table th:nth-child(1),
.exclusive-table td:nth-child(1) {
  width: 260px;
}

.exclusive-table th:nth-child(2),
.exclusive-table td:nth-child(2) {
  width: 90px;
  text-align: center;
}

.exclusive-table th:nth-child(3),
.exclusive-table td:nth-child(3) {
  width: 190px;
}

.exclusive-table th:nth-child(4),
.exclusive-table td:nth-child(4) {
  width: auto;
  text-align: justify;
  text-align-last: left;
}

.exclusive-table th:nth-child(5),
.exclusive-table td:nth-child(5) {
  width: 110px;
  text-align: center;
}

/* ===== Раскрывающиеся посты ===== */
.stream-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.stream-expand-btn:hover {
  transform: translateY(-2px);
  background: rgba(242, 164, 93, 0.14);
  border-color: rgba(242, 164, 93, 0.45);
  box-shadow: 0 10px 24px rgba(242, 164, 93, 0.16);
}

.stream-expand-btn.active {
  background: linear-gradient(135deg, rgba(242, 164, 93, 0.95), rgba(255, 207, 138, 0.9));
  color: #ffffff;
  border-color: rgba(255, 207, 138, 0.65);
  transform: rotate(180deg);
}

.stream-detail-row td {
  padding: 0 !important;
  background: rgba(8, 9, 13, 0.88) !important;
}

.stream-posts-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--border);
}

.stream-post-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--surface-solid);
}

.stream-post-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stream-post-title {
  color: #ffffff;
  font-weight: 700;
}

.stream-post-review {
  margin-top: 10px;
  color: var(--text-soft);
  line-height: 1.5;
  font-weight: 400;
  text-align: justify;
}

.stream-post-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.stream-post-no-links {
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== Footer ===== */
footer {
  margin-top: auto;
  padding: 24px 20px;
  text-align: center;
  font-size: 13px;
  background: rgba(13, 15, 22, 0.75);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ===== Мобильная версия ===== */
@media (max-width: 900px) {
  main {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }

  .categories-panel {
    position: static;
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 14px 0;
    overflow: hidden;
  }

  .categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 10px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .categories::-webkit-scrollbar {
    display: none;
  }

  .categories li {
    flex: 0 0 auto;
    min-width: max-content;
    margin: 0;
    padding: 10px 14px;
    white-space: nowrap;
  }

  .table-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  body::before {
    background-size: 30px 30px;
    opacity: 0.45;
  }

  header {
    padding: 24px 14px 18px;
  }

  header h1 {
    max-width: 100%;
    font-size: clamp(30px, 11vw, 46px);
    line-height: 0.95;
    letter-spacing: -0.055em;
  }

  header input {
    width: 100%;
    max-width: 100%;
    margin-top: 18px;
    padding: 14px 16px;
    font-size: 15px;
  }

  main {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 0;
  }

  .categories-panel {
    padding: 12px;
    border-radius: 18px;
  }

  #movieSeriesFilters,
  #subfilters,
  #genreFilters {
    display: none;
    width: 100%;
    margin: 0 0 10px 0;
  }

  #movieSeriesFilters:not(:empty),
  #subfilters:not(:empty),
  #genreFilters:not(:empty) {
    display: block;
  }

  .dropdown {
    width: 100%;
    display: block;
    position: relative;
    margin: 0;
  }

  .dropdown-button {
    width: 100%;
    padding: 13px 15px;
    font-size: 14px;
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    max-height: 260px;
    margin-top: 8px;
    margin-bottom: 12px;
    z-index: auto;
    box-shadow: none;
  }

  .dropdown-menu label {
    padding: 10px 12px;
    font-size: 14px;
  }

  .table-container {
    width: 100%;
    overflow-x: hidden;
    padding: 0;
  }

  table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-radius: 14px;
  }

  thead {
    display: table-header-group;
  }

  tbody {
    display: table-row-group;
  }

  tr {
    display: table-row;
  }

  th,
  td {
    display: table-cell;
    padding: 10px 8px;
    font-size: 12px;
    line-height: 1.35;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
  }

  /* Мобильные фильмы:
     Название | Год | Ссылка */
  .films-table th:nth-child(3),
  .films-table th:nth-child(4),
  .films-table th:nth-child(5),
  .films-table td:nth-child(3),
  .films-table td:nth-child(4),
  .films-table td:nth-child(5) {
    display: none;
  }

  .films-table th:nth-child(1),
  .films-table td:nth-child(1) {
    width: 58%;
    text-align: left;
  }

  .films-table th:nth-child(2),
  .films-table td:nth-child(2) {
    width: 18%;
    text-align: center;
  }

  .films-table th:nth-child(6),
  .films-table td:nth-child(6) {
    width: 24%;
    text-align: center;
  }

  /* Мобильные сериалы:
     Название | Год | Ссылка */
  .series-table th:nth-child(2),
  .series-table th:nth-child(4),
  .series-table th:nth-child(5),
  .series-table th:nth-child(6),
  .series-table td:nth-child(2),
  .series-table td:nth-child(4),
  .series-table td:nth-child(5),
  .series-table td:nth-child(6) {
    display: none;
  }

  .series-table th:nth-child(1),
  .series-table td:nth-child(1) {
    width: 58%;
    text-align: left;
  }

  .series-table th:nth-child(3),
  .series-table td:nth-child(3) {
    width: 18%;
    text-align: center;
  }

  .series-table th:nth-child(7),
  .series-table td:nth-child(7) {
    width: 24%;
    text-align: center;
  }

  /* Мобильные документалки:
     Название | Год | Ссылка */
  .docs-table th:nth-child(3),
  .docs-table td:nth-child(3) {
    display: none;
  }

  .docs-table th:nth-child(1),
  .docs-table td:nth-child(1) {
    width: 58%;
    text-align: left;
  }

  .docs-table th:nth-child(2),
  .docs-table td:nth-child(2) {
    width: 18%;
    text-align: center;
  }

  .docs-table th:nth-child(4),
  .docs-table td:nth-child(4) {
    width: 24%;
    text-align: center;
  }

  /* Мобильные прохождения игр:
     Название | Год | Ссылка */
  .games-table th:nth-child(3),
  .games-table td:nth-child(3) {
    display: none;
  }

  .games-table th:nth-child(1),
  .games-table td:nth-child(1) {
    width: 58%;
    text-align: left;
  }

  .games-table th:nth-child(2),
  .games-table td:nth-child(2) {
    width: 18%;
    text-align: center;
  }

  .games-table th:nth-child(4),
  .games-table td:nth-child(4) {
    width: 24%;
    text-align: center;
  }

  /* Мобильные простые видео, музыка, другое:
     Название | Ссылка */
  .video-table th:nth-child(2),
  .video-table td:nth-child(2),
  .music-table th:nth-child(2),
  .music-table td:nth-child(2),
  .other-table th:nth-child(2),
  .other-table td:nth-child(2) {
    display: none;
  }

  .video-table th:nth-child(1),
  .video-table td:nth-child(1),
  .music-table th:nth-child(1),
  .music-table td:nth-child(1),
  .other-table th:nth-child(1),
  .other-table td:nth-child(1) {
    width: 70%;
    text-align: left;
  }

  .video-table th:nth-child(3),
  .video-table td:nth-child(3),
  .music-table th:nth-child(3),
  .music-table td:nth-child(3),
  .other-table th:nth-child(3),
  .other-table td:nth-child(3) {
    width: 30%;
    text-align: center;
  }

  /* Мобильный Boosty exclusive:
     Название | Год | Ссылка */
  .exclusive-table th:nth-child(3),
  .exclusive-table th:nth-child(4),
  .exclusive-table td:nth-child(3),
  .exclusive-table td:nth-child(4) {
    display: none;
  }

  .exclusive-table th:nth-child(1),
  .exclusive-table td:nth-child(1) {
    width: 58%;
    text-align: left;
  }

  .exclusive-table th:nth-child(2),
  .exclusive-table td:nth-child(2) {
    width: 18%;
    text-align: center;
  }

  .exclusive-table th:nth-child(5),
  .exclusive-table td:nth-child(5) {
    width: 24%;
    text-align: center;
  }

  .stream-links {
    justify-content: center;
    gap: 6px;
  }

  .stream-link-icon {
    width: 30px;
    height: 30px;
  }

  .stream-link-icon img {
    width: 20px;
    height: 20px;
  }

  .stream-detail-row {
    display: table-row;
  }

  .stream-detail-row td {
    display: table-cell;
    width: 100%;
    padding: 0;
  }

  .stream-posts-panel {
    padding: 10px;
  }

  .stream-post-card {
    padding: 12px;
    border-radius: 14px;
  }

  .stream-post-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .stream-post-links {
    justify-content: flex-start;
  }

  .stream-post-review {
    text-align: left;
  }

  footer {
    padding: 18px 12px;
    font-size: 12px;
  }
}

/* ===== Красивая кнопка раскрытия постов слева от названия ===== */

.stream-title-cell {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.stream-title-text {
  display: block;
  min-width: 0;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.stream-expand-placeholder {
  display: block;
  width: 30px;
  height: 30px;
}

/* новая аккуратная круглая кнопка */
.stream-expand-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  aspect-ratio: 1 / 1 !important;

  border: 1px solid rgba(242, 164, 93, 0.28) !important;
  border-radius: 50% !important;

  background:
    radial-gradient(circle at 35% 25%, rgba(255, 207, 138, 0.18), transparent 48%),
    rgba(255, 255, 255, 0.055) !important;

  color: #ffcf8a !important;
  cursor: pointer !important;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.18) !important;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease !important;
}

.stream-expand-btn svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

.stream-expand-btn:hover {
  transform: translateY(-1px) scale(1.04) !important;
  border-color: rgba(242, 164, 93, 0.62) !important;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 207, 138, 0.32), transparent 52%),
    rgba(242, 164, 93, 0.16) !important;
  color: #ffffff !important;
  box-shadow:
    0 0 0 4px rgba(242, 164, 93, 0.10),
    0 12px 26px rgba(242, 164, 93, 0.16) !important;
}

.stream-expand-btn.active {
  background: linear-gradient(135deg, rgba(242, 164, 93, 0.96), rgba(255, 207, 138, 0.92)) !important;
  border-color: rgba(255, 207, 138, 0.82) !important;
  color: #16110b !important;
  transform: none !important;
}

.stream-expand-btn.active svg {
  transform: rotate(90deg);
}

/* чтобы в колонке ссылок больше не было лишнего влияния кнопки */
.stream-links {
  justify-content: center;
}

/* мобильная версия */
@media (max-width: 760px) {
  .stream-title-cell {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
  }

  .stream-expand-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
  }

  .stream-expand-btn svg {
    width: 15px;
    height: 15px;
  }

  .stream-expand-placeholder {
    width: 28px;
    height: 28px;
  }
}

/* ===== Убираем отступ под кнопку, если постов нет ===== */

.stream-title-cell.no-posts {
  display: block !important;
}

.stream-title-cell.no-posts .stream-title-text {
  display: block;
}

.stream-title-cell.has-posts {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

/* ===== Счётчик найденных записей ===== */

.results-count {
  display: block !important;
  width: 100% !important;
  margin: 0 0 14px 0 !important;
  padding: 0 !important;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;

  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.results-count::before {
  content: none !important;
}

.results-count strong {
  color: #ffffff !important;
  font-weight: 800 !important;
}

.results-count:empty {
  display: none !important;
}

@media (max-width: 760px) {
  .results-count {
    margin: 0 0 10px 0 !important;
    font-size: 12px !important;
  }
}

/* ===== Центрирование фильтров ===== */

.table-container {
  text-align: center;
}

#movieSeriesFilters,
#subfilters,
#genreFilters {
  text-align: left;
}

#movieSeriesFilters:not(:empty),
#subfilters:not(:empty),
#genreFilters:not(:empty) {
  display: inline-flex !important;
  justify-content: center;
  vertical-align: top;
}

#movieSeriesFilters .dropdown,
#subfilters .dropdown,
#genreFilters .dropdown {
  text-align: left;
}