/* styles.css — базовые стили и темы */
:root {
  --bg-start: #020824;
  --bg-end: #041b3d;
  --accent: #72c8c9;
  --text-main: #b4ddff;
  --text-muted: #8fb6e0;
  --card-bg: rgba(3, 13, 40, 0.9);
  --border-soft: rgba(62, 231, 213, 0.2);

  --pulse-glow: rgba(180, 221, 255, 0.5); /* мягкое светящееся пятно */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Плавный скролл к якорям (для кнопки наверх) */
html {
  scroll-behavior: smooth;
}

/* Базовый фон */
body.page {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, var(--bg-end), var(--bg-start));
}

/* Пятно №1: дыхание и «телепорт» по 1–5 */
body.page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;

  background: radial-gradient(
    circle at center,
    var(--pulse-glow) 0%,
    transparent 22%
  );

  transform: translate(0, 0) scale(0.2);
  opacity: 0;
  transform-origin: center;

  animation: pulseSpot1 40s ease-in-out infinite;
}

/* 1 (левый верх), 2 (правый верх), 3 (центр), 4 (левый низ), 5 (правый низ) */
@keyframes pulseSpot1 {
  /* 1: левый верх */
  0% {
    transform: translate(-25%, -25%) scale(0.2);
    opacity: 0;
  }
  5% {
    transform: translate(-25%, -25%) scale(1);
    opacity: 1;
  }
  10% {
    transform: translate(-25%, -25%) scale(0.2);
    opacity: 0;
  }

  /* 2: правый верх */
  15% {
    transform: translate(25%, -25%) scale(0.2);
    opacity: 0;
  }
  20% {
    transform: translate(25%, -25%) scale(1);
    opacity: 1;
  }
  25% {
    transform: translate(25%, -25%) scale(0.2);
    opacity: 0;
  }

  /* 3: центр */
  30% {
    transform: translate(0%, 0%) scale(0.2);
    opacity: 0;
  }
  35% {
    transform: translate(0%, 0%) scale(1);
    opacity: 1;
  }
  40% {
    transform: translate(0%, 0%) scale(0.2);
    opacity: 0;
  }

  /* 4: левый низ */
  45% {
    transform: translate(-25%, 25%) scale(0.2);
    opacity: 0;
  }
  50% {
    transform: translate(-25%, 25%) scale(1);
    opacity: 1;
  }
  55% {
    transform: translate(-25%, 25%) scale(0.2);
    opacity: 0;
  }

  /* 5: правый низ */
  60% {
    transform: translate(25%, 25%) scale(0.2);
    opacity: 0;
  }
  65% {
    transform: translate(25%, 25%) scale(1);
    opacity: 1;
  }
  70% {
    transform: translate(25%, 25%) scale(0.2);
    opacity: 0;
  }

  /* длинная пауза до конца цикла — тёмный фон без пятна */
  100% {
    transform: translate(-25%, -25%) scale(0.2);
    opacity: 0;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

/* Шапка */
.header {
  display: flex;
  align-items: center; /* центруем всё по вертикали */
  justify-content: space-between;
  padding: 16px 5vw;
  min-height: 120px;
  background: linear-gradient(
    to bottom,
    rgba(2, 8, 36, 0.9),
    rgba(4, 27, 61, 0.5)
  );
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
}

/* Логотип */
.logo {
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
}

.logo__img {
  display: block;
  width: 120px;
  height: auto;
}

/* на маленьких экранах слегка уменьшаем логотип */
@media (max-width: 480px) {
  .logo__img {
    width: 52px;
  }
}

/* Навигация и выпадающее меню */
.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center; /* выравниваем кнопки меню по центру */
}

/* каждый пункт меню — обёртка */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px; /* фиксируем высоту строки меню */
}

/* базовый вид ссылки/кнопки */
.nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 9px 16px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav a.nav__link,
.nav button.nav__link {
  margin: 0;
}

/* hover для всех ссылок */
.nav__link:hover {
  background: rgba(62, 231, 213, 0.15);
  color: #ffffff;
}

/* выпадающее меню по умолчанию скрыто */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 180px;
  background: rgba(3, 13, 40, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(180, 221, 255, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  display: none;
  overflow: hidden;
  z-index: 9999;
}

/* элементы внутри меню */
.nav-dropdown__item {
  display: block;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-main);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown__item:hover {
  background: rgba(62, 231, 213, 0.16);
  color: #ffffff;
}

/* состояние открыт: добавляется класс .is-open на .nav-item */
.nav-item--dropdown.is-open .nav-dropdown {
  display: block;
}

/* при открытом меню слегка увеличиваем кнопку */
.nav-item--dropdown.is-open .nav__link--dropdown {
  background: rgba(62, 231, 213, 0.15);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(62, 231, 213, 0.2);
}

/* Контент */
.content {
  padding: 40px 5vw 48px;
}

/* Футер */
.footer {
  padding: 16px 5vw 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid rgba(180, 221, 255, 0.1);
}

/* Заголовки и текст */
h1,
h2,
h3 {
  color: var(--accent);
  margin-top: 0;
}

p {
  color: var(--text-main);
}

/* Кнопки CTA */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  background: var(--accent);
  color: #020824;
  transition: filter 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 18px rgba(62, 231, 213, 0.2);
}

.btn:hover {
  filter: brightness(1.1);
}

.btn:active {
  transform: scale(0.97);
  box-shadow: 0 0 8px rgba(62, 231, 213, 0.2);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

/* Сетка карточек серий/сериалов */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  border-color: rgba(62, 231, 213, 0.2);
}

.card__poster-wrap {
  position: relative;
  padding-top: 150%; /* 2:3 постер */
  overflow: hidden;
}

.card__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 10px 12px 12px;
}

.card__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--accent);
}

.card__meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* Формы */
.form {
  display: grid;
  gap: 12px;
  max-width: 460px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__label {
  font-size: 13px;
  color: var(--text-muted);
}

.form__input,
.form__textarea,
.form__select {
  background: rgba(3, 17, 55, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(180, 221, 255, 0.3);
  padding: 9px 11px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  border-color: var(--accent);
}

/* Страница актёра */
.actor__photo-wrap {
  max-width: 260px;
}

.actor__photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  object-fit: cover;
}

/* Стили для заголовков секций на странице актёра */
.actor-section-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 16px;
}

.actor-info-text {
  font-size: 18px;
  color: var(--text-main);
  line-height: 1.6;
}

.actor-info-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0;
}

.actor-info-value {
  font-size: 18px;
  color: var(--text-main);
  margin: 4px 0 12px 0;
}

.actor-filmography-item {
  font-size: 17px;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.5;
}

.actor-filmography-item a {
  color: var(--accent);
  text-decoration: none;
}

.actor-filmography-item a:hover {
  text-decoration: underline;
}

.actor-filmography-meta {
  font-size: 14px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

/* Календарь */
.calendar-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.calendar-month {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 14px 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.calendar-month h2 {
  margin-top: 0;
}

.calendar-month ul {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0;
}

.calendar-month li {
  font-size: 14px;
  color: var(--text-main);
}

/* Новости */
.news-list {
  display: grid;
  gap: 16px;
}

.news-item {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.news-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.news-item__wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  align-items: flex-start;
}

.news-item__image {
  width: 200px;
  height: 260px;
  overflow: hidden;
  border-radius: 14px 0 0 14px;
}

.news-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-item__content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.news-item__content h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
}

.news-item__content p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.6;
}

/* Ссылки в новостях */
.news-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.news-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.news-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.news-item-link:hover {
  opacity: 0.95;
}

/* ===== Стили для страниц статей ===== */

.article {
  max-width: 900px;
  margin: 0 auto;
}

.article__hero {
  width: 100%;
  max-height: 500px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.article__hero-img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  object-position: center;
}

.article__meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(62, 231, 213, 0.2);
}

.article__date {
  font-weight: 600;
}

.article__author {
  opacity: 0.8;
}

.article__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 32px;
  line-height: 1.3;
}

.article__body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
}

.article__body h2 {
  font-size: 24px;
  margin-top: 32px;
  margin-bottom: 16px;
}

.article__body p {
  margin-bottom: 16px;
}

.article__body ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article__body li {
  margin-bottom: 8px;
}

.article__image-gallery {
  margin: 32px 0;
}

.article__figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.article__gallery-img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  object-position: center;
}

.article__figure figcaption {
  padding: 12px 16px;
  background: rgba(3, 17, 55, 0.9);
  border: 1px solid rgba(62, 231, 213, 0.2);
  border-top: none;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.article__footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(62, 231, 213, 0.2);
  text-align: center;
}

.article-link {
  color: var(--accent);
  text-decoration: underline;
  border-bottom: 1px solid var(--accent);
  cursor: pointer;
  transition: color 0.2s ease;
}

.article-link:hover {
  color: #ffffff;
}

.article-actor-link a {
  position: relative;
}

.article-tooltip {
  position: fixed;
  z-index: 10000;
  background: rgba(3, 13, 40, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(62, 231, 213, 0.3);
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  max-width: 140px;
}

.article-tooltip__img {
  display: block;
  width: 130px;
  height: 195px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
}

/* Адаптив для статей */
@media (max-width: 768px) {
  .article__title {
    font-size: 24px;
  }

  .article__body {
    font-size: 15px;
  }

  .article__body h2 {
    font-size: 20px;
  }

  .article-tooltip {
    display: none !important;
  }
}

/* ===== Модальное окно для фото ===== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 0;
}

.modal__content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: scale-down;
  object-position: center;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  animation: modalZoomIn 0.3s ease-out;
}

/* Для больших экранов (компьютеры) */
@media (min-width: 1200px) {
  .modal__image {
    max-width: 1000px;
    max-height: 800px;
  }
}

/* Для планшетов */
@media (max-width: 1024px) and (min-width: 768px) {
  .modal__image {
    max-width: 700px;
    max-height: 600px;
  }
}

/* Для телефонов */
@media (max-width: 767px) {
  .modal__image {
    max-width: 100%;
    max-height: 100%;
  }
}

@keyframes modalZoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal__close:active {
  transform: scale(0.95);
}

/* Подсказка что можно кликнуть */
.gallery-image {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.gallery-image:hover {
  opacity: 0.9;
}

/* Информация об актёрах (списки) */
.cast-item:hover {
  background-color: #f0f0f0;
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.cast-item a {
  color: #007bff;
  text-decoration: none;
}

.cast-item a:hover {
  text-decoration: underline;
}

.cast-item__name {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.cast-item__name a {
  color: #333;
}

.cast-item__name a:hover {
  color: #007bff;
}

.cast-item__role {
  margin: 0.25rem 0 0.75rem 0;
  font-size: 0.95rem;
  color: #666;
  font-style: italic;
}

.cast-item__description {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

/* Стили для страниц актёров (старый layout, если нужен) */
.actor-header {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.actor-header__photo {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.actor-header__photo-img {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.actor-header__info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.actor-header__title {
  margin: 0 0 1.5rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
}

.actor-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.actor-meta__item {
  display: flex;
  flex-direction: column;
}

.actor-meta__label {
  font-weight: 600;
  color: #666;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.actor-meta__value {
  color: #1a1a1a;
  font-size: 1.1rem;
}

.actor-description {
  line-height: 1.7;
  color: #333;
  margin: 0;
}

.actor-filmography {
  margin: 3rem 0;
}

.filmography-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.filmography-item {
  padding: 1.5rem;
  border-left: 4px solid #007bff;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.filmography-item h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.2rem;
  color: #1a1a1a;
}

.filmography-item a {
  color: #007bff;
  text-decoration: none;
}

.filmography-item a:hover {
  text-decoration: underline;
}

.filmography-item__info {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.filmography-item__year {
  color: #666;
  font-weight: 600;
}

.filmography-item__type {
  background-color: #e8f4f8;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  color: #0066cc;
  font-size: 0.85rem;
}

.filmography-item__role {
  background-color: #fff3cd;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  color: #856404;
  font-size: 0.85rem;
}

.filmography-item__description {
  margin: 0;
  color: #555;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .actor-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.card__role {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Стили для заголовка сериала */
.series-header {
  margin-bottom: 2rem;
}

.series-header article.article {
  background: transparent;
}

.article__hero {
  max-width: 400px;
  margin: 0 auto 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.article__hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.series-header__info {
  padding: 0;
}

.series-header__title {
  margin: 2rem 0 1.5rem 0;
  font-size: 2.5rem;
  font-weight: 700;
}

.series-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.series-meta__item {
  display: flex;
  flex-direction: column;
}

.series-meta__label {
  font-weight: 600;
  color: #666;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.series-meta__value {
  color: #1a1a1a;
  font-size: 1.1rem;
}

.series-tags {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.series-description {
  line-height: 1.7;
  color: #333;
  margin-bottom: 1.5rem;
}

.series-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn--primary {
  background-color: #007bff;
  color: white;
}

.btn--primary:hover {
  background-color: #0056b3;
}

.btn--secondary {
  background-color: #6c757d;
  color: white;
}

.btn--secondary:hover {
  background-color: #545b62;
}

@media (max-width: 768px) {
  .series-header__title {
    font-size: 1.8rem;
  }

  .series-meta {
    grid-template-columns: 1fr;
  }

  .series-links {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}

/* Галереи (актеры и сериалы) */
.actor-gallery,
.series-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.actor-gallery__thumb,
.series-gallery__thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(62, 231, 213, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.actor-gallery__thumb:hover,
.series-gallery__thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border-color: rgba(62, 231, 213, 0.9);
}

@media (max-width: 600px) {
  .actor-gallery__thumb,
  .series-gallery__thumb {
    width: 96px;
    height: 96px;
  }
}

/* Страница сериала: старая hero-сетка (для страниц сериалов, не актёров) */
.series-hero {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.series-hero__poster-wrap {
  max-width: 320px;
}

.series-hero__poster {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  object-fit: cover;
}

/* Hero‑секция на главной */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 40%,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 60%
  );
  animation: moveLight 12s linear infinite;
  pointer-events: none;
}

@keyframes moveLight {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20%, 10%);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* Кнопка наверх */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(3, 17, 55, 0.9);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  z-index: 9999;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Адаптив: общие правки */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .series-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .series-hero__poster-wrap {
    max-width: 100%;
  }
}

/* ===== Корейские проекты: тулбар и фильтры ===== */

.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 16px;
  font-size: 0.85rem;
}

.projects-count {
  opacity: 0.8;
}

/* Чипы-фильтры */
.filter-chip {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  background: rgba(3, 17, 55, 0.9);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease, box-shadow 0.15s ease;
}

.filter-chip:hover {
  background: rgba(25, 46, 102, 0.95);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(114, 200, 201, 0.25);
  transform: translateY(-1px);
}

/* Активный фильтр */
.filter-chip--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #020824;
  cursor: default;
  box-shadow: 0 0 0 1px rgba(114, 200, 201, 0.25);
}

.filter-chip--active:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: none;
  box-shadow: 0 0 0 1px rgba(114, 200, 201, 0.25);
}

@media (max-width: 768px) {
  .site-search {
    width: 100%;
    margin-left: 0;
    margin-top: 6px;
    align-items: stretch;
  }
}

/* ===== Поиск в шапке ===== */
.site-search {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: relative;
}

.site-search__input {
  background: rgba(3, 17, 55, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(180, 221, 255, 0.3);
  padding: 7px 12px;
  color: var(--text-main);
  font-size: 13px;
  min-width: 180px;
  outline: none;
}

.site-search__input::placeholder {
  color: var(--text-muted);
}

.site-search__input:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: #020824;
}

.site-search__input:focus::placeholder {
  color: rgba(2, 8, 36, 0.6);
}

.site-search__results {
  position: absolute;
  top: 110%;
  right: 0;
  margin-top: 4px;
  min-width: 260px;
  max-width: 420px;
  max-height: 320px;
  overflow-y: auto;
  background: rgba(3, 13, 40, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(180, 221, 255, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  padding: 6px 0;
  display: none;
  z-index: 9999;
}

.site-search__result-item {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
}

.site-search__result-item:hover {
  background: rgba(62, 231, 213, 0.16);
  color: #ffffff;
}

.site-search__result-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.site-search__result-snippet {
  font-size: 12px;
  color: var(--text-muted);
}

.search-highlight,
.site-search__results mark {
  background: rgba(255, 255, 0, 0.35);
  color: #fff;
  padding: 0 1px;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .site-search {
    width: 100%;
    margin-left: 0;
    margin-top: 6px;
    align-items: stretch;
  }

  .site-search__results {
    right: auto;
    left: 0;
    max-width: none;
    width: 100%;
  }
}

/* ===== Верхний блок на странице актёра: фото + 2 карточки ===== */
.actor-hero-grid {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .actor-hero-grid {
    grid-template-columns: 1fr;
  }
}
