/* PAGE
----------------------------------------------- */
.page {
  min-width: 320px;
  position: relative;
  background: url(../images/bg.webp) no-repeat;
  background-size: contain;
}

.page__container {
  max-width: var(--max-width);
  background: var(--bg-black);
  margin: 0 auto;
  position: relative;
  z-index: 20;
}

/* HEADER
----------------------------------------------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 70px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo__title {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  font-family: 'OrbitronBold', sans-serif;
}

.logo__title img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.logo__title--footer {
  color: var(--ui-text-color-on-accent);
}

.header__login {
  flex: 1 1 0;
  min-width: 0;
}

.header__search {
  position: relative;
  flex: 1 1 0;
  max-width: 350px;
  margin: 0 15px;
}

.header__search-form {
  position: relative;
}

.header__search-input {
  width: 100%;
  height: 36px;
  padding: 0 40px 0 15px;
  line-height: 36px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  font-size: 16px;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.header__search-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.header__search-input::placeholder {
  color: #a1a1aa;
  opacity: 0.8;
  font-size: 13px;
}

.header__search-input:focus::placeholder {
  color: transparent;
}

.header__search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #a1a1aa;
  border-radius: 50%;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.header__search-btn .icon {
  width: 14px;
  height: 14px;
}

.header__search-btn:hover {
  color: var(--accent);
  background: rgba(0, 186, 228, 0.1);
}

.header__action-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.header__action-btn__icon {
  display: none;
  width: 18px;
  height: 18px;
}

.header__action-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* NAV
----------------------------------------------- */
.nav {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.nav__list {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  width: 100%;
  height: 50px;
  background: #000;
}

.nav__item {
  width: 180px;
  margin: auto;
}

.nav__link {
  display: block;
  padding: 15px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.nav__link:hover {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav__dropdown {
  position: absolute;
  top: 50px;
  left: 0;
  z-index: 9999;
  width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  border-top: 3px solid var(--accent);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease;
}

.nav__dropdown--open {
  max-height: 1000px;
  opacity: 1;
  pointer-events: auto;
}

.nav__dropdown-list {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  width: 100%;
  background: #000;
}

.nav__dropdown-list--compact {
  height: 200px;
}

.nav__dropdown-list--tall {
  max-height: 400px;
}

.nav__dropdown-link {
  display: block;
  padding: 8px 15px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.nav__dropdown-link:hover {
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* CAROUSEL
----------------------------------------------- */
.carousel {
  --carousel-gap: 20px;
  --carousel-visible: 8;
  --carousel-slide-by: 2;
  position: relative;
  width: 100%;
  padding: 40px 30px 30px;
}

.carousel__viewport {
  position: relative;
  overflow: hidden;
}

.carousel__track {
  display: flex;
  gap: var(--carousel-gap);
  transition: transform 0.35s ease;
  will-change: transform;
}

.carousel__slide {
  flex: 0 0
    calc(
      (100% - var(--carousel-gap) * (var(--carousel-visible) - 1)) /
        var(--carousel-visible)
    );
  min-width: 0;
  transition: opacity 0.3s ease;
}

.carousel__slide-media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--bdc);
  aspect-ratio: 2 / 3;
  background: #121212;
  transition:
    opacity var(--ease),
    transform var(--ease);
}

.carousel__slide-media--loading::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(110deg, #141414 8%, #1c1c1c 18%, #141414 33%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s ease-in-out infinite;
}

.carousel__slide-media::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  background: linear-gradient(to top, #000 0%, transparent 100%);
  opacity: 0.8;
  pointer-events: none;
}

.carousel__slide-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity var(--ease),
    transform var(--ease);
}

.carousel__slide-image--placeholder {
  opacity: 0;
}

.carousel__slide-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 7px;
  color: var(--tt-lighter-2);
  text-align: center;
  opacity: 0;
  transition: opacity var(--ease);
}

.carousel__slide:hover .carousel__slide-media {
  opacity: 0.8;
}

.carousel__slide:hover .carousel__slide-overlay {
  opacity: 1;
}

.carousel__slide-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  color: var(--tt-lighter-2);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.carousel__arrow .icon {
  width: 18px;
  height: 18px;
}

.carousel__arrow:hover {
  color: var(--accent);
  background: rgba(0, 0, 0, 0.75);
}

.carousel__arrow--prev {
  left: 0;
}

.carousel__arrow--next {
  right: 0;
}

.carousel__arrow--hidden {
  opacity: 0.35;
  pointer-events: none;
}

.carousel--nav .carousel__arrow {
  display: flex;
}

.carousel__dots {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 10px;
  margin-top: 16px;
}

/* Место под точки резервируем сразу в CSS — без ожидания app.js (CLS) */
@media screen and (max-width: 1219px) {
  .carousel__dots {
    display: flex;
  }
}

.carousel--dots .carousel__dots {
  display: flex;
}

.carousel--nav .carousel__dots {
  display: none;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.carousel__dot--active {
  background: var(--accent);
  transform: scale(1.15);
}

/* LAYOUT & CATALOG
----------------------------------------------- */
.layout {
  min-height: 100vh;
}

.layout__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  padding: 0 var(--indent) 20px;
}

.breadcrumbs {
  padding: 10px 0;
  font-size: 12px;
  color: var(--tt-darker-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--accent);
}

.breadcrumbs a {
  color: var(--tt-lighter);
  transition:
    color var(--ease),
    opacity var(--ease);
}

.breadcrumbs a::after {
  display: inline;
  margin: 0 5px;
  color: var(--tt);
  content: '/';
  transition: color var(--ease);
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs a:hover::after {
  color: var(--tt-darker);
}

/* PAGINATION
----------------------------------------------- */
.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 20px var(--indent) 0;
  gap: 15px;
}

.pagination--article {
  padding-top: 0;
  padding-bottom: 20px;
}

.pagination__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination__more a,
.pagination__more > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  height: 48px;
  padding: 0 32px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.pagination__more a:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 186, 228, 0.3);
  transform: translateY(-1px);
}

.pagination__pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination__pages a,
.pagination__pages span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #a1a1aa;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.pagination__pages span:not(.nav_ext),
.pagination__pages a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 186, 228, 0.3);
  transform: translateY(-1px);
}

.pagination__pages .nav_ext {
  min-width: auto;
  padding: 0 4px;
  color: var(--tt-darker-2);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.pagination__prev a,
.pagination__next a,
.pagination__prev > span,
.pagination__next > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 16px;
  color: #a1a1aa;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.pagination__prev a:hover,
.pagination__next a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.pagination__prev .icon,
.pagination__next .icon {
  width: 16px;
  height: 16px;
}

.movie__comments-list .pagination {
  padding-right: 0;
  padding-left: 0;
}

.catalog__header {
  padding-top: 20px;
  margin-bottom: 20px;
}

.catalog__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--tt-lighter);
}

.catalog__description {
  line-height: 1.7;
  color: var(--tt);
}

.catalog__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}

.catalog__grid > .card {
  flex: 1 1 calc((100% - 80px) / 5);
  max-width: calc((100% - 80px) / 5);
  min-width: 0;
}

/* CARD
----------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: transparent;
  transition: opacity var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    opacity: 0.8;
  }
}

.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.card__poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #121212;
  border-radius: 4px;
}

.card__poster--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(110deg, #141414 8%, #1c1c1c 18%, #141414 33%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s ease-in-out infinite;
  pointer-events: none;
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__image--placeholder {
  opacity: 0;
}

.card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.card__badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-radius: 2px;
}

.card__badge--completed {
  background: #22c55e;
  color: #fff;
}

.card__badge--ongoing {
  background: #3b82f6;
  color: #fff;
}

.card__age {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 2px;
  backdrop-filter: blur(4px);
}

.card__ratings {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.card__rating {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 2px;
  backdrop-filter: blur(4px);
}

.card__rating--imdb {
  color: #ffc107;
}

.card__rating--kp {
  color: #ff6600;
}

.card__body {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  min-height: 56px;
  padding-top: 10px;
}

.card__title {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__meta {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

.card__year {
  flex-shrink: 0;
  font-weight: 400;
}

.card__genre {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.8;
}

/* ALERT (замена message-info из engine.css)
----------------------------------------------- */
.alert {
  position: relative;
  margin-bottom: 20px;
  padding: 15px 20px;
  padding-left: 64px;
  color: var(--tt);
  line-height: 1.5;
  background-color: var(--bg-darker);
  border: 1px solid var(--bdc);
  border-left: 44px solid var(--accent);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.24);
}

.alert::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  background-color: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.alert__title {
  font-weight: 500;
}

.alert__content a {
  text-decoration: underline;
}

.alert--warning {
  border-left-color: #f59e0b;
}

/* LOADER — тост справа вверху
   DLE создаёт #loading-layer через ShowLoading — app.js собирает .loader__toast
----------------------------------------------- */
.loader,
#loading-layer {
  display: block !important;
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 10050 !important;
  width: auto !important;
  max-width: min(360px, calc(100vw - 32px));
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.loader__toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--tt-lighter);
  background: var(--bg-darker);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
  animation: loader-toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.loader__dots {
  flex-shrink: 0;
  width: 50px;
  height: 12px;
  background-image:
    radial-gradient(circle, var(--accent) 4px, transparent 4px),
    radial-gradient(circle, var(--accent) 4px, transparent 4px),
    radial-gradient(circle, var(--accent) 4px, transparent 4px);
  background-repeat: no-repeat;
  background-position:
    0 center,
    20px center,
    40px center;
  background-size: 10px 10px;
  animation: movie-loader 1.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.loader__content {
  min-width: 0;
  line-height: 1.45;
}

.loader__title {
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tt-lighter-2);
}

.loader__text {
  font-size: 12px;
  color: var(--tt);
}

.loader__text .bolder {
  font-weight: 700;
  color: var(--tt-lighter);
}

.loader svg {
  display: none;
}

@keyframes loader-toast-in {
  from {
    opacity: 0;
    transform: translateX(16px) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

/* OVERLAY & LOGIN
----------------------------------------------- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
}

.overlay.is-open {
  display: block;
  animation: overlay-fade-in 0.25s ease;
}

@keyframes overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.login--hidden {
  display: none;
}

.login-cloned {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96) translateY(12px);
  transition:
    opacity 0.25s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.25s ease;
}

.login-cloned.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.login {
  position: fixed;
  z-index: 1001;
  top: 50%;
  left: 50%;
  width: 400px;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  width: min(400px, calc(100vw - 40px));
  max-width: min(400px, calc(100vw - 40px));
  overflow: auto;
  background-color: var(--ui-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 64px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
}

.login__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 40px;
  background-color: var(--ui-bg-darker);
}

.login__title {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  color: var(--tt-lighter);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: capitalize;
}

.login__title a {
  margin-left: 10px;
  font-weight: 400;
  color: var(--tt);
  border-bottom: 1px dotted var(--tt);
}

.login__close {
  flex-shrink: 0;
  color: var(--tt-lighter);
}

.login__close .icon {
  width: 24px;
  height: 24px;
}

.login__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
}

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

.login__content {
  padding: 20px 40px;
}

.login__row {
  display: block;
  position: relative;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--tt);
}

.login__caption {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--tt-lighter);
}

.login__caption a {
  margin-left: 6px;
  color: var(--accent-3);
  text-decoration: underline;
}

.login__field {
  position: relative;
}

.login__field input {
  width: 100%;
  height: 40px;
  padding: 0 15px 0 40px;
  line-height: 40px;
  background-color: var(--ui-bg-darker);
  color: var(--tt-lighter);
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px var(--bdc),
    inset 0 0 0 1px var(--bdc-lighter);
}

.login__field input:focus {
  box-shadow: inset 0 0 0 1px var(--accent);
  outline: none;
}

.login__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  opacity: 0.6;
  pointer-events: none;
  transform: translateY(-50%);
}

.login__remember {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login__remember input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  background-color: var(--ui-bg-darker);
  cursor: pointer;
  transition:
    background-color var(--ease),
    border-color var(--ease);
}

.login__remember input:checked {
  border-color: var(--accent);
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.login__submit {
  width: 100%;
  height: 40px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  background-color: var(--accent);
  border-radius: 3px;
}

.login__submit:hover {
  background-color: var(--accent-darker);
}

.login__social {
  padding: 20px 40px;
  text-align: center;
  background-color: var(--ui-bg-darker);
}

.login__social-caption {
  margin-bottom: 10px;
  font-size: 11px;
  text-transform: uppercase;
}

.login__social-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.login__social-btns img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.login__menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 35px;
}

.login__menu li {
  flex: 1 1 calc(50% - 10px);
  min-width: 120px;
}

.login__menu a {
  display: block;
  padding: 10px;
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
  background-color: var(--ui-bg-darker);
  border-radius: 6px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.login__menu .icon--menu {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 4px;
  opacity: 0.3;
}

/* FOOTER
----------------------------------------------- */
.footer {
  display: flex;
  align-items: center;
  padding: 20px 0;
}

.footer__logo {
  flex-shrink: 0;
  margin-right: 30px;
}

.footer__text {
  flex: 1 1 0;
  font-size: 14px;
  line-height: 1.7;
}

/* ANIMATIONS
----------------------------------------------- */
@keyframes skeleton-shine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* RESPONSIVE — CAROUSEL
----------------------------------------------- */
@media screen and (max-width: 1219px) {
  .carousel {
    --carousel-visible: 6;
    --carousel-gap: 20px;
  }
}

@media screen and (max-width: 949px) {
  .carousel {
    --carousel-visible: 5;
  }
}

@media screen and (max-width: 759px) {
  .carousel {
    --carousel-visible: 3;
  }
}

@media screen and (max-width: 469px) {
  .carousel {
    --carousel-gap: 10px;
    --carousel-visible: 3;
    padding: 20px 20px 40px;
  }

  .carousel__slide-overlay {
    padding: 10px;
    font-size: 13px;
  }
}

/* MOBILE NAV
----------------------------------------------- */
.header__burger {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.header__burger .icon {
  width: 18px;
  height: 18px;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1002;
  pointer-events: none;
}

.mobile-nav.is-open {
  pointer-events: auto;
}

.mobile-nav__panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(340px, 90vw);
  height: 100%;
  overflow-y: auto;
  background: var(--bg-lightest);
  color: var(--tt-lighter);
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.mobile-nav.is-open .mobile-nav__panel {
  transform: translateX(0);
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bdc);
  background: var(--bg-darker);
}

.mobile-nav__title {
  font-size: 16px;
  font-weight: 700;
}

.mobile-nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  border-radius: 6px;
  background: #e84e36;
}

.mobile-nav__close .icon {
  width: 18px;
  height: 18px;
}

.mobile-nav__body {
  padding: 10px 0 30px;
}

.mobile-nav__link,
.mobile-nav__toggle {
  display: block;
  padding: 14px 20px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav__toggle {
  width: 100%;
  text-align: left;
  background: none;
}

.mobile-nav__toggle::after {
  content: '';
  float: right;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  background-color: currentColor;
  transition: transform 0.2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mobile-nav__group.is-open .mobile-nav__toggle::after {
  transform: rotate(180deg);
}

.mobile-nav__sublist {
  display: none;
  padding: 6px 0 10px;
  background: rgba(0, 0, 0, 0.25);
}

.mobile-nav__group.is-open .mobile-nav__sublist {
  display: block;
}

.mobile-nav__sublink {
  display: block;
  padding: 10px 20px 10px 30px;
  color: var(--tt);
  font-size: 13px;
}

.mobile-nav__sublink:hover {
  color: var(--accent);
}

body.mobile-nav-is-open {
  overflow: hidden;
}

/* FORM
----------------------------------------------- */
.form {
  margin-bottom: 30px;
}

.form__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.form__title {
  flex: 1 1 0;
  min-width: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--tt-lighter-2);
}

.form__home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  height: 36px;
  padding: 0 14px;
  color: var(--tt-lighter);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--bdc);
  border-radius: 6px;
  background: var(--bg-darker);
}

.form__home-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.form__home-link .icon {
  width: 14px;
  height: 14px;
}

.form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  margin-bottom: 20px;
}

.form__row:last-child {
  margin-bottom: 0;
}

.form__row--stacked {
  align-items: stretch;
}

.form__row--actions {
  margin-top: 10px;
}

.form__row--protect {
  align-items: flex-start;
}

.form__caption {
  width: 200px;
  padding-right: 20px;
  color: var(--tt);
  font-weight: 600;
}

.form__caption--wide {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  color: #fff;
  background: var(--bg-darker);
  border-radius: 6px;
}

.form__label--required::after {
  content: '*';
  margin-left: 5px;
  color: #e85319;
}

.form__field {
  flex: 1 1 0;
  min-width: 50px;
  max-width: 100%;
  position: relative;
}

.form__field--with-btn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form__field--with-btn .form__input {
  flex: 1 1 200px;
}

.form__field--captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form__field--captcha .form__input {
  max-width: 210px;
}

.form__field--checks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.form__input,
.form__textarea,
.form__field select,
.form__field textarea,
.form__field input[type='text'],
.form__field input[type='password'],
.form__field input[type='email'] {
  width: 100%;
  padding: 10px 14px;
  color: var(--tt-lighter-2);
  background: var(--bg-darker);
  border: 1px solid var(--bdc);
  border-radius: 6px;
}

.form__textarea {
  min-height: 100px;
  resize: vertical;
}

.form__textarea--tall {
  min-height: 160px;
}

.form__file {
  width: 100%;
}

.form__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  color: var(--tt-lighter);
  font-weight: 600;
  border: 1px solid var(--bdc);
  border-radius: 6px;
  background: var(--bg-darker);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.form__btn:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent-darker);
}

.form__btn--primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.form__btn--primary:hover {
  background: var(--accent-darker);
}

.form__btn--secondary {
  margin-left: 12px;
}

.form__btn--inline {
  flex-shrink: 0;
  height: 40px;
  font-size: 13px;
}

.form__table {
  width: 100%;
}

.form__table td {
  padding-bottom: 16px;
  vertical-align: top;
}

.form__hint {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.form__hint--warning {
  color: #eb4d4b;
}

#result-registration > span {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 13px;
}

.profile__edit {
  margin-top: 40px;
}

.profile__edit--hidden {
  display: none;
}

/* SEARCH PAGE
----------------------------------------------- */
.search-page__title {
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 700;
}

.search-page .search > div,
.search-page__table .search > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  padding: 20px;
  background: var(--bg-darker);
  border-radius: 6px;
}

.search-page .search br,
.search-page__table .search br {
  display: none;
}

.search-page #searchinput,
.search-page__table #searchinput {
  flex: 1 1 200px;
  min-width: 120px;
}

.search-page input[type='text'],
.search-page select,
.search-page__table input[type='text'],
.search-page__table select {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 14px;
  color: var(--tt-lighter-2);
  background: var(--bg-black);
  border: 1px solid var(--bdc);
  border-radius: 6px;
}

.search-page #searchtable,
.search-page #searchtable td,
.search-page__table table,
.search-page__table td {
  vertical-align: top;
  text-align: left;
}

.search-page fieldset,
.search-page__table fieldset {
  margin: 0 4px 12px 0;
  padding: 12px;
  font-size: 12px;
  border: 1px solid var(--bdc);
  border-radius: 6px;
}

.search-page fieldset legend,
.search-page__table fieldset legend {
  padding: 0 6px;
  color: var(--tt);
  font-weight: 700;
}

.search-page #searchuser,
.search-page #searchinput,
.search-page__table #searchuser,
.search-page__table #searchinput {
  width: 100%;
}

.search-page #searchinput + br,
.search-page #searchinput + br + br,
.search-page__table #searchinput + br,
.search-page__table #searchinput + br + br {
  display: none;
}

/* STATIC PAGE
----------------------------------------------- */
.static-page {
  margin-bottom: 30px;
}

.static-page__title {
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 700;
}

.static-page__content {
  padding: 20px;
  background: var(--bg-darker);
  border-radius: 8px;
}

/* PROFILE
----------------------------------------------- */
.profile {
  overflow: hidden;
  border: 1px solid var(--bdc);
  border-radius: 8px;
  background: var(--ui-bg);
}

.profile__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(0, 186, 228, 0.35),
    rgba(0, 0, 0, 0.8)
  );
}

.profile__avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.2);
}

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

.profile__info {
  flex: 1 1 180px;
  min-width: 0;
}

.profile__name {
  font-size: 20px;
  font-weight: 700;
}

.profile__group {
  margin-top: 8px;
  font-size: 13px;
}

.profile__actions {
  flex-shrink: 0;
  width: 180px;
}

.profile__action + .profile__action {
  margin-top: 10px;
}

.profile__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--ui-bg-darker);
}

.profile__status {
  padding: 6px 12px;
  color: #fff;
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
  border-radius: 4px;
}

.profile__status--online {
  background: #6ab04c;
}

.profile__status--offline {
  background: #eb4d4b;
}

.profile__stats {
  display: flex;
  flex: 1 1 0;
  flex-wrap: wrap;
  gap: 20px;
}

.profile__stat-label {
  display: block;
  color: var(--tt);
  font-size: 13px;
}

.profile__stat-value {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
}

.profile__details,
.profile__links {
  padding: 20px;
}

.profile__links {
  padding-top: 0;
}

.profile__detail,
.profile__link-item {
  position: relative;
  width: 48%;
  margin-bottom: 10px;
  padding-left: 140px;
  font-size: 13px;
}

.profile__detail-label {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--tt-darker);
}

.profile__link-item {
  padding-left: 0;
}

.profile-popup {
  display: flex;
  gap: 24px;
}

.profile-popup__aside {
  flex-shrink: 0;
  width: 80px;
  text-align: center;
}

.profile-popup__avatar {
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 10px;
}

.profile-popup__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-popup__aside .profile__status {
  width: 80px;
  margin-top: 12px;
}

.profile-popup__main {
  flex: 1 1 0;
  min-width: 0;
}

.profile-popup__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-popup__item {
  margin-bottom: 6px;
  font-size: 13px;
}

.profile-popup__label {
  opacity: 0.6;
}

/* PM
----------------------------------------------- */
.pm__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.pm__status {
  margin-bottom: 30px;
  padding: 16px;
  background: var(--bg-darker);
  border-radius: 6px;
}

.pm__table-wrap {
  overflow-x: auto;
}

.pm__message {
  display: flex;
  gap: 20px;
}

.pm__message-avatar {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 50%;
}

.pm__message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.pm__message-meta,
.pm__message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}

.pm__message-meta {
  margin-bottom: 8px;
}

.pm__message-text {
  margin-bottom: 12px;
}

.pm_progress_bar,
.pm__status .pm_progress_bar {
  overflow: hidden;
  height: 20px;
  margin: 10px 0;
  border-radius: 4px;
  background: var(--ui-bg-darkest);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pm_progress_bar span {
  display: block;
  height: 100%;
  background: #6ab04c;
}

.dle-table,
.pm {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--ui-bdc);
}

.dle-table td,
.pm td {
  padding: 10px;
  font-size: 13px;
  border: 1px solid var(--ui-bdc);
}

.dle-table thead tr:nth-child(1),
.pm tr:nth-child(1) {
  background: var(--ui-bg-darkest);
}

.dle-table tr:nth-child(2n + 2),
.pm tr:nth-child(2n + 2) {
  background: var(--ui-bg-darker);
}

.pm tr td:first-child {
  width: 37px;
}

.pm__nav a,
a.pm_list + a {
  margin-right: 16px;
}

/* INFORMER
----------------------------------------------- */
.informer__title {
  margin-bottom: 6px;
  font-weight: 700;
}

.informer__text {
  color: var(--tt);
  font-size: 13px;
  line-height: 1.5;
}

/* OFFLINE / BANNED
----------------------------------------------- */
.offline-page,
.banned-page {
  min-height: 100vh;
  background: var(--bg-black);
}

.offline,
.banned {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.offline__container,
.banned__card {
  width: 100%;
  max-width: 600px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-darker);
  box-shadow: var(--bsh);
}

.offline__title,
.banned__title {
  padding: 16px 24px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  background: var(--accent-darker);
}

.offline__text,
.banned__content {
  padding: 24px;
  color: var(--tt-lighter);
}

.banned__content p + p {
  margin-top: 12px;
}

/* DLE ENGINE HELPERS
----------------------------------------------- */
.berrors {
  margin-bottom: 20px;
  padding: 14px 18px;
  color: #a76846;
  line-height: 1.5;
  background: #fce5ba;
  border-left: 4px solid #e85319;
  border-radius: 6px;
}

.berrors a {
  color: #aa4e43;
  text-decoration: underline;
}

.checkbox,
.comments_subscribe {
  position: relative;
  padding-left: 50px;
}

.checkbox input,
.comments_subscribe input {
  position: absolute;
  top: 50%;
  left: 0;
  width: 40px;
  height: 20px;
  margin-top: -10px;
  border-radius: 10px;
  background: var(--ui-bg-darkest);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.checkbox input::before,
.comments_subscribe input::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 18px;
  height: 18px;
  border-radius: 10px;
  background: var(--ui-bg);
  transition: left 0.2s ease;
}

.checkbox input:checked,
.comments_subscribe input:checked {
  background: #6ab04c;
}

.checkbox input:checked::before,
.comments_subscribe input:checked::before {
  left: 21px;
}

.form__field--checks .checkbox {
  width: calc(50% - 12px);
  min-width: 220px;
}

.rich-text .scriptcode,
.rich-text .title_spoiler,
.rich-text .text_spoiler {
  padding: 6px 10px;
  background: var(--bg-darker);
  border: 1px solid var(--bdc);
  border-radius: 4px;
}

.rich-text .title_spoiler {
  margin-top: 4px;
  cursor: pointer;
}

.rich-text .text_spoiler {
  margin-bottom: 4px;
  border-top: 0;
}

.rich-text .title_spoiler img {
  margin-right: 6px;
  vertical-align: middle;
}

.rich-text .scriptcode {
  color: #9ab96d;
  font-family: 'Courier New', monospace;
  text-align: left;
}

.rich-text .hide {
  margin: 0 0 1em;
  padding: 10px;
  color: var(--tt-lighter);
  background: var(--bg-darker);
  border-radius: 4px;
}

.rich-text .hide a {
  text-decoration: underline;
}

.rich-text .inhide {
  margin-bottom: 8px;
  padding: 10px;
  background: var(--bg-black);
  border: 1px solid var(--bdc);
  border-radius: 4px;
}

/* Спойлеры / hide вне .rich-text (DLE-разметка в комментариях и т.д.)
----------------------------------------------- */
.title_spoiler,
.text_spoiler,
.scriptcode,
.hide,
.inhide {
  color: var(--tt-lighter);
}

.title_spoiler,
.text_spoiler,
.scriptcode {
  padding: 6px 10px;
  background: var(--bg-darker);
  border: 1px solid var(--bdc);
  border-radius: 4px;
}

.title_spoiler {
  margin-top: 4px;
  cursor: pointer;
}

.text_spoiler {
  margin-bottom: 4px;
  border-top: 0;
}

.title_spoiler img {
  margin-right: 6px;
  vertical-align: middle;
}

.scriptcode {
  color: #9ab96d;
  font-family: 'Courier New', monospace;
}

.hide {
  margin: 0 0 1em;
  padding: 10px;
  background: var(--bg-darker);
  border-radius: 4px;
}

.hide a {
  text-decoration: underline;
}

.inhide {
  margin-bottom: 8px;
  padding: 10px;
  background: var(--bg-black);
  border: 1px solid var(--bdc);
  border-radius: 4px;
}

/* Рейтинг звёздами (DLE .unit-rating)
----------------------------------------------- */
.unit-rating {
  display: flex;
  position: relative;
}

.unit-rating li {
  position: relative;
  z-index: 5;
  background: url(../dleimages/rating.svg) no-repeat;
}

.unit-rating li a {
  display: block;
  width: 17px;
  height: 17px;
  overflow: hidden;
  text-indent: -100px;
}

.unit-rating:hover li {
  z-index: 10;
  background-position: 0 -17px;
}

.unit-rating li:hover ~ li {
  z-index: 5;
  background-position: 0 0;
}

.unit-rating li.current-rating {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  height: 100%;
  overflow: hidden;
  text-indent: -200px;
  pointer-events: none;
  background-position: 0 -34px;
  background-repeat: repeat-x;
}

/* Froala / WYSIWYG (PM, редакторы)
----------------------------------------------- */
.fr-box.fr-basic {
  border: 1px solid var(--bdc);
  border-radius: 6px;
  overflow: hidden;
}

.fr-box.fr-basic .fr-toolbar {
  background: var(--bg-darker);
  border-bottom: 1px solid var(--bdc);
}

.fr-box.fr-basic .fr-element,
.fr-wrapper .fr-element {
  min-height: 120px;
  padding: 12px;
  color: var(--tt-lighter-2);
  background: var(--bg-black);
}

.fr-box.fr-basic .fr-second-toolbar {
  background: var(--bg-darker);
  border-top: 1px solid var(--bdc);
}

.fr-toolbar .fr-btn,
.fr-popup {
  color: var(--tt-lighter);
}

/* Highslide (галерея в тексте)
----------------------------------------------- */
.highslide-container {
  z-index: 1099 !important;
}

.highslide-wrapper,
.highslide-outline,
.highslide-html {
  color: var(--tt-lighter);
  background: var(--bg-darker);
}

.highslide-image {
  border: 2px solid var(--bdc);
}

.highslide-dimming {
  background-color: #000;
}

.highslide-caption {
  padding: 8px 12px;
  color: var(--tt-lighter);
  background: var(--bg-darker);
}

/* DLE jQuery UI модалки (жалобы, like/dislike, alert, confirm, профиль)
----------------------------------------------- */
.ui-front {
  z-index: 1100;
}

.ui-widget-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 1 !important;
  animation: overlay-fade-in 0.25s ease;
  backdrop-filter: blur(4px);
}

.ui-dialog {
  position: absolute;
  width: 500px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  color: var(--tt-lighter);
  background: var(--ui-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 64px rgba(0, 0, 0, 0.55);
  animation: dle-modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Как в dle_js.js: modalfixed + position:fixed + jQuery UI position.of=window */
.modalfixed.ui-dialog {
  position: fixed;
}

.ui-dialog-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 10px 0 24px;
  color: var(--tt-lighter-2);
  background: var(--ui-bg-darker);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ui-dialog-title {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-dialog-content {
  position: relative;
  overflow: auto;
  max-height: calc(100vh - 220px);
  padding: 24px;
  color: var(--tt-lighter);
  line-height: 1.6;
  background: var(--ui-bg);
}

.ui-dialog-content textarea,
.ui-dialog-content input[type='text'],
.ui-dialog-content input[type='email'],
.ui-dialog-content input[type='password'],
.ui-dialog-content .ui-widget-content {
  width: 100%;
  padding: 10px 12px;
  color: var(--tt-lighter-2);
  background: var(--bg-black);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  transition:
    border-color var(--ease),
    box-shadow var(--ease);
}

.ui-dialog-content textarea:focus,
.ui-dialog-content input[type='text']:focus,
.ui-dialog-content input[type='email']:focus,
.ui-dialog-content input[type='password']:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 186, 228, 0.15);
}

.ui-dialog-content textarea {
  min-height: 140px;
  resize: vertical;
}

.ui-dialog-buttonpane {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  background: var(--ui-bg-darker);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ui-dialog-buttonpane button,
.ui-dialog-buttonpane .ui-button {
  min-width: 100px;
  height: 40px;
  padding: 0 18px;
  color: var(--tt-lighter);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--ui-bg);
  cursor: pointer;
  transition:
    background-color var(--ease),
    border-color var(--ease),
    color var(--ease),
    transform var(--ease);
}

.ui-dialog-buttonpane button:hover,
.ui-dialog-buttonpane .ui-button:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent-darker);
}

.ui-dialog-buttonpane button:active,
.ui-dialog-buttonpane .ui-button:active {
  transform: translateY(1px);
}

.ui-dialog-buttonpane button:first-child {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.ui-dialog-buttonpane button:first-child:hover,
.ui-dialog-buttonpane .ui-button:first-child:hover {
  border-color: var(--accent-darker);
  background: var(--accent-darker);
}

button.ui-dialog-titlebar-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  color: var(--tt-lighter);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background-color var(--ease),
    color var(--ease);
}

button.ui-dialog-titlebar-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* DLE/jQuery UI рисует <span class="ui-icon ui-icon-closethick"> — иконка через CSS, не через icons.tpl */
.ui-icon-closethick {
  display: block;
  width: 16px;
  height: 16px;
  text-indent: -9999px;
  overflow: hidden;
}

.ui-icon-closethick::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.3 5.71 12 12.01l-6.29-6.3-1.42 1.42 6.3 6.29-6.3 6.29 1.42 1.42 6.29-6.3 6.29 6.3 1.42-1.42-6.3-6.29 6.3-6.29z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.3 5.71 12 12.01l-6.29-6.3-1.42 1.42 6.3 6.29-6.3 6.29 1.42 1.42 6.29-6.3 6.29 6.3 1.42-1.42-6.3-6.29 6.3-6.29z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.ui-state-error,
.ui-widget-content.ui-state-error {
  color: #eb4d4b !important;
  background: rgba(235, 77, 75, 0.12) !important;
  border-color: #eb4d4b !important;
}

@keyframes dle-modal-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Админ-меню быстрых действий (DLE dropmenudiv)
----------------------------------------------- */
#dropmenudiv {
  z-index: 1090 !important;
  min-width: 200px;
  padding: 6px;
  font-size: 13px;
  color: var(--tt-lighter);
  background: var(--bg-darker);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
  opacity: 1 !important;
}

#dropmenudiv a {
  display: block;
  width: auto;
  padding: 10px 12px;
  color: var(--tt-lighter);
  text-decoration: none;
  border-radius: 6px;
  transition:
    background-color var(--ease),
    color var(--ease);
}

#dropmenudiv a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

#dropmenudiv a + a {
  margin-top: 2px;
}

/* Профиль — popup из ShowProfile / profile_popup.tpl
----------------------------------------------- */
.ui-dialog.dle-popup-userprofile {
  width: min(560px, calc(100vw - 32px));
}

.dle-popup-userprofile .ui-dialog-content {
  padding: 20px 24px 8px;
}

.dle-popup-userprofile .profile-popup {
  gap: 20px;
}

.dle-popup-userprofile .profile-popup__aside {
  flex-shrink: 0;
}

.dle-popup-userprofile .profile-popup__avatar {
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.dle-popup-userprofile .profile-popup__item {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dle-popup-userprofile .profile-popup__item:last-child {
  border-bottom: 0;
}

.dle-popup-userprofile .profile-popup__label {
  color: var(--tt-darker);
}

.dle-popup-userprofile .ui-dialog-buttonpane {
  justify-content: stretch;
  gap: 8px;
}

.dle-popup-userprofile .ui-dialog-buttonpane button {
  flex: 1 1 0;
}

#modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 980;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}

.dle-popup-userprofileadmin .ui-dialog-content {
  padding: 0;
}

.dle-popup-userprofileadmin iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* Подсказки быстрого поиска
----------------------------------------------- */
#searchsuggestions {
  z-index: 99998;
  width: 435px;
  max-width: calc(100vw - 40px);
  overflow: hidden;
  font-size: 13px;
  background: var(--bg-darker);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
}

#searchsuggestions a {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: start;
  padding: 12px;
  color: var(--tt-lighter);
  text-decoration: none;
  border-bottom: 1px solid var(--ui-bg-darker);
  transition: background-color var(--ease);
}

#searchsuggestions a:last-of-type {
  border-bottom: 0;
}

#searchsuggestions a:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

#searchsuggestions .poster_search {
  grid-row: 1 / 3;
  grid-column: 1;
  width: 64px;
  height: 96px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-black);
}

#searchsuggestions span.searchheading {
  grid-column: 2;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tt-lighter-2);
}

#searchsuggestions a > span:not(.searchheading) {
  grid-column: 2;
  display: -webkit-box;
  overflow: hidden;
  color: var(--tt-darker);
  font-size: 12px;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

#searchsuggestions a:not(:has(.poster_search)) {
  display: block;
  padding: 12px 16px;
}

#searchsuggestions a:not(:has(.poster_search)) .searchheading {
  display: block;
  margin-bottom: 4px;
}

#searchsuggestions span.seperator {
  display: block;
  border-top: 1px solid var(--ui-bg-darker);
}

#searchsuggestions span.seperator a {
  display: block;
  padding: 12px 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  background: rgba(0, 186, 228, 0.08);
  transition:
    background-color var(--ease),
    color var(--ease);
}

#searchsuggestions span.seperator a:hover {
  color: #fff;
  background: var(--accent-darker);
}

#searchsuggestions span.notfound {
  display: block;
  padding: 16px 20px;
  color: var(--tt);
}

#searchsuggestions .break {
  display: none;
}

/* Кнопка «наверх»
----------------------------------------------- */
.scrolltop {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 990;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--tt-lighter);
  border-radius: 50%;
  background: var(--bg-lighter);
  box-shadow: var(--bsh);
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.scrolltop .icon {
  width: 20px;
  height: 20px;
}

.scrolltop.is-visible {
  display: flex;
}

.scrolltop:hover {
  color: #fff;
  background: var(--accent);
  transform: translateY(-2px);
}

/* RESPONSIVE — LAYOUT
----------------------------------------------- */
@media screen and (max-width: 1220px) {
  .nav {
    display: none;
  }

  .header__burger {
    display: flex;
  }
  body {
    background-image: none;
  }

  .page {
    overflow: hidden;
    background-size: 140% auto;
  }

  .page__container {
    max-width: 1000px;
  }

  .header {
    height: 60px;
    padding: 0 15px;
  }

  .header__search {
    flex: 1 1 0;
    max-width: none;
    margin: 0 10px;
  }

  .header__action-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .carousel {
    padding: 20px 20px 40px;
    border-left: 0;
    border-right: 0;
  }

  .catalog__header {
    padding-top: 0;
  }

  .footer {
    justify-content: center;
    padding-left: var(--indent);
    padding-right: var(--indent);
    text-align: center;
  }

  .footer__text {
    min-width: 100%;
    margin-top: 20px;
  }
}

@media screen and (max-width: 949px) {
  .page__container {
    max-width: 768px;
  }

  .header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .header__search {
    width: 100%;
    margin: 5px 10px;
  }

  #searchsuggestions {
    width: calc(100% - 40px);
  }

  .breadcrumbs {
    max-width: 355px;
    margin-bottom: 10px;
  }

  .pagination__more a,
  .pagination__more > span {
    max-width: 100%;
    height: 48px;
    padding: 0 28px;
  }

  .pagination__pages a,
  .pagination__pages span {
    min-width: 44px;
    height: 44px;
  }
}

@media screen and (max-width: 759px) {
  .page__container {
    max-width: 640px;
  }
}

@media screen and (max-width: 1024px) {
  .catalog__grid {
    gap: 16px;
  }

  .catalog__grid > .card {
    flex: 1 1 calc((100% - 48px) / 4);
    max-width: calc((100% - 48px) / 4);
  }
}

@media screen and (max-width: 768px) {
  .catalog__grid {
    gap: 15px;
  }

  .catalog__grid > .card {
    flex: 1 1 calc((100% - 15px) / 2);
    max-width: calc((100% - 15px) / 2);
  }

  .card__body {
    min-height: 52px;
    padding-top: 10px;
  }

  .card__title {
    font-size: 13px;
  }

  .card__meta {
    gap: 6px;
    font-size: 12px;
  }
}

@media screen and (max-width: 590px) {
  .page__container {
    max-width: 480px;
    padding-top: 0;
  }

  .page {
    background-image: none;
  }

  .header {
    height: auto;
    box-shadow: none;
  }

  .header__action-btn {
    width: 40px;
    height: 40px;
    margin: auto 10px auto auto;
    padding: 0;
  }

  .header__action-btn__text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .header__action-btn__icon {
    display: block;
  }

  .header__login {
    display: none;
  }

  .header__logo {
    flex: 1 1 0;
    min-width: 165px;
    max-width: 50%;
  }

  .logo__title {
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .logo__title img {
    width: 25px;
    vertical-align: middle;
  }

  .catalog__title {
    font-size: 20px;
  }
}

@media screen and (max-width: 480px) {
  .catalog__grid {
    gap: 12px;
  }

  .catalog__grid > .card {
    flex: 1 1 calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
  }

  .card__body {
    gap: 4px;
    min-height: 48px;
    padding-top: 8px;
  }

  .card__title {
    font-size: 12px;
  }

  .card__meta {
    gap: 4px;
    font-size: 12px;
  }

  .card__badges {
    top: 6px;
    left: 6px;
    gap: 4px;
  }

  .card__badge,
  .card__age {
    padding: 2px 6px;
    font-size: 12px;
  }

  .card__ratings {
    right: 6px;
    bottom: 6px;
    gap: 4px;
  }

  .card__rating {
    padding: 3px 6px;
    font-size: 12px;
  }

  .footer__logo {
    margin-right: 0;
  }
}

@media screen and (max-width: 470px) {
  .layout__main {
    width: 100%;
    padding: var(--mobindent);
  }
  .footer {
    flex-direction: column;
  }
}

/* SEO BLOCK
----------------------------------------------- */
.seo {
  display: grid;
  gap: 20px;
  margin: 40px var(--indent);
  line-height: 1.7;
  color: var(--tt);
}

.seo__title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tt-lighter);
}

.seo__subtitle {
  font-size: 16px;
  font-weight: 700;
  color: var(--tt-lighter);
}

.seo__text a,
.seo__list-item a {
  color: var(--tt);
  text-decoration: underline;
}

.seo__list-item {
  position: relative;
  margin-bottom: 10px;
  margin-left: 10px;
  padding-left: 25px;
}

.seo__list-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 14px;
  height: 14px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.seo__image {
  width: 100%;
  max-width: 1000px;
  height: auto;
  aspect-ratio: 10 / 3;
  object-fit: cover;
  background: #0b0b0b;
}

/* MOVIE (FULLSTORY)
----------------------------------------------- */
.movie {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.movie__header {
  margin-bottom: 24px;
}

.movie__title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.movie__title {
  flex: 1 1 0;
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.movie__edit,
.movie__edit a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #999;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.movie__edit:hover,
.movie__edit a:hover {
  color: #fff;
  background: var(--accent);
}

.movie__edit .icon {
  width: 14px;
  height: 14px;
}

.movie__subtitle {
  margin: 0;
  font-size: 14px;
  font-style: italic;
  color: #999;
}

.movie__info {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.movie__poster-block {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 12px;
  width: 200px;
}

.movie__poster-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.movie__badges-mobile {
  display: none;
}

.movie__poster {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #121212;
  border-radius: 8px;
}

.movie__poster--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(110deg, #141414 8%, #1c1c1c 18%, #141414 33%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s ease-in-out infinite;
  pointer-events: none;
}

.movie__poster-image {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--ease);
}

.movie__poster-image--placeholder {
  opacity: 0;
}

.movie__badge {
  position: absolute;
  z-index: 2;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 4px;
}

.movie__badge--season {
  top: 8px;
  left: 8px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: var(--accent);
}

.movie__badge--episode {
  top: 8px;
  left: 8px;
  margin-top: 28px;
  color: #fff;
  background: rgba(0, 186, 228, 0.8);
}

.movie__badge--age {
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: #ff4444;
  border: 2px solid #fff;
  border-radius: 50%;
}

.movie__badge--status {
  position: absolute;
  top: -34px;
  right: 0;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: #22c55e;
}

.movie__scores {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.movie__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.movie__score--kp {
  color: #ff6600;
  border-color: rgba(255, 102, 0, 0.3);
}

.movie__score--imdb {
  color: #f5c518;
  border-color: rgba(245, 197, 24, 0.3);
}

.movie__details {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.movie__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.movie__meta-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: start;
}

.movie__meta-term {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  white-space: nowrap;
}

.movie__meta-value {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
}

.movie__meta-value a {
  color: var(--accent);
  text-decoration: none;
}

.movie__meta-value a:hover {
  text-decoration: underline;
}

.movie__description {
  margin-bottom: 32px;
  font-size: 15px;
  line-height: 1.7;
  color: #ddd;
}

.movie__player {
  overflow: hidden;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.movie__player-head {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.movie__tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.movie__tab {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #aaa;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.movie__tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.movie__tab--active {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: var(--accent);
  border-color: var(--accent);
}

.movie__player-body {
  position: relative;
}

.movie__video {
  display: none;
  position: relative;
  padding-top: 56.25%;
  background: #000;
}

.movie__video--active {
  display: block;
}

.movie__video--active::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 50px;
  height: 12px;
  background-image:
    radial-gradient(circle, var(--accent) 4px, transparent 4px),
    radial-gradient(circle, var(--accent) 4px, transparent 4px),
    radial-gradient(circle, var(--accent) 4px, transparent 4px);
  background-repeat: no-repeat;
  background-position:
    0 center,
    20px center,
    40px center;
  background-size: 10px 10px;
  transform: translate(-50%, -50%);
  animation: movie-loader 1.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes movie-loader {
  0%,
  66.66%,
  100% {
    opacity: 0.4;
  }
  16.66%,
  33.33%,
  50% {
    opacity: 1;
  }
}

.movie__iframe {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
}

.movie__player-foot {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.movie__share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

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

.movie__reaction a .icon {
  width: 14px;
  height: 14px;
}

.movie__reaction a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  transition: background-color 0.2s ease;
}

.movie__reaction a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.movie__reaction--like .icon {
  color: #22c55e;
}

.movie__reaction--dislike .icon {
  color: #ef4444;
}

/* Yandex Share — резерв места до ya-share2_inited (CLS)
----------------------------------------------- */
.movie__share-widget {
  display: flex;
  flex: 1 1 240px;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  min-height: 36px;
}

.movie__share .ya-share2 {
  display: block;
  width: 100%;
  min-height: 28px;
}

.movie__share .ya-share2:not(.ya-share2_inited) {
  position: relative;
  overflow: hidden;
  min-height: 28px;
  border-radius: 6px;
}

.movie__share .ya-share2:not(.ya-share2_inited)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.04) 8%,
    rgba(255, 255, 255, 0.09) 18%,
    rgba(255, 255, 255, 0.04) 33%
  );
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s ease-in-out infinite;
}

.movie__share .ya-share2.ya-share2_inited .ya-share2__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  margin: 0;
}

.movie__share
  .ya-share2.ya-share2_inited
  .ya-share2__container_size_m
  .ya-share2__icon {
  width: 28px;
  height: 28px;
  background-size: 28px 28px;
}

.movie__complaint a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  font-size: 14px;
  color: #ff4444;
  text-decoration: none;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 6px;
}

.movie__complaint a:hover {
  background: rgba(255, 68, 68, 0.2);
  border-color: rgba(255, 68, 68, 0.5);
}

.movie__caption {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #bbb;
  text-align: center;
}

.movie__comments {
  margin-bottom: 32px;
}

.movie__comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.movie__comments-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.movie__comments-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: var(--accent);
  border-radius: 6px;
}

.movie__comments-btn:hover {
  background: var(--accent-darker);
}

.movie__comments-form {
  overflow: hidden;
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    max-height var(--ease),
    opacity var(--ease),
    margin-bottom var(--ease);
}

.movie__comments-form__inner {
  overflow: hidden;
}

.movie__comments-form:not(.movie__comments-form--hidden) {
  max-height: 900px;
  margin-bottom: 16px;
  opacity: 1;
  pointer-events: auto;
}

.movie__comments-list {
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.movie__comments-list--empty {
  padding: 50px 18px;
  text-align: center;
}

.movie__comments-empty {
  font-size: 14px;
  color: #888;
}

.movie__related {
  margin-bottom: 32px;
}

.movie__related-title {
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

/* RELATED — grid (десктоп) / карусель (smartphone)
----------------------------------------------- */
.movie__related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.movie__related-carousel.carousel {
  padding: 0;
  --carousel-gap: 10px;
  --carousel-visible: 2;
  --related-slide-width: 160px;
}

.movie__related-carousel .carousel__viewport {
  overflow: hidden;
  width: 100%;
}

.movie__related-carousel .carousel__track {
  display: flex;
  align-items: stretch;
  gap: var(--carousel-gap);
  transition: transform 0.35s ease;
  will-change: transform;
}

.movie__related-carousel .carousel__slide {
  flex: 0 0 var(--related-slide-width);
  width: var(--related-slide-width);
  max-width: var(--related-slide-width);
  min-width: 0;
}

.movie__related-carousel .carousel__slide .related-card {
  width: 100%;
  height: 100%;
}

.movie__related-carousel .carousel__arrow {
  display: none;
}

.movie__related-carousel .carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 10px;
  margin-top: 16px;
}

/* RELATED CARD
----------------------------------------------- */
.related-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.related-card:hover {
  opacity: 0.8;
}

.related-card__poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #1a1a1a;
  border-radius: 4px;
  box-shadow: var(--bsh-2);
}

.related-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card__info {
  position: relative;
  height: 70px;
  padding: 10px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: #111;
}

.related-card__title {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-card__meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 20px;
  max-height: 40px;
  margin-top: 8px;
  overflow: hidden;
  font-size: 12px;
}

.related-card__year {
  font-weight: 700;
}

.related-card__rating {
  padding-left: 17px;
  padding-top: 4px;
  background-repeat: no-repeat;
  background-position: 0 5px;
  background-size: 15px;
}

.related-card__rating--kp {
  background-image: url(../images/kp.svg);
}

.related-card__rating--imdb {
  background-image: url(../images/imdb.svg);
}

/* RICH TEXT
----------------------------------------------- */
.rich-text {
  font-size: 14px;
  line-height: 1.7;
  word-wrap: break-word;
}

.rich-text a {
  color: #5278b1;
  text-decoration: underline;
}

.rich-text p,
.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text > ul,
.rich-text > ol,
.rich-text table,
.rich-text img:not(.emoji) {
  margin-bottom: 20px;
}

.rich-text > ul li,
.rich-text > ol li {
  position: relative;
  padding-left: 60px;
}

.rich-text > ul li::before {
  content: '';
  position: absolute;
  left: 26px;
  top: 8px;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
}

/* COMMENTS
----------------------------------------------- */
.comment {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--bdc);
  box-shadow: 0 1px var(--bdc-lighter);
}

.comment__post-title {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--tt-lighter);
}

.comment__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment__avatar {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
}

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

.comment__letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
}

.comment__letter--0 {
  background-color: #c57c3b;
}
.comment__letter--1 {
  background-color: #753bc5;
}
.comment__letter--2 {
  background-color: #79c53b;
}
.comment__letter--3 {
  background-color: #eb3b5a;
}
.comment__letter--4 {
  background-color: #45aaf2;
}
.comment__letter--5 {
  background-color: #2bcbba;
}
.comment__letter--6 {
  background-color: #778ca3;
}

.comment__meta {
  flex: 1 1 0;
  min-width: 0;
}

.comment__author,
.comment__author a {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: var(--tt);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment__date {
  margin-top: 4px;
  font-size: 12px;
  color: var(--tt-darker-2);
}

.comment__rating {
  flex-shrink: 0;
  font-size: 14px;
  white-space: nowrap;
}

.comment__rating a {
  margin-left: 6px;
  color: var(--tt);
}

.comment__rating a > span:first-child {
  margin-right: 2px;
  color: #6ab04c;
}

.comment__rating a:last-child > span:first-child {
  color: #eb4d4b;
}

.comment__body {
  margin: 8px 0 6px;
  font-size: 15px;
}

.comment__body .quote {
  position: relative;
  margin: 0 0 10px;
  padding: 10px 15px 10px 40px;
  font-size: 12px;
  color: #5a4f3e;
  background-color: #eff3f7;
}

.comment__body .quote::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  width: 16px;
  height: 16px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.comment__footer {
  display: flex;
  align-items: center;
}

.comment__action a {
  margin-right: 20px;
  font-size: 12px;
  color: var(--tt-darker-2);
}

.comment__action a:hover {
  text-decoration: underline;
}

.comment__action--reply a .icon {
  width: 12px;
  height: 12px;
  margin-left: 5px;
  vertical-align: middle;
}

.comment__action--quote a .icon {
  width: 12px;
  height: 12px;
  margin-right: 5px;
  vertical-align: middle;
}

.comment__admin {
  flex: 1 1 0;
  margin-right: -15px;
  font-size: 12px;
  text-align: right;
}

.comment__admin li {
  display: inline-block;
  margin-left: 10px;
  line-height: 16px;
  vertical-align: middle;
}

.comment__admin a:not(:hover) {
  color: var(--tt-darker-2);
}

.comment__admin-check {
  transform: scale(0.8);
  transform-origin: right center;
}

/* COMMENTS FORM
----------------------------------------------- */
.comments-form {
  margin-bottom: 20px;
}

.comments-form__row {
  margin-bottom: 20px;
}

.comments-form__row:last-child {
  margin-bottom: 0;
}

.comments-form__row--hidden {
  display: none;
}

.comments-form__row--protect {
  padding: 15px 20px;
  background-color: var(--bg-darker);
  border: 1px solid var(--bdc);
  border-left: 4px solid var(--accent);
}

.comments-form__label-wrap {
  margin-bottom: 10px;
}

.comments-form__label {
  font-size: 14px;
  color: var(--tt-lighter);
}

.comments-form__label--required::after {
  content: '*';
  margin-left: 5px;
  color: #e85319;
}

.comments-form__field {
  position: relative;
}

.comments-form__field--captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.comments-form__input,
.comments-form__editor textarea,
.comments-form__editor #comments_ifr,
.mass_comments_action select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--tt-lighter);
  background-color: var(--bg-darker);
  border: 1px solid var(--bdc);
  border-radius: 0;
}

.comments-form__editor textarea,
.comments-form__editor #comments_ifr {
  min-height: 100px;
}

.comments-form__field--captcha .comments-form__input {
  flex: 1 1 210px;
  max-width: 210px;
}

.comments-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}

.comments-form__submit {
  padding: 0 20px;
  height: 40px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  background-color: var(--accent);
  border-radius: 3px;
}

.comments-form__submit:hover {
  background-color: var(--accent-darker);
}

.comments-form__guest {
  flex: 1 1 0;
  min-width: 180px;
}

/* BB editor (DLE output inside comments-form)
----------------------------------------------- */
.comments-form .bb-pane {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
  padding: 5px 1px 5px 10px;
  background: linear-gradient(
    to top,
    var(--ui-bg-darkest) 0%,
    var(--ui-bg) 80%,
    var(--ui-bg) 100%
  );
  border: 1px solid var(--ui-bdc);
  border-radius: 3px 3px 0 0;
}

.comments-form .bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-right: 5px;
  font-size: 12px;
  color: var(--tt);
  border-radius: 3px;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.comments-form .bb-btn:hover {
  color: var(--ui-text-color-on-accent);
  background-color: var(--accent);
}

.comments-form .bb-editor textarea {
  margin-top: -1px;
}

@font-face {
  font-family: 'bb-editor-font';
  src: url('../webfonts/bb-editor.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

.comments-form [class^='bb-btn'],
.comments-form [class*=' bb-btn'] {
  font-family: 'bb-editor-font';
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.comments-form #b_b::before {
  content: '\f032';
}
.comments-form #b_i::before {
  content: '\f033';
}
.comments-form #b_u::before {
  content: '\f0cd';
}
.comments-form #b_s::before {
  content: '\f0cc';
}
.comments-form #b_img::before {
  content: '\f03e';
}
.comments-form #b_up::before {
  content: '\e930';
}
.comments-form #b_emo::before {
  content: '\f118';
}
.comments-form #b_url::before {
  content: '\f0c1';
}
.comments-form #b_quote::before {
  content: '\e977';
}
.comments-form #b_code::before {
  content: '\f121';
}
.comments-form #b_hide::before {
  content: '\e9d1';
}
.comments-form #b_spoiler::before {
  content: '\e600';
}

/* DLE mass comments admin bar
----------------------------------------------- */
.mass_comments_action {
  display: flex;
  align-items: center;
  max-width: 800px;
  margin-bottom: 20px;
  white-space: nowrap;
}

.mass_comments_action select {
  flex: 1 1 0;
  margin: 0 -8px 0 20px;
  border-radius: 0;
}

.mass_comments_action .bbcodes {
  padding: 0 10px;
  border-radius: 0;
}

.comments_subscribe + br {
  display: none;
}

/* MOVIE RESPONSIVE
----------------------------------------------- */
@media screen and (max-width: 950px) {
  .movie__info {
    grid-template-columns: 160px 1fr;
    gap: 20px;
  }

  .movie__poster-block {
    width: 160px;
  }
}

@media screen and (max-width: 760px) {
  .movie {
    padding: 16px;
  }

  .movie__title {
    font-size: 24px;
  }

  .movie__info {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .movie__poster-block {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .movie__poster-wrap {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
  }

  .movie__poster {
    width: 150px;
    flex-shrink: 0;
  }

  .movie__badges-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .movie__badge--mobile {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
  }

  .movie__badge--mobile.movie__badge--age {
    display: flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
  }

  .movie__scores--mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
  }

  .movie__scores--mobile .movie__score {
    justify-content: center;
    width: 100%;
    min-width: auto;
    padding: 6px 10px;
    font-size: 13px;
  }

  .movie__meta-row {
    grid-template-columns: 80px 1fr;
    gap: 10px;
  }

  .movie__tabs {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .movie__tabs::-webkit-scrollbar {
    display: none;
  }

  .movie__video {
    padding-top: 65%;
  }

  .movie__share {
    gap: 12px;
  }

  .movie__share-widget {
    flex: 1 1 100%;
    min-width: 100%;
    min-height: 36px;
  }

  .movie__complaint {
    margin-left: 0;
  }

  .movie__comments-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .movie__comments-btn {
    width: 100%;
  }

  .movie__related-title {
    font-size: 20px;
  }

  .seo {
    margin-left: var(--indent);
    margin-right: var(--indent);
  }
}

@media screen and (max-width: 590px) {
  .comments-form__guest {
    flex: 1 1 100%;
    min-width: 100%;
    margin: 0;
  }

  .comments-form__submit {
    order: 10;
    width: 100%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  }

  .comments-form__row--protect .comments-form__label-wrap {
    width: 100%;
    margin-bottom: 10px;
  }

  .comments-form__field--captcha .comments-form__input {
    max-width: 100%;
    width: 100%;
  }

  .mass_comments_action,
  .comment__admin,
  .comment__rating {
    display: none;
  }

  .movie {
    width: 100%;
    padding: 12px;
  }

  .movie__title {
    font-size: 20px;
  }

  .movie__poster-block {
    max-width: none;
  }

  .movie__poster {
    width: 140px;
    max-width: 140px;
    flex-shrink: 0;
  }

  .movie__description {
    font-size: 14px;
  }

  .form__caption {
    width: 100%;
    padding-right: 0;
    margin-bottom: 6px;
  }

  .form__field--checks .checkbox {
    width: 100%;
  }

  .profile__detail,
  .profile__link-item {
    width: 100%;
  }

  .profile__actions {
    width: 100%;
  }

  .form__btn--secondary {
    margin-left: 0;
    margin-top: 10px;
  }

  .ui-dialog {
    width: calc(100vw - 24px) !important;
    max-width: none;
  }

  .ui-dialog-buttonpane {
    flex-direction: column;
  }

  .ui-dialog-buttonpane button,
  .ui-dialog-buttonpane .ui-button {
    width: 100%;
    margin: 0;
  }
}
