*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --radius: 8px;
  --font: system-ui, -apple-system, sans-serif;
  --text-muted: #b6b6b6;
  --gap: 16px;
  --border: #2a2a2a;
  --text-heading: #fff;
  --sidebar-bg: #080808;
  --sidebar-w: 72px;
  --sidebar-expanded-w: 260px;
  --tabbar-h: 56px;
  --surface-raised: #101010;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: #e0e0e0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #050505;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.logo__text {
  color: #fff;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0;
}

.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #e6e6e6;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.hamburger:hover {
  border-color: #444;
  color: #fff;
}

.main-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  order: 3;
  width: 100%;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.9rem;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.main-nav a:hover {
  background: var(--border);
  text-decoration: none;
}

.search-form {
  position: relative;
  display: flex;
  gap: 4px;
  flex: 1 1 100%;
  margin-left: 0;
  order: 2;
}

.search-form input {
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 1rem;
  width: 100%;
  min-width: 0;
}

@media (min-width: 768px) {
  .main-nav {
    order: 0;
    width: auto;
  }

  .search-form {
    order: 0;
    flex: 0 1 320px;
    margin-left: auto;
  }

  .search-form input {
    width: 100%;
  }
}

.search-form button {
  background: #fff;
  border: none;
  color: #000;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  margin-top: 4px;
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
}

.search-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  color: #d8d8d8;
  font-size: 0.9rem;
}

.search-dropdown__item.active,
.search-dropdown a:hover {
  background: #fff;
  color: #000;
  text-decoration: none;
}

/* Main heading (homepage H1) */
.main-heading {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-heading);
  line-height: 1.3;
}

/* Main content */
.main-content {
  padding: 24px 0;
}

/* Section titles */
.section-title,
.page-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-heading);
}

/* Category intro — SEO/GEO citability block, page 1 only */
.category-intro {
  color: var(--text);
  opacity: 0.8;
  line-height: 1.6;
  margin: 0 0 24px;
  padding: 12px 16px;
  border-left: 3px solid #333;
  background: var(--card);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.catalog-filter {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.catalog-filter__categories,
.catalog-filter__form,
.catalog-filter__quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.catalog-filter__category,
.catalog-filter__reset,
.catalog-filter__quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #e0e0e0;
  background: #0b0b0b;
  font-size: 0.9rem;
  text-decoration: none;
}

.catalog-filter__category--active,
.catalog-filter__quick-link--active {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-weight: 700;
}

.catalog-filter__quick {
  align-items: center;
}

.catalog-filter__quick-link {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 19px;
  background: #111;
  color: var(--text);
  font-size: 0.86rem;
}

.catalog-filter__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: #000;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.catalog-filter__field {
  display: grid;
  gap: 6px;
  min-width: min(100%, 160px);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.catalog-filter__field--genres {
  flex: 1 1 100%;
}

.catalog-filter__field select {
  min-height: 44px;
  padding: 10px 36px 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #080808;
  color: #f2f2f2;
  font: inherit;
}

.catalog-filter__genres {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.genre-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #080808;
  color: #d8d8d8;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  touch-action: manipulation;
}

.genre-toggle__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #555;
  color: #bdbdbd;
  font-size: 0.8rem;
  line-height: 1;
}

.genre-toggle--include {
  border-color: #fff;
  background: #fff;
  color: #000;
}

.genre-toggle--include .genre-toggle__mark {
  border-color: #000;
  background: #000;
  color: #fff;
}

.genre-toggle--exclude {
  border-color: rgba(239, 68, 68, 0.75);
  background: rgba(239, 68, 68, 0.16);
  color: #ffd0d0;
}

.genre-toggle--exclude .genre-toggle__mark {
  border-color: rgba(239, 68, 68, 0.85);
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

.catalog-filter__submit {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

.catalog-filter__reset {
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .films-section {
    display: flex;
    flex-direction: column;
  }

  .films-section > .section-title {
    order: 1;
  }

  .catalog-filter {
    order: 2;
  }

  .films-grid {
    order: 3;
  }

  .category-intro {
    order: 4;
    margin-top: 16px;
  }

  .pagination {
    order: 5;
  }

  .faq {
    order: 6;
  }

  .catalog-filter {
    margin-left: -4px;
    margin-right: -4px;
  }

  .catalog-filter__toggle {
    display: inline-flex;
    width: 100%;
  }

  .catalog-filter:not(.catalog-filter--open) .catalog-filter__form {
    display: none;
  }

  .catalog-filter__quick {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .catalog-filter__quick-link {
    flex: 0 0 auto;
  }

  .catalog-filter__field,
  .catalog-filter__submit,
  .catalog-filter__reset {
    width: 100%;
  }
}

/* Listing intro — SEO/GEO citability block for country/year/director, page 1 only */
.section-intro {
  color: var(--text);
  opacity: 0.8;
  line-height: 1.6;
  margin: 0 0 24px;
  padding: 12px 16px;
  border-left: 3px solid #333;
  background: var(--card);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

/* Films grid */
.films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 180px));
  gap: 12px;
  justify-content: start;
  margin-bottom: 32px;
}

/* Film card */
.film-card {
  display: block;
  min-width: 0;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.film-card:hover {
  border-color: #333;
  transform: translateY(-2px);
  text-decoration: none;
}

.film-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.film-card__poster-wrap {
  position: relative;
  aspect-ratio: 2/3;
  background: #111;
}

.film-card__badge {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(5, 5, 5, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(8px);
}

.card-info {
  padding: 10px;
}

.card-title {
  color: #f0f0f0;
  font-size: 0.88rem;
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: #b0b0b0;
  font-size: 0.75rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.card-rating {
  color: #aaa;
}

/* Film hero */
.film-hero {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.film-poster img {
  width: 200px;
  border-radius: var(--radius);
}

.film-info {
  flex: 1;
  min-width: 200px;
}

.film-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}

.film-title-en {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.film-ratings {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.rating-kp,
.rating-imdb {
  background: var(--card);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.rating-kp {
  color: #ccc;
}

.rating-imdb {
  color: #ccc;
}

.film-meta-table {
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 16px;
}

.film-meta-table td {
  padding: 6px 12px 6px 0;
  vertical-align: top;
}

.film-meta-table td:first-child {
  color: var(--text-muted);
  white-space: nowrap;
}

/* Intent block */
.film-intent {
  color: var(--text);
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.55;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.film-intent p {
  margin: 0;
}

/* Player */
.player-section {
  margin-bottom: 32px;
}

.player-placeholder {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  height: clamp(380px, 110vw, 580px);
}

@media (min-width: 768px) {
  .player-placeholder {
    height: clamp(280px, 56.25vw, 740px);
  }
}

.player-placeholder img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: blur(2px);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: none;
  color: #000;
  padding: 14px 28px;
  border-radius: 40px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, opacity 0.2s;
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.play-icon {
  font-size: 1.2rem;
}

/* Film description */
.film-description {
  margin-bottom: 32px;
  line-height: 1.7;
}

.film-description h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

/* Related sections */
.related-films,
.recommendations,
.franchise,
.director-films,
.year-films,
.related-tabs,
.film-hubs,
.film-cast,
.related-hubs,
.crosslinks,
.related-section,
.franchise-section {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.related-films h2,
.recommendations h2,
.franchise h2,
.director-films h2,
.year-films h2,
.related-tabs h2,
.film-hubs h2,
.film-cast h2,
.related-hubs h2,
.crosslinks h2,
.related-section h2,
.franchise-section h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1a;
}

/* Franchise list */
.franchise-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.franchise-item {
  background: var(--card);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: flex;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s;
}

.franchise-item:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.franchise-item.active {
  border: 2px solid #fff;
}

.hub-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-films .films-grid,
.recommendations .films-grid,
.director-films .films-grid,
.year-films .films-grid,
.related-tabs .films-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 10px;
  margin-bottom: 0;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}

.related-films .film-card,
.recommendations .film-card,
.director-films .film-card,
.year-films .film-card,
.related-tabs .film-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
}

.related-tabs {
  position: relative;
}

.related-tabs__radio {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  overflow: hidden;
}

.related-tabs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1a;
}

.related-tabs__head h2 {
  margin: 0;
  padding: 0;
  border: 0;
}

.related-tabs__nav {
  display: inline-flex;
  min-height: 38px;
  padding: 3px;
  gap: 3px;
  border: 1px solid #222;
  border-radius: 10px;
  background: #050505;
}

.related-tabs__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.related-tabs__tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.related-tabs__panel {
  display: none;
}

#related-tab-ring:checked ~ .related-tabs__head label[for="related-tab-ring"],
#related-tab-recs:checked ~ .related-tabs__head label[for="related-tab-recs"],
#related-tab-director:checked ~ .related-tabs__head label[for="related-tab-director"],
#related-tab-year:checked ~ .related-tabs__head label[for="related-tab-year"] {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.08);
}

#related-tab-ring:focus-visible ~ .related-tabs__head label[for="related-tab-ring"],
#related-tab-recs:focus-visible ~ .related-tabs__head label[for="related-tab-recs"],
#related-tab-director:focus-visible ~ .related-tabs__head label[for="related-tab-director"],
#related-tab-year:focus-visible ~ .related-tabs__head label[for="related-tab-year"] {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#related-tab-ring:checked ~ .related-tabs__panels .related-tabs__panel--ring,
#related-tab-recs:checked ~ .related-tabs__panels .related-tabs__panel--recs,
#related-tab-director:checked ~ .related-tabs__panels .related-tabs__panel--director,
#related-tab-year:checked ~ .related-tabs__panels .related-tabs__panel--year {
  display: block;
}

@media (max-width: 640px) {
  .related-tabs__head {
    align-items: stretch;
    flex-direction: column;
  }

  .related-tabs__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .related-tabs__tab {
    padding: 0 8px;
    font-size: 0.8rem;
  }
}

.film-hubs .hub-chip-list,
.franchise-list {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}

.film-hubs .hub-chip,
.franchise-item {
  flex: 0 0 auto;
  max-width: min(78vw, 360px);
}

.hub-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.25;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.hub-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  text-decoration: none;
}

.hub-chip-list--catalog {
  margin-bottom: 48px;
}

.persons-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.cast-item {
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.cast-item:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.cast-item--plain {
  color: rgba(255, 255, 255, 0.72);
}

.cast-photo {
  width: 54px;
  height: 54px;
  border-radius: 4px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.cast-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.cast-copy {
  min-width: 0;
  display: block;
}

.cast-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 700;
}

.cast-char {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Crosslinks */
.crosslinks-list {
  list-style: none;
}

.crosslinks-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.crosslink-site {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: #fff;
}

/* Footer */
.site-footer {
  background: #0a0a0a;
  border-top: 1px solid #1a1a1a;
  padding: 24px 0;
  margin-top: 40px;
  color: #a8a8a8;
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  margin-bottom: 12px;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted, #A0A0B0);
  text-decoration: none;
  font-size: 0.85rem;
}
.footer-nav a:hover {
  color: #fff;
}

/* No results */
.no-results {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 24px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  padding: 16px 0;
}

.btn-prev,
.btn-next {
  display: inline-block;
  background: var(--card);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-prev:hover,
.btn-next:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.page-info {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Hub description */
.hub-description {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Films section */
.films-section {
  margin-bottom: 48px;
}

/* Hub catalog (list page) */
.hub-catalog-section {
  margin-top: 28px;
}

.hub-catalog-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #fff;
}

.hub-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
  margin-bottom: 48px;
}

@media (min-width: 600px) {
  .hub-catalog {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.hub-catalog__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  border-top: 3px solid #333;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.hub-catalog__item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}

.hub-catalog__mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
  margin-top: 6px;
}

.hub-catalog__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.hub-catalog__name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.hub-catalog__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hub list page intro */
.page-intro {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ── Trailer button ── */
.btn-trailer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  min-height: 48px;
  padding: 10px 20px;
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-trailer:hover {
  background: #fff;
  color: #000;
  text-decoration: none;
}

/* ── CSS-only trailer modal (:target) ── */
.trailer-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.trailer-modal:target {
  display: flex;
}
.trailer-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}
.trailer-modal__box {
  position: relative;
  z-index: 1;
  width: min(900px, 96vw);
  aspect-ratio: 16 / 9;
}
.trailer-modal__box iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
  display: block;
}
.trailer-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  font-size: 2rem;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trailer-modal__close:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

/* ── Film stills grid ── */
.film-stills {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.film-stills h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1a;
}
.stills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 1024px) {
  .stills-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .stills-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
}
.still-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(var(--radius) / 2);
  background: var(--card);
  cursor: pointer;
}
.still-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.still-thumb:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* ── CSS-only stills lightbox (:target) ── */
.still-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9001;
  align-items: center;
  justify-content: center;
}
.still-overlay:target {
  display: flex;
}
.still-overlay__bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}
.still-overlay > img {
  position: relative;
  z-index: 1;
  max-width: 96vw;
  max-height: 90vh;
  border-radius: var(--radius);
  object-fit: contain;
  display: block;
}
.still-overlay__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  font-size: 2rem;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  background: rgba(0, 0, 0, 0.6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.still-overlay__close:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

/* ── "Зараз дивляться" pulse indicator ── */
.watching-now .section-title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #e53e3e;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 1.4s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.85); }
}

/* ── Lucky nav link ── */
.nav-lucky {
  color: #fff !important;
  font-weight: 600;
}

/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 8px;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}

/* Featured hubs grid on home page */
.hubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: #0a0a0a;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid #1a1a1a;
  transition: border-color .2s;
}
.hub-card:hover {
  border-color: #333;
  text-decoration: none;
}
.hub-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}
.hub-card__desc {
  font-size: .8rem;
  color: var(--text-muted, #999);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.all-hubs-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .9rem;
  color: #fff;
  text-decoration: none;
}
.all-hubs-link:hover { text-decoration: underline; }

/* FAQ section */
.faq { margin: 32px 0; }
.faq h2 { font-size: 1.25rem; margin-bottom: 16px; }
.faq details { margin-bottom: 8px; border: 1px solid var(--border, #333); border-radius: var(--radius, 8px); padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { margin: 0; }

/* Episode schedule */
.episode-schedule { margin: 32px 0; }
.episode-schedule h2 { font-size: 1.25rem; margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ep-progress { font-size: .85rem; font-weight: 400; color: var(--muted, #888); }
.ep-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ep-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ep-table th, .ep-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border, #333); }
.ep-table th { font-weight: 600; white-space: nowrap; }
.ep-table tbody tr:hover { background: var(--surface2, rgba(255,255,255,.04)); }
.ep-check-cell { text-align: center; }
.ep-check-label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.ep-check-label input[type=checkbox] { width: 20px; height: 20px; accent-color: #fff; cursor: pointer; }
.ep-login-cta { margin-top: 12px; font-size: .9rem; color: var(--muted, #888); }
.ep-login-cta a { color: #fff; }
.ep-login-cta__button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.ep-schedule {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 20px;
}

.ep-season {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.ep-season + .ep-season {
  margin-top: 10px;
}

.ep-season-head {
  min-height: 48px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  list-style: none;
}

.ep-season-head::-webkit-details-marker {
  display: none;
}

.ep-season-head::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--primary);
  transition: transform 0.18s;
  flex: 0 0 auto;
}

.ep-season[open] .ep-season-head::before {
  transform: rotate(90deg);
}

.ep-season-count {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.ep-mark-all,
.ep-show-more {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.ep-mark-all {
  padding: 0 10px;
}

.ep-show-more {
  width: calc(100% - 24px);
  margin: 12px;
}

.ep-mark-all:hover,
.ep-show-more:hover {
  border-color: var(--primary);
}

.ep-row-hidden[hidden] {
  display: none;
}

.ep-num {
  width: 80px;
  color: var(--primary);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ep-title {
  color: #fff;
  font-weight: 600;
}

.ep-date,
.ep-countdown {
  white-space: nowrap;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.ep-upcoming .ep-countdown,
.ep-today .ep-countdown {
  color: var(--primary);
  font-weight: 700;
}

.ep-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--primary);
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
  text-align: center;
}
@media (max-width: 480px) {
  .ep-table th, .ep-table td { padding: 8px 8px; font-size: .82rem; }
}

@media (max-width: 640px) {
  .ep-schedule {
    padding: 14px;
  }

  .ep-season-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ep-season-count {
    margin-left: 0;
  }

  .ep-mark-all {
    width: 100%;
  }

  .ep-table-wrap {
    overflow-x: visible;
  }

  .ep-table,
  .ep-table tbody,
  .ep-table tr,
  .ep-table td {
    display: block;
    width: 100%;
  }

  .ep-table {
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .ep-table thead {
    display: none;
  }

  .ep-table tr {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
  }

  .ep-table td {
    border: 0;
    padding: 3px 0;
  }

  .ep-num::before {
    content: "Серія ";
    color: var(--text-muted);
    font-weight: 500;
  }

  .ep-date::before {
    content: "Дата: ";
  }

  .ep-countdown::before {
    content: "Статус: ";
  }

  .ep-check-cell {
    text-align: left;
  }
}

/* Watch page */
.watch-page {
  max-width: 1200px;
}

.player-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 720px;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 640px) {
  .player-wrap {
    aspect-ratio: 4 / 3;
    max-height: none;
  }
}

.player-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

#watch-player {
  scroll-margin-top: 96px;
}

.player-section h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.watch-nav {
  margin-bottom: 16px;
}

.back-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.back-link:hover {
  text-decoration: underline;
}

/* Film actions (watch + trailer buttons) */
.film-actions {
  display: flex;
  gap: 12px;
  margin: 16px 0 12px;
  flex-wrap: wrap;
}

.film-actions--hero {
  margin-top: 14px;
}

.btn-watch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: #000;
  min-height: 48px;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: opacity 0.2s;
  letter-spacing: 0;
}

.btn-watch:hover {
  opacity: 0.85;
  text-decoration: none;
}

.film-actions .btn-trailer {
  margin-top: 0;
}

.btn-trailer::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

/* "Нова серія" badge on cards */
.badge-new-ep {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #10B981;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

/* Auth pages */
.auth-page {
  max-width: 400px;
  margin: 0 auto;
  padding: 40px 16px;
}

.auth-page h1 {
  text-align: center;
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-method {
  margin: 0;
}

.auth-method--magic {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
}

.auth-method__title {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.auth-method__hint {
  margin: 0 0 14px;
  color: #bdbdbd;
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #aaa;
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.12);
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #e8e8e8;
}

.auth-form input {
  min-height: 48px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.15);
  background: var(--card);
  color: #f2f2f2;
  font-size: 1rem;
}

.auth-form input:focus {
  outline: 2px solid #fff;
  border-color: transparent;
}

.auth-error {
  background: rgba(239, 68, 68, 0.18);
  color: #ffb4b4;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 12px;
  border-radius: var(--radius);
  text-align: center;
}

.auth-success {
  background: #10b98120;
  color: #34d399;
  padding: 12px;
  border-radius: var(--radius);
  text-align: center;
}

.auth-required-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h, 0px) + 18px);
  z-index: 1000;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  color: #f5f5f5;
  padding: 14px 44px 14px 14px;
}

.auth-required-toast__text {
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-required-toast__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.auth-required-toast__actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fff;
  color: #000;
  font-weight: 700;
  text-decoration: none;
}

.auth-required-toast__actions a + a {
  background: transparent;
  color: #fff;
  border: 1px solid #3a3a3a;
}

.auth-required-toast__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #cfcfcf;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.auth-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
}

.auth-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 0.9rem;
}

.auth-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
}

/* Auth nav in header */
.auth-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}

.auth-link:hover {
  color: #fff;
  opacity: 1;
}

/* Profile */
.profile-info {
  text-align: center;
  margin-bottom: 24px;
}

.profile-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Sidebar Layout ── */
.page-layout {
  /* overlay sidebar — no flex needed */
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 140;
}

.sidebar-backdrop.open {
  display: block;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #0a0a0a;
  border-right: 1px solid #1a1a1a;
  padding: 70px 0 16px;
  z-index: 150;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #222 transparent;
}

.sidebar.open {
  transform: translateX(0);
}

@media (min-width: 1200px) {
  .hamburger {
    display: none;
  }

	  .page-layout {
	    display: grid;
	    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
	    max-width: 1510px;
	    margin: 0 auto;
	    transition: grid-template-columns 0.18s ease;
	  }

  .page-layout--sidebar-expanded {
    grid-template-columns: var(--sidebar-expanded-w) minmax(0, 1fr);
  }

	  .sidebar {
	    position: sticky;
	    top: 69px;
	    width: var(--sidebar-w);
	    height: calc(100vh - 69px);
	    padding: 16px 0;
	    transform: none;
	    z-index: 1;
	    transition: width 0.18s ease;
	  }

  .page-layout--sidebar-expanded .sidebar {
    width: var(--sidebar-expanded-w);
  }

  .sidebar.open {
    transform: none;
  }

  .sidebar-backdrop,
  .sidebar-backdrop.open {
    display: none;
  }

  .content-area {
    max-width: none;
    margin: 0;
    width: 100%;
  }
}

.sidebar__section { padding: 0 12px; margin-bottom: 4px; }

.sidebar__heading {
  color: #9a9a9a;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0 8px;
  margin-bottom: 8px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 10px;
  color: #d0d0d0;
  font-size: 0.9rem;
  border-radius: var(--radius);
  margin-bottom: 1px;
  text-decoration: none;
  transition: background 0.15s;
}

.sidebar__toggle {
  display: none;
  width: calc(100% - 16px);
  min-height: 44px;
  margin: 0 8px 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #101010;
  color: #e6e6e6;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar__sep--toggle {
  display: none;
}

.sidebar__toggle:hover {
  background: #181818;
  border-color: #444;
}

.sidebar__toggle-icon {
  transition: transform 0.18s ease;
}

.page-layout--sidebar-expanded .sidebar__toggle-icon {
  transform: rotate(180deg);
}

.sidebar__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.sidebar__label {
  min-width: 0;
}

.sidebar__link:hover {
  background: #151515;
  text-decoration: none;
}

.sidebar__link--active {
  background: var(--border);
  color: var(--text-heading);
}

.sidebar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  background: #262626;
  color: #d6d6d6;
  font-size: 0.7rem;
  border-radius: 9px;
}

.sidebar__sep {
  height: 1px;
  background: #141414;
  margin: 10px 12px;
}

.sidebar__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #444;
  display: inline-block;
  margin: 0 6px;
}

.sidebar__link--watching {
  color: #c8c8c8;
  padding: 10px;
}

@media (min-width: 1200px) {
  .sidebar__section {
    padding: 0 8px;
  }

	  .sidebar__heading,
	  .sidebar__label,
	  .sidebar__badge {
	    display: none;
	  }

  .page-layout--sidebar-expanded .sidebar__heading {
    display: block;
  }

  .page-layout--sidebar-expanded .sidebar__label {
    display: inline;
  }

  .page-layout--sidebar-expanded .sidebar__badge {
    display: inline-flex;
    margin-left: auto;
  }

	  .sidebar__link {
	    justify-content: center;
	    padding: 10px;
	  }

  .sidebar__toggle {
    display: flex;
    justify-content: center;
  }

  .sidebar__sep--toggle {
    display: block;
  }

  .page-layout--sidebar-expanded .sidebar__link,
  .page-layout--sidebar-expanded .sidebar__toggle {
    justify-content: flex-start;
  }

  .sidebar__sep {
    margin: 10px 14px;
  }
}

.content-area {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--gap);
}

/* ── Bottom Tab Bar (mobile) ── */
.bottom-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tabbar-h);
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  z-index: 200;
}

.bottom-tabs__list {
  display: flex;
  height: 100%;
  list-style: none;
}

.bottom-tabs__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #b5b5b5;
  font-size: 0.72rem;
  text-decoration: none;
  transition: color 0.15s;
}

.bottom-tabs__item--active,
.bottom-tabs__item:hover {
  color: #fff;
  text-decoration: none;
}

.bottom-tabs__icon {
  width: 22px;
  height: 22px;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
  .bottom-tabs { display: block; }
  .main-content { padding-bottom: var(--tabbar-h); }
}

@media (max-width: 767px) {
  .films-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .films-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Watchlist Pills ── */
.watchlist-pills {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.pill {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 22px;
  font-size: 0.9rem;
  border: 1px solid #555;
  color: #e0e0e0;
  background: #111;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.pill:hover {
  border-color: #666;
  color: #fff;
  background: #1a1a1a;
}
.pill--active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* ── Watchlist Page ── */
.watchlist-page { max-width: 100%; }
.watchlist-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.watchlist-tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 22px;
  font-size: 0.9rem;
  color: #d0d0d0;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.15s;
}
.watchlist-tab:hover { border-color: #444; text-decoration: none; }
.watchlist-tab--active {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.watchlist-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 32px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  text-align: center;
}

.watchlist-empty__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.watchlist-empty > .watchlist-empty__action {
  margin-top: 14px;
}

.watchlist-empty__action,
.watchlist-empty__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
}

.watchlist-empty__action {
  background: #fff;
  color: #000;
  font-weight: 700;
}

.watchlist-empty__link {
  border: 1px solid var(--border);
  color: #fff;
}

/* ── Viewer Badge ── */
.viewer-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.viewer-count {
  color: #444;
  font-size: 0.82rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.viewer-count__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #444;
  display: inline-block;
}

/* Person page */
.person-page {
  padding-top: 24px;
  padding-bottom: 56px;
}

.person-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin: 24px 0;
}

.person-hero__photo {
  width: 220px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 4rem;
  font-weight: 800;
}

.person-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-hero__body h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  margin-bottom: 8px;
}

.person-name-en {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.person-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.person-facts div {
  border-left: 2px solid var(--primary);
  padding-left: 12px;
}

.person-facts dt {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-bottom: 3px;
}

.person-facts dd {
  color: #e4e4e4;
  font-size: 0.94rem;
}

.person-section {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.person-section h2 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 14px;
}

.person-fact-list {
  padding-left: 20px;
  color: #d6d6d6;
  line-height: 1.7;
}

.person-fact-list li + li {
  margin-top: 8px;
}

.person-best-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.person-best-list a,
.person-best-list span {
  max-width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-best-list a:hover {
  border-color: var(--primary);
  color: #fff;
  text-decoration: none;
}

.person-best-list em,
.person-best-list span span {
  color: var(--text-muted);
  font-style: normal;
}

@media (max-width: 640px) {
  .person-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .person-hero__photo {
    width: min(220px, 70vw);
  }
}
