body {
    /*margin-top: 150px;*/
    background-color: #111;
}

/*body:before, body::after {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    z-index: -1;
    height: 450px;
    background: url(https://cdnmovies.ru/upload/default/bg.webp) center center / 1400px auto no-repeat;
    content: '';
    filter: grayscale(0.55);
    --left: calc((100vw - 1340px) / 2);
    --right: calc((100vw - 1340px) / 2 + 1300px);
    mask-image: linear-gradient(to right, transparent 0%, transparent var(--left), #000 calc(var(--left) + 160px), #000 calc(var(--right) - 160px), transparent var(--right), transparent 100%);
}

body::after {
    background: linear-gradient(to top, #111 0%, transparent 300px);
    mask-image: none !important;
}*/

.icms-alert {
    display: none;
    transition: opacity .4s ease, transform .4s ease;
    opacity: 0;
    transform: translateY(0);
}

.icms-alert.showing {
    display: block;
    opacity: 0;
}

.icms-alert.active {
    opacity: 1;
    transform: translateY(0);
}

.icms-alert.hiding {
    opacity: 0;
    transform: translateY(-10px);
}

.theme-toggle {
    display: inline-flex;
}

.theme-toggle .theme-btn {
border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
}

.theme-toggle .theme-btn.light {
    color: #a69232;
}

.theme-toggle .theme-btn.dark {
    color: #dedede;
}

.icms-header .nav-link {
    padding: .5rem;
}

.icms-user-menu {
    background-color: transparent;
}

.carousel.ordinary .swiper-slide {width: 140px;}
.carousel.mini .swiper-slide {width: 100px;}

.poster .image-container {
    width: 200px;
    height: 300px;
}

.poster-normal .image-container {
    width: 140px;
    height: 210px;
}

.poster-mini .image-container {
    width: 100px;
    height: 145px;
}

.poster-micro .image-container {
    width: 45px;
    height: 67px;
}

.image-container {
    position: relative;
    overflow: hidden;
    border-radius: .25rem;
    display: flex;
    justify-content: center;
    width: 100%;
    padding-top: 150%;
}

.image-container .image-placeholder {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 0.25rem !important;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wmp-100 {max-width: 100px;}
.mw-px-150 {min-width: 150px;}
.fs-07 {font-size: .7rem;}
.fs-075 {font-size: .75rem;}
.fs-08 {font-size: .8rem;}
.fs-085 {font-size: .85rem;}
.fs-09 {font-size: .9rem;}

.text-xs  { font-size: .75rem; }
.text-sm  { font-size: .875rem; }
.text-base{ font-size: 1rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.4rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.leading-tight { line-height: 1.2; }
.leading-normal{ line-height: 1.5; }

.gap {
    width: 80%;
    margin: 0 auto;
    border-top: 1px solid transparent; /* цвет в colors.css */
}

.g-ser {
    padding: 0.1rem 0.2rem;
    font-size: 0.65rem;
    border-radius: 0.1rem;
    text-transform: uppercase;
    vertical-align: middle;
    cursor: default;
}

.movie-view .fields > div {margin: .7rem 0;}
.movie-view .image-container,
.person-view .image-container {
    padding-top: 0 !important;
}

.movie-view .background-poster {
    width: 100%;
    height: 100%;
    position: absolute;
    overflow: hidden;
    transform: scale(1.5) translateY(-25px);
    filter: blur(30px);
}

.movie-view .background-rating {
    max-width: 200px;
    margin: 0 auto;
    border-radius: 0.3rem;
}

.movie-view .rating-s > div {
    justify-content: center !important;
}


.movies-grid .movie .ratings {
    bottom: -1px;
    color: #cecece;
    background: linear-gradient(180deg, #00000000 0%, #000000cc 80%);
}

.movies-grid .movie .ratings > div:last-child {
    border-top: 1px solid #ffffff4a;
}

.movie-persons .poster-mini {
    max-width: 100px;
}

:root{
  --search-gap: 8px; 
  --search-modal-max: 300px;
  --search-input-h: 44px;
  --z-backdrop: 1000;
  --z-input: 1001;
  --z-results: 1002;
}

.search-block { position: relative; }

.search-block form {
  position: relative;
  display: inline-block;
  width: auto;
}

.search-block .search-input {
  outline: none;
  padding: 0.3rem .5rem;
  border-radius: 0.2rem;
  width: 265px;
  position: relative;
  z-index: var(--z-input);
}

.search-block .search-input::placeholder { }

.search-block .search-result {
    position: absolute;
    top: calc(100% + var(--search-gap));
    left: 0;
    z-index: var(--z-results);
    display: none;
    width: 100%;
    text-align: left;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transition: opacity .15s ease, transform .15s ease;
    min-height: 50px;
}

.search-block .search-result .no-result {
  display: none;
  padding: 1em;
  text-align: center;
}

.search-block .search-result .items .items-title {
  font-size: 0.9em;
  margin: 1em;
}

.search-block .search-result .items a.item {
  text-decoration: none;
  padding: 0.4rem 0;
  display: block;
}

.search-block .search-result .items a.item .title {
  font-size: 0.9em;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.search-block .search-result .items a.item em {
    font-style: normal;
}
.search-block .search-result .items a.item .info {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block;
}
.search-block .search-result .all-results {
  padding: 0.4em; border: none; width: 100%;
}

.search-block .search-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.search-block .search-backdrop.show {
  display: block;
  z-index: 10;
}

@media (max-width: 767px) {
  .search-block.active {
      display: block !important;
  }
  .search-block.active .search-input {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, var(--search-modal-max));
    z-index: var(--z-input);
    padding: 0.75rem 1rem;
    border-radius: 0.4rem;
    font-size: 16px;
  }
  .search-block.active .search-result {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: calc(max(12px, env(safe-area-inset-top)) + var(--search-input-h) + var(--search-gap));
    width: min(92vw, var(--search-modal-max));
    z-index: var(--z-results);
    max-height: 60vh;
    overflow: auto;
  }
}

.search-block .search-result[style*="display: block"] { opacity: 1; }

.search-icon { cursor: pointer; }

#torrents tbody tr.row-new {
    border-left: 3px solid transparent; /* цвет в colors.css */
}

.dataTable {
  table-layout: fixed;
  width: 100% !important;
}

.dataTable .dt-column-header select {
    padding: 0.2rem;
    border: 1px solid transparent;
    outline: none;
    border-radius: 0.2rem;
}

#torrents a {}

#torrents .translations > span {
    padding: 0 0.3rem;
    line-height: 1.4;
    border-radius: 0.2rem;
    cursor: help;
    margin: 0 0.4rem .4rem 0;
    font-size: 0.75rem;
    display: inline-block;
}

div.dt-container.dt-empty-footer .dt-scroll-body {
    border-bottom: none !important;
}

#torrents a.dlt {
    cursor: pointer;
}

.icms-hleft,.icms-hright{flex:1 1 0;min-width:0;display:flex;align-items:center}
.icms-hcenter{flex:0 0 auto;text-align:center}

.icms-logo{
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Roboto', sans-serif;
    vertical-align: middle;
    line-height: 0;
    background-image: url(../images/logo.webp);
    height: 30px;
    background-repeat: no-repeat;
    background-size: contain;
    padding-left: 2.5rem;
    padding-top: 0.1rem;
}

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

.icms-header #menuToggle{
  font-size:1.5rem;
  display:flex;
  align-items:center;
  cursor:pointer
}

@media (min-width:992px){
  .desktop-nav .menu.menu-main{
    display:flex!important;
    flex-direction:row!important;
    align-items:center;
    flex-wrap:nowrap;
    padding-left:0;
    margin-bottom:0;
    list-style:none
  }
  .desktop-nav .menu.menu-main>li{display:block!important;position:relative}
  .desktop-nav .dropdown-menu{margin-top:0}
}

.desktop-nav .dropdown-menu{overflow:visible}
.desktop-nav .dropdown-menu .dropdown-menu{margin-left:.125rem}

.icms-drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1050;
  opacity: 0;
}
.icms-drawer.is-open { display: flex; }
.icms-drawer.is-open.is-ready { opacity: 1; }

.icms-drawer__panel{
  position: relative;
  width: 80vw;
  max-width: 400px;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.22,.61,.36,1);
}

.icms-drawer__backdrop{
  flex: 1 1 auto;
  transition: opacity .28s ease;
  pointer-events: none;
}

.icms-drawer.is-open .icms-drawer__backdrop{ pointer-events: auto; }

#mobileMenu .mobile-nav{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom);
}
#mobileMenu .mobile-nav-header{ flex: 0 0 auto; }

.icms-drawer__close{border:0;background:transparent;font-size:2rem;line-height:1}
body.no-scroll{overflow:hidden}

.mobile-nav-header{}
.mobile-nav-header .mobile-logo{text-decoration:none}

#mobileMenu .mobile-nav ul{list-style:none;padding-left:0;margin:0}
#mobileMenu .mobile-nav li{margin:.25rem 0}
#mobileMenu .mobile-nav li:last-child{border-bottom:0}

#mobileMenu .mm-toggle{
  width:100%;text-align:left;padding:.625rem 1rem;font-weight:600;
  border:0;background:transparent;
}
#mobileMenu .mm-toggle::after{content:"▸";float:right;transition:transform .2s;font-weight:400}
#mobileMenu .mm-toggle[aria-expanded="true"]::after{transform:rotate(90deg)}

#mobileMenu .mobile-nav .mm-link{
  display:block;padding:.5rem 1.25rem;text-decoration:none
}
#mobileMenu .mobile-nav .mm-link:hover{text-decoration:none}

.icms-drawer.is-open.is-ready .icms-drawer__panel{
  transform:translateX(0);
}

.icms-drawer__backdrop{
  pointer-events:none;
}
.icms-drawer.is-open .icms-drawer__backdrop{ pointer-events:auto; }
.icms-drawer.is-open.is-ready .icms-drawer__backdrop{ }

.q-badge {
    padding: 0 .15rem;
    border-radius: 0.15rem;
    color: #fff; /* можно перенести в colors, если будешь делать темную тему бейджей */
}

.is-completed {
    margin-left: 0.5rem;
    padding: 0.05rem 0.3rem;
    font-size: 0.65rem;
    border-radius: 0.1rem;
    text-transform: uppercase;
}

.btn:focus, .btn.focus {
    outline: 0 !important;
    box-shadow: none !important;
}


.subscription-box {
    border-radius: 0.6rem;
}

.subscription-box .tg-icon {
    color: #2AABEE;
}

.subscription-box .btn {
    font-weight: bold;
    border: none;
    outline: none !important;
}


a.view-online {
    position: relative;
    width: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #b36f5b 0%, #cf7840 100%);
    color: #ffffff;
}

a.view-online:hover {
    background: linear-gradient(135deg, #cf7840 0%, #cf7840 100%);
    animation: none;
    color: #ffffff;
}

a.view-online::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 80%;
    height: 200%;
    background: linear-gradient(
        120deg, 
        transparent 0%,
        rgba(255,255,255,0.6) 50%, 
        transparent 100%
    );
    transform: rotate(10deg);
    animation: shine 4s infinite;
}

.iframe-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.iframe-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


button#tg-subscribe-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #82a0dd 0%, #406fcf 100%);
    color: #ffffff;
    animation: subtle-shake 5s infinite ease-in-out;
}

button#tg-subscribe-btn:hover {
    background: linear-gradient(135deg, #406fcf 0%, #406fcf 100%);
    animation: none;
}

button#tg-subscribe-btn:hover::before {
    opacity: 0;
    animation: none;
}

button#tg-subscribe-btn::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 80%;
    height: 200%;
    background: linear-gradient(
        120deg, 
        transparent 0%,
        rgba(255,255,255,0.6) 50%, 
        transparent 100%
    );
    transform: rotate(25deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-200%) rotate(25deg);
    }
    100% {
        transform: translateX(300%) rotate(25deg);
    }
}

@keyframes subtle-shake {
    0%, 92%, 100% {
        transform: translateX(0);
    }
    94% {
        transform: translateX(-2px);
    }
    96% {
        transform: translateX(2px);
    }
    98% {
        transform: translateX(-1px);
    }
}

button#tg-open-qr {
    background: linear-gradient(135deg, #6dbea0 0%, #4abb39 100%);
    color: #ffffff;
}

button#tg-open-qr:hover {
    background: linear-gradient(135deg, #4abb39 0%, #4abb39 100%);
}

/* Оверлей */
.tg-overlay {
    background: rgba(0,0,0,0.85);
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

/* Контейнер внутри */
.tg-overlay-content {
    padding: 25px;
    border-radius: 14px;
    display: flex;
    gap: 25px;
    max-width: 700px;
    width: 90%;
    position: relative;
    background: #fff;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

/* Кнопка закрытия */
.tg-overlay-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

/* QR */
.tg-qr-left img {
    width: 220px;
    height: 220px;
    border-radius: 8px;
}

/* Текст справа */
.tg-qr-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tg-qr-right a {
    word-break: break-all;
}

.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show>.btn-primary.dropdown-toggle,
.btn-primary:focus, .btn-primary.focus {
    border: none;
    box-shadow: none;
}

.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus,
.show>.btn-primary.dropdown-toggle:focus {
    border: none;
    box-shadow: none;
}


.filter-panel {
    border-radius: 5px;
}

.filter-panel .noUi-handle-lower {
    right: 0;
}

.filter-panel .noUi-handle-upper {
    right: -45px;
}

.filter-panel .range-slider {
    padding: 0 45px;
    margin: 1.5rem 0;
}

.filter-panel .noUi-connects {
    border-radius: 0;
}

.filter-panel .noUi-connect,
.filter-panel .noUi-origin {
    will-change: auto;
}

.filter-panel .noUi-tooltip,
.filter-panel .noUi-horizontal .noUi-handle {
    border: none;
    width: 45px;
    height: 30px;
    line-height: 1.8rem;
    bottom: 0 !important;
    z-index: 1;
    padding: 0;
    box-shadow: none;
}

.filter-panel .noUi-horizontal .noUi-handle {
    top: -12px;
}

.filter-panel .noUi-horizontal {
    height: 5px;
}

.filter-panel .noUi-target {
    border-radius: 2px;
    border: none;
    box-shadow: none;
}

.filter-panel .set-range {
    display: inline-block;
}

.filter-panel .set-range > a {
    margin: 0 2px;
}

.filter-panel .set-range > a.active {
    font-weight: bold;
}

/* Выпадающий список ограничен по высоте + прокрутка */
.dropdown-menu {
    max-height: 300px;
    overflow-y: auto !important;
    overflow-x: hidden;
}

/* Чипы (теги) */
.filter-panel .smart-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
    transition: background-color .15s ease, color .15s ease;
}

.filter-panel .smart-tag .name {
    padding: 0.5rem 0.7rem;
}

.filter-panel .smart-tag--notin .name {
    text-decoration: line-through;
}

.filter-panel .smart-tag__remove {
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
}

.filter-panel .smart-tag.smart-tag--locked {
    opacity: .8;
    cursor: default;
    position: relative;
}

/* Анимация удаления (как сообщение в Telegram — лёгкий уход и схлопывание) */
.filter-panel .smart-tag--removing {
    animation: smartTagRemove .22s ease-out forwards;
}

@keyframes smartTagRemove {
    0% {
        opacity: 1;
        transform: translateX(0);
        max-height: 24px;
        margin-left: 2px;
        margin-right: 2px;
    }
    60% {
        opacity: 0;
        transform: translateX(10px);
        max-height: 24px;
    }
    100% {
        opacity: 0;
        transform: translateX(10px);
        max-height: 0;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}


.filter-panel .smart-item {
    cursor: pointer;
}

/* Подсветка активных пунктов (структурная часть) */
.filter-panel .smart-item--notin {
    text-decoration: line-through;
}

.filter-panel .smart-item--locked {
    cursor: default;
}

.filter-panel .smart-item--locked:hover {
    background: none;
}



.filter-panel .smart-dropdown .dropdown-toggle {
    padding: 0.3rem 1rem;
    border-radius: 3px;
    position: relative;
    padding-right: 26px;
}

.filter-panel .smart-dropdown .dropdown-toggle::after {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0 !important;
}

.filter-panel .smart-dropdown a.dropdown-item {
    padding: 0;
}


.filter-panel .smart-dropdown a.dropdown-item > span {
    padding: 0.2rem 1rem;
}

.filter-panel .smart-dropdown a.dropdown-item .smart-exclude {
    display: none;
}

.filter-panel .smart-dropdown a.dropdown-item:hover .smart-exclude {
    display: inline-block;
}

.filter-panel .smart-dropdown .dropdown-item.active,
.filter-panel .smart-dropdown .dropdown-item:active {
    text-decoration: none;
}

/* Заблокированный диапазон годов */
.filter-panel .range-locked .noUi-tooltip {
    background: #e0e0e0 !important;
}


.dl-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.dl-title{font-weight:700;font-size:18px;}
.dl-progress{height:12px;background:#111827;border-radius:10px;overflow:hidden;position:relative}
.dl-progress-fill{height:100%;width:0%;background:linear-gradient(90deg,#60a5fa,#34d399);transition:width .12s ease}
.dl-status{margin:10px 2px 0;}
a.dl-link{margin-top: 14px;background: #2d5dc8;color: #fff;text-decoration: none;padding: 10px 14px;border-radius: 12px;}
a.dl-link:hover{background-color: #2563eb;}
a.dl-link.show{display:inline-flex !important;opacity:1; transform:scale(1); pointer-events:auto}


.bookmark {
    right: 10px;
    top: -5px;
    margin: 0 !important;
    padding: 0;
    font-size: 1.3rem;
}


::selection {
    background: #295eab;
    color: #ffffff;
    text-shadow: none
}

@media (max-width: 576px) {
    .icms-logo {
        font-size: 0;
        padding-left: 2rem;
    }
}