/* ===== тестовая адаптация: телефон и планшет (<= 948px) ===== */
@media only screen and (max-width:948px){
  html,body{overflow-x:hidden}
  .wrapper,.content,.content-box,.header,.header-fixed-box,.header-absolute-box,.header-absolute,
  .slider-main-box,.footer,.footer-box,.content-border,.box-box{
    width:100%!important;max-width:100%!important;min-width:0!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box}
  img{max-width:100%;height:auto}
  /* боковая колонка уходит под контент, без полоски слева */
  .column-left{float:none!important;position:relative!important;margin:0!important;width:100%!important;max-width:100%!important;
    padding:0 10px!important;box-sizing:border-box;background:none!important;border:0!important;box-shadow:none!important}
  .column-right{padding:0!important;margin:0!important;overflow:hidden;width:100%!important}
  /* таблицы и широкие блоки прокручиваются внутри себя */
  .column-right table,.full-block table,.sh-block table{display:block;overflow-x:auto;max-width:100%}
  /* карточка фильма и описание */
  .full-content .poster{float:none!important;width:100%!important;margin:0 0 12px!important}
  .full-content .poster .poster-box{margin:0 auto 20px!important}
  .full-content .full-description{float:none!important;width:auto!important;margin:0 10px!important;padding:0!important;
    overflow-wrap:anywhere;word-break:break-word}
  .full-content{overflow:hidden}
  /* поля ввода и кнопки не выходят за экран */
  input,select,textarea,button{max-width:100%;box-sizing:border-box}
}
cat >> "$F" <<'CSS'

/* info-блоки и поля поиска не шире экрана */
@media only screen and (max-width:948px){
  .infoblock-on,.infoblock,.infoblock-bottom{width:auto!important;max-width:100%!important;margin:0 auto!important;box-sizing:border-box}
  .column-right input[type=text],.column-right input[type=search],.content input[type=text]{max-width:100%!important;box-sizing:border-box}
  .column-right form{max-width:100%}
}

/* страница поиска: поле и кнопка на всю ширину, блок ошибки не шире экрана */
@media only screen and (max-width:948px){
  .search,.search-input-box{width:100%!important;max-width:100%!important;box-sizing:border-box}
  .search #searchinput{width:100%!important;max-width:100%!important;box-sizing:border-box}
  .search #dosearch,.search input.bbcodes{display:block;width:100%!important;margin:8px 0 0!important;box-sizing:border-box}
  .berror-block,.berror{width:auto!important;max-width:100%!important;box-sizing:border-box}
}

/* блок «Информация» с отступами от краёв и переносом текста */
@media only screen and (max-width:948px){
  .berror-block{width:auto!important;float:none!important;margin:0 10px!important}
  .berror{padding:10px 12px 14px!important;word-break:break-word;overflow-wrap:anywhere}
}

/* статические страницы (правила и т.п.): блоки с фиксированной шириной в inline-стиле не шире экрана */
@media only screen and (max-width:948px){
  .column-right div[style*="width"],.column-right table[style*="width"],.column-right td[style*="width"],
  .column-right img[style*="width"],.content div[style*="width"]{width:auto!important;max-width:100%!important;box-sizing:border-box}
  .column-right p,.column-right div,.column-right li{overflow-wrap:anywhere}
  .column-right .horizontal-menu,.over-slider-menu{flex-wrap:wrap}
}

/* текст внутри колонки переносится по словам (без nowrap, который уводит строки за экран) */
@media only screen and (max-width:948px){
  .column-right,.column-right *{white-space:normal!important;max-width:100%!important;box-sizing:border-box}
  .column-right{overflow:hidden}
  .column-right img{height:auto}
}

/* подписки: тарифные таблицы прокручиваются по горизонтали внутри блока, текст рядом не сужается */
@media only screen and (max-width:948px){
  .column-right table{display:block;overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
  .column-right table td,.column-right table th{white-space:normal}
  .column-right .berror-block table{display:table}
}

/* телефон: ячейки таблиц (тарифы подписки) идут друг под другом, а не в ряд */
@media only screen and (max-width:948px){
  .column-right table,.column-right tbody,.column-right tr{display:block!important;width:100%!important;max-width:100%!important}
  .column-right td,.column-right th{display:block!important;width:100%!important;max-width:100%!important;box-sizing:border-box}
}

/* страница подписки: тарифы в столбик, блоки 601px не шире экрана */
@media only screen and (max-width:948px){
  .paybbb{display:block!important;width:100%!important;max-width:100%!important;float:none!important;box-sizing:border-box}
  .paysubb{float:none!important;display:block!important;width:100%!important;max-width:100%!important;margin:0 0 16px!important;box-sizing:border-box}
  div[style*="width: 601px"],div[style*="width:601px"]{width:100%!important;max-width:100%!important;box-sizing:border-box}
}

/* компьютер и широкий планшет: контейнер шире 948px, но не больше 1400px */
@media only screen and (min-width:1000px){
  .wrapper,.footer{min-width:0!important}
  .header,.header-fixed-box,.header-absolute-box,.slider-main-box,.content,.content-box,.footer-box{
    width:min(1400px,calc(100vw - 40px))!important;max-width:1400px!important}
}

/* компьютер: единый масштаб шапки, вкладок и карточек (пять карточек в ряд) */
@media only screen and (min-width:1000px){
  .grid .sh-block{width:24%!important;margin:0 0 34px!important}
  .over-slider-menu li a{height:40px!important;line-height:40px!important;font-size:15px!important;padding:0 20px!important}
  .header-fixed .searchbar input[type=text]{height:32px!important;font-size:14px!important}
}

/* компьютер: верхняя полоса выше и уравновешена с вкладками */
@media only screen and (min-width:1000px){
  .header-fixed{min-height:56px!important}
  .header-fixed-box{padding-top:10px!important;padding-bottom:10px!important;box-sizing:border-box}
  .header-fixed .searchbar input[type=text]{height:36px!important;font-size:15px!important}
  .header-fixed .logo img,.header-fixed img.logo{height:38px!important;width:auto!important}
}


/* лента постеров (компьютер): 7 постеров по 165px заполняют ширину, картинка на весь слот */
@media only screen and (min-width:1000px){
  .slider-main-box{height:auto!important;padding-top:10px!important;padding-bottom:10px!important}
  .slider-main .slide img{width:100%!important;height:auto!important;display:block}
  .slider-main .slide a{display:block;width:100%}
}

/* плитки подборок ниже ленты, которая стала выше */
@media only screen and (min-width:1000px){
  .collect-box{position:relative!important;top:0!important;margin-top:0!important;padding-top:24px!important;padding-bottom:30px!important}
}

/* лента (компьютер): слот 165px с зазором 12px, перебивает inline-стиль шаблона слайда (142px) */
@media only screen and (min-width:1000px){
  .slider-main .slide{margin-right:12px!important}
}

/* лента (компьютер): постер заполняет слот целиком (картинка имеет атрибут width=142) */
@media only screen and (min-width:1000px){
  .slider-main .slide img{width:100%!important;height:auto!important;display:block}
  .slider-main .slide a{display:block;width:100%}
}

/* лента (компьютер): окно bxSlider по высоте содержимого, постеры не обрезаются */
@media only screen and (min-width:1000px){
  .slider-main-box .bx-viewport{height:auto!important;min-height:0!important}
  .slider-main-box .bx-wrapper{height:auto!important}
}

/* шапка (компьютер): логотип и вход симметрично отступают от краёв контента */
@media only screen and (min-width:1000px){
  .header-fixed-box{padding-left:6px!important}
}

/* лента: все четыре угла скруглены, как у остальных блоков */
.slider-main-box{border-radius:10px!important}

/* плитки подборок: заголовки ниже ленты, вкладки сразу под плитками */
@media only screen and (min-width:1000px){
  .slider-main-box{margin-bottom:0!important}
  .collect-box{margin-top:86px!important}
  .over-slider-menu{margin-top:0!important}
}

/* страница подборки: без фонового узора, заголовок по центру с акцентной чертой */
.kp-coll-box{background-image:none!important;background-color:transparent!important;border:0!important;padding:0 0 30px!important}
.kp-coll-title{text-align:center;margin:20px 0 26px}
.kp-coll-title h1{font-size:26px;font-weight:700;color:#fff;letter-spacing:.3px;margin:0;line-height:1.2}
.kp-coll-title h1 a{color:#fff;text-decoration:none}
.kp-coll-title h1::first-letter{text-transform:uppercase}
.kp-coll-title h1:after{content:"";display:block;width:64px;height:3px;margin:12px auto 0;border-radius:2px;background:linear-gradient(90deg,#3b82f6,#6366f1)}

/* заголовок подборки: на всю ширину над постерами (блок .collect-box — flex-строка темы) */
.kp-coll-box > .kp-coll-title{flex:0 0 100%!important;width:100%!important;max-width:100%!important;display:block!important;float:none!important;margin:20px 0 26px!important;padding:0!important}
.kp-coll-box > .kp-coll-title h1{display:block!important;width:100%!important;font-size:26px!important;font-weight:700!important;color:#fff!important;text-align:center!important;text-shadow:none!important;margin:0!important}

/* категории: отступ между плитками, вкладками и линией контента (компьютер) */
@media only screen and (min-width:1000px){
  .collect-box{margin-bottom:0!important;padding-bottom:34px!important}
  .over-slider-menu{margin-top:0!important;margin-bottom:0!important;padding-bottom:12px!important}
  .speedbar-block{margin-top:16px!important}
}

/* категории: отступ между линией с хлебными крошками и первым рядом фильмов (компьютер) */
@media only screen and (min-width:1000px){
  #dle-content.grid{padding-top:22px!important}
  .speedbar-block{padding-bottom:12px!important}
}

/* сетка фильмов по центру (компьютер) */
@media only screen and (min-width:1000px){
  #dle-content.grid{display:flex!important;flex-wrap:wrap;justify-content:center;align-items:flex-start}
  #dle-content.grid .sh-block{float:none!important;margin-left:0!important;margin-right:0!important;margin-bottom:34px!important}
}

/* заголовки разделов (Фильмы, Сериалы) и служебные блоки — на всю ширину строки, не в ряд с карточками */
@media only screen and (min-width:1000px){
  #dle-content.grid > *:not(.sh-block):not(.kp-prem){flex:0 0 100%!important;width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;text-align:center}
}

/* текст внизу главной: на всю ширину сайта (компьютер) */
@media only screen and (min-width:1000px){
  .category-text{max-width:1240px!important;width:100%!important;margin:0 auto!important;padding:18px 10px 10px!important;text-align:left!important;box-sizing:border-box}
}

/* страница фильма: описание в виде аккуратного списка */
.full-description{text-align:left!important;font-size:14px;line-height:1.5;color:#c9cfdd}
.kp-spec{list-style:none;margin:0 0 6px;padding:0;display:grid;grid-template-columns:1fr 1fr;column-gap:32px}
.kp-spec li{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.08);font-size:14px}
.kp-spec li span{color:#8e97ad;white-space:nowrap}
.kp-spec li b{color:#fff;font-weight:600;text-align:right;overflow-wrap:anywhere}
.kp-spec li b a{color:#9fc4ff}
.kp-spec .kp-rate.imdb b{color:#3ddc84}
.kp-spec .kp-rate.kp b{color:#4fc3f7}
.kp-spec .quality{display:inline-block;padding:2px 8px;border-radius:4px;background:#2a3346;color:#fff;font-size:12px;vertical-align:middle}
.kp-meta{margin:10px 0 0;font-size:13px;color:#8e97ad}
.kp-next{margin-top:12px;font-size:14px;color:#c9cfdd}
.kp-next a{color:#9fc4ff}
@media only screen and (max-width:700px){ .kp-spec{grid-template-columns:1fr} }

/* страница фильма: строки спецификации не выпадают из потока и не получают цвет темы */
.kp-spec li,.kp-spec li.kp-rate{position:static!important;background:none!important;box-shadow:none!important;float:none!important;width:auto!important;left:auto!important;top:auto!important;bottom:auto!important;right:auto!important}
.kp-spec li.kp-rate b{background:none!important}

/* блок «Не пропустите фильмы»: ровные карточки по центру */
.related-news-block{margin:26px 0 0;background:#141a28;border-radius:10px;overflow:hidden}
.related-news-title{padding:12px 16px;font-size:16px;font-weight:700;color:#fff;background:linear-gradient(90deg,#1d2640,#141a28);border-bottom:1px solid rgba(255,255,255,.07)}
.related-news-title i{font-style:normal}
.related-news{padding:18px 12px 22px}
.related-news ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:18px 22px}
.related-news li{width:150px;text-align:center}
.related-news li a{display:block;color:#dfe5f2;font-size:13px;line-height:1.35;text-decoration:none}
.related-news li img{display:block;margin:0 auto 8px;width:150px!important;height:218px!important;object-fit:cover;border-radius:8px;box-shadow:0 6px 16px rgba(0,0,0,.45);transition:transform .2s}
.related-news li a:hover img{transform:translateY(-3px)}
.related-news li a:hover{color:#fff}

/* заглушка плеера для неавторизованных: аккуратная панель */
.player-block .box.visible > div{padding:0!important;top:auto!important;position:static!important;height:100%;display:flex;align-items:center;justify-content:center;min-height:300px}
.player-block .box.visible p{margin:0;color:#c9cfdd!important;font-size:16px!important;font-weight:500;text-align:center;line-height:1.6}
.player-block .box.visible p:before{content:"\f023";font-family:FontAwesome;display:block;font-size:34px;color:#6366f1;margin-bottom:12px}

/* «Не пропустите фильмы»: тёмная панель вместо серой темы, ровные отступы, подсветка при наведении */
.related-news-block.ns,.related-news-block{background:#0f1523!important;border:1px solid rgba(255,255,255,.06)!important;border-radius:10px!important;margin:28px 0 0!important;padding:0!important;float:none!important;width:100%!important;box-sizing:border-box;overflow:hidden}
.related-news-block .related-news-title,.related-news-block .related-news-title i{background:linear-gradient(90deg,#1b2440,#131a2c)!important;color:#fff!important;font-size:16px!important;font-weight:700!important;padding:14px 20px!important;margin:0!important;border-bottom:1px solid rgba(255,255,255,.07);display:block;text-align:left}
.related-news-block .related-news{padding:20px 16px 24px!important;margin:0!important;background:transparent!important}
.related-news-block .related-news ul{display:flex!important;flex-wrap:wrap;justify-content:center;gap:20px 18px;padding:0!important;margin:0!important;overflow:visible!important}
.related-news-block .related-news ul li{display:block!important;width:150px!important;margin:0!important;padding:10px 8px 12px!important;border:1px solid transparent;border-radius:10px;background:transparent;transition:background .2s,border-color .2s,transform .2s;text-align:center}
.related-news-block .related-news ul li a{display:block;color:#cfd6e6!important;font-size:13px;line-height:1.35;text-decoration:none!important}
.related-news-block .related-news ul li img{width:150px!important;height:218px!important;object-fit:cover;border-radius:8px;margin:0 auto 9px;display:block;box-shadow:0 6px 16px rgba(0,0,0,.45);transition:transform .2s,box-shadow .2s}
.related-news-block .related-news ul li:hover{background:rgba(99,102,241,.14)!important;border-color:rgba(99,102,241,.55)!important;transform:translateY(-3px);box-shadow:0 10px 24px rgba(0,0,0,.4)}
.related-news-block .related-news ul li:hover img{box-shadow:0 0 0 2px #6366f1,0 8px 18px rgba(0,0,0,.5)}
.related-news-block .related-news ul li:hover a{color:#fff!important}

/* карточки «Не пропустите фильмы»: подсветка охватывает постер и название целиком, названия по одинаковой высоте */
.related-news-block .related-news ul li{height:auto!important;min-height:0!important;display:flex!important;flex-direction:column;align-items:center;justify-content:flex-start;box-sizing:border-box;width:150px!important;padding:10px 8px 14px!important;overflow:visible}
.related-news-block .related-news ul li a{display:flex!important;flex-direction:column;align-items:center;width:100%;color:#cfd6e6!important;font-size:13px;line-height:1.35;text-align:center;min-height:3.9em;padding:0}
.related-news-block .related-news ul li img{flex:0 0 auto;margin:0 auto 9px!important}
.related-news-block .related-news ul li a{overflow-wrap:anywhere}

/* подсветка карточек: постер остаётся внутри рамки, без смещения и выхода за край */
.related-news li a:hover img,.related-news-block .related-news ul li:hover img{transform:none!important}
.related-news-block .related-news ul li:hover{transform:none!important;padding:11px 9px 13px!important}
.related-news-block .related-news ul li:hover img{box-shadow:0 0 0 2px #6366f1,0 6px 14px rgba(0,0,0,.5)!important;margin-bottom:8px!important}

/* постер ровно внутри карточки: ширина картинки = ширина карточки минус отступы */
.related-news-block .related-news ul li img,.related-news-block .related-news ul li:hover img{width:134px!important;height:200px!important;max-width:100%!important;object-fit:cover!important}
.related-news-block .related-news ul li{box-sizing:border-box!important}

/* при наведении подсвечивается только постер: фон и рамка карточки не меняются */
.related-news-block .related-news ul li:hover{background:transparent!important;border-color:transparent!important;box-shadow:none!important;transform:none!important;padding:10px 8px 12px!important}
.related-news-block .related-news ul li:hover a{color:#cfd6e6!important}
.related-news-block .related-news ul li:hover img{box-shadow:0 0 0 2px #6366f1,0 6px 14px rgba(0,0,0,.5)!important}

/* комментарии: карточки в стиле сайта, без красной подсветки темы */
#dle-ajax-comments{margin:8px 0 26px}
#dle-ajax-comments .comment,.kp-comment{margin:0}
.comment-block,.comment-block.ns{background:none!important;border:0!important;box-shadow:none!important}
.kp-comment{display:flex;gap:14px;align-items:flex-start;background:#141a28;border:1px solid rgba(255,255,255,.06);border-radius:10px;padding:14px 16px;margin:0 0 12px}
.kp-cm-ava img{width:44px;height:44px;border-radius:50%;object-fit:cover;display:block;background:#1d2538}
.kp-cm-body{flex:1;min-width:0}
.kp-cm-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin-bottom:6px}
.kp-cm-author{color:#ff9d2e;font-weight:700;font-size:14px}
.kp-cm-meta{color:#8e97ad;font-size:12px}
.kp-cm-date{color:#6f7890;font-size:12px;margin-left:auto}
.kp-cm-text{color:#d6dcea;font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.kp-cm-text p{margin:0 0 6px}
.kp-cm-foot{display:flex;align-items:center;gap:14px;margin-top:10px;font-size:13px;color:#8e97ad}
.kp-cm-rate .fa-thumbs-up{color:#3ddc84}
.kp-cm-rate .fa-thumbs-down{color:#ff6b6b}
.kp-cm-rate .likeit-num{color:#d6dcea;margin:0 6px}
.kp-cm-actions{margin-left:auto;display:flex;gap:14px}
.kp-cm-actions a,.kp-cm-actions span{color:#9fc4ff;cursor:pointer;text-decoration:none}
.kp-cm-actions a:hover{color:#fff}
.kp-cm-complaint{color:#ff6b6b}
@media only screen and (max-width:600px){ .kp-comment{flex-direction:column} .kp-cm-date{margin-left:0} .kp-cm-actions{margin-left:0} }

/* комментарии: текст и шапка выровнены по левому краю, номер строки скрыт */
#dle-ajax-comments,#dle-ajax-comments *{text-align:left}
#dle-ajax-comments ol,#dle-ajax-comments ol li{list-style:none!important;padding-left:0!important;margin-left:0!important}
.kp-comment{text-align:left!important}
.kp-cm-date{text-align:right}
.kp-cm-actions{text-align:right}

/* страница фильма: без лишних линий сверху, отступы слева и справа как у остальных блоков */
body.showfull .speedbar-block hr,body.showfull .speedbar-block{border:0!important;box-shadow:none!important}
body.showfull .speedbar-block hr{display:none!important}
body.showfull .column-right-border,body.showfull .column-right-border *{border-top:0!important;box-shadow:none!important}
body.showfull .demo,body.showfull #dle-content.grid{border:0!important}
@media only screen and (min-width:1000px){
  body.showfull .column-right{padding:0 22px 0 22px!important;box-sizing:border-box}
  body.showfull .column-right .full-block{padding:0 4px!important}
  body.showfull .column-right .reviews-block,body.showfull .column-right .player-block,body.showfull .column-right .related-news-block{margin-left:0!important;margin-right:0!important}
}

/* страница фильма: убраны три горизонтальные линии над описанием */
body.showfull .column-right hr,body.showfull .column-right .block_line,body.showfull .full-block{border-top:0!important}
body.showfull .column-right hr,body.showfull .column-right .block_line{display:none!important}

/* страница фильма (определяется по блоку .full-block, класс body здесь общий): убираем линии над описанием */
.column-right:has(.full-block) hr,.column-right:has(.full-block) .block_line,.speedbar-block hr{display:none!important}
.column-right:has(.full-block) .full-block{border-top:0!important}

/* главная: строки «Сериалы» / «Мультсериалы» — скруглённые карточки с отступом от края */
@media only screen and (min-width:1000px){
  .prem{border-radius:12px!important;margin:10px 18px!important;padding:10px!important;background:#141a28!important;border:1px solid rgba(255,255,255,.06)!important;box-sizing:border-box;overflow:hidden}
  .prem .poster-box img{border-radius:8px}
}

/* главная: строки «Сериалы» — отступ слева 24px, правый край по границе колонки */
@media only screen and (min-width:1000px){
  #dle-content.grid > .kp-prem{float:none!important;flex:0 0 calc(100% - 24px)!important;width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;margin:10px 0 10px 24px!important;position:relative!important;left:0!important;box-sizing:border-box!important;overflow:visible!important}
}

/* фон кинозала под шапкой: позиция ниже закреплённой шапки, картинка не уходит под неё */
.wrapper{background-position:center 56px!important}
@media only screen and (max-width:948px){ .wrapper{background-position:center 0!important} }
