/* ============================================================
   TorrentFilms — основной CSS темы
   Дизайн-токены: тёмная шапка / светлый контент / красный акцент.
   Без webfonts — только системные шрифты для скорости.
   ============================================================ */

:root {
    /* Палитра */
    --tf-bg:          #f4f5f8;
    --tf-card:        #ffffff;
    --tf-ink:        #14171f;
    --tf-ink-soft:   #5b6376;
    --tf-ink-mute:   #98a0b0;
    --tf-border:     #e6e8ee;
    --tf-border-soft:#eef0f5;

    --tf-header-bg:  #0d1421;
    --tf-header-bg2: #131c2e;
    --tf-header-ink: #e8ecf3;
    --tf-header-mute:#9aa3b3;

    --tf-accent:     #e63946;     /* CTA-акцент (hover, активный пункт меню) */
    --tf-accent-d:   #c12130;
    --tf-go:         #1ea05a;     /* Зелёный — кнопка скачать .torrent */
    --tf-go-d:       #178a4d;
    --tf-magnet:     #d97706;     /* Оранжевый — magnet */

    --tf-rating-kp:  #ff6b00;     /* Оранжевый — KP */
    --tf-rating-im:  #f5c518;     /* Жёлтый — IMDb */
    --tf-rating-lo:  #c14444;

    /* Радиусы / тени */
    --tf-r-sm: 6px;
    --tf-r:    10px;
    --tf-r-lg: 14px;
    --tf-sh:   0 1px 2px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.06);
    --tf-sh-hi:0 4px 8px rgba(15,23,42,.06), 0 10px 28px rgba(15,23,42,.10);

    /* Сетка */
    --tf-w:  1240px;
    --tf-gap:24px;

    /* Шрифты */
    --tf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Сброс / база ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--tf-bg);
    color: var(--tf-ink);
    font-family: var(--tf-font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a {
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}
a:hover { color: var(--tf-accent); }
button { font-family: inherit; cursor: pointer; }

.tf-container { max-width: var(--tf-w); margin: 0 auto; padding: 0 18px; }
.tf-main      { padding: 22px 0 60px; }

.tf-skip {
    position:absolute; left:-9999px; top:-9999px;
}
.tf-skip:focus { left:8px; top:8px; background:#fff; padding:8px 12px; z-index:9999; }

/* ── Шапка ─────────────────────────────────────────────────── */
.tf-header {
    background: linear-gradient(180deg, var(--tf-header-bg) 0%, var(--tf-header-bg2) 100%);
    color: var(--tf-header-ink);
    position: sticky;
    top: 0;
    z-index: 80;
    box-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.tf-header__inner {
    max-width: var(--tf-w);
    margin: 0 auto;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
}
.tf-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tf-header-ink);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .2px;
}
.tf-logo:hover { color: #fff; }
.tf-logo__mark {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--tf-accent) 0%, #b8243a 100%);
    position: relative;
    flex: none;
}
.tf-logo__mark::after {
    content:"";
    position:absolute; inset:6px;
    border-radius: 50%;
    background: #fff2;
    box-shadow: inset 0 0 0 2px #fff5;
}
.tf-logo__text { white-space: nowrap; }

.tf-nav__list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 18px;
}
.tf-nav__list a {
    color: var(--tf-header-mute);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
}
.tf-nav__list a:hover { color: #fff; }
.tf-nav__list .current-cat > a,
.tf-nav__list .current-menu-item > a { color: #fff; }
.tf-nav__list .current-cat > a::after,
.tf-nav__list .current-menu-item > a::after {
    content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px;
    background: var(--tf-accent); border-radius:1px;
}

.tf-search {
    display: flex;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    padding: 4px;
    width: 320px;
    max-width: 100%;
    transition: background .15s ease, border-color .15s ease;
}
.tf-search:focus-within {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.2);
}
.tf-search input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--tf-header-ink);
    padding: 6px 12px;
    font-size: 14px;
}
.tf-search input::placeholder { color: var(--tf-header-mute); }
.tf-search button {
    background: var(--tf-accent);
    color: #fff;
    border: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, transform .15s ease;
}
.tf-search button:hover { background: var(--tf-accent-d); transform: scale(1.05); }

.tf-burger { display:none; }

/* ── Хлебные крошки ────────────────────────────────────────── */
.tf-crumbs {
    color: var(--tf-ink-soft);
    font-size: 13px;
    margin: 0 0 18px;
}
.tf-crumbs a { color: var(--tf-ink-soft); }
.tf-crumbs a:hover { color: var(--tf-accent); }
.tf-crumbs span { color: var(--tf-ink); font-weight: 500; }

/* ── Заголовки страниц ────────────────────────────────────── */
.tf-page-title {
    font-size: 26px;
    font-weight: 700;
    margin: 4px 0 18px;
    letter-spacing: -.2px;
}

.tf-empty {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-r);
    padding: 28px;
    text-align: center;
    color: var(--tf-ink-soft);
}

/* ── Карточка фильма ──────────────────────────────────────── */
.tf-card {
    display: block;
    background: var(--tf-card);
    border-radius: var(--tf-r);
    overflow: hidden;
    box-shadow: var(--tf-sh);
    transition: transform .18s ease, box-shadow .18s ease;
}
.tf-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--tf-sh-hi);
}
.tf-card:hover .tf-card__title { color: var(--tf-accent); }
.tf-card__poster {
    position: relative;
    aspect-ratio: 2 / 3;
    background: #e9ebf0;
    overflow: hidden;
}
.tf-card__img,
.tf-card__poster img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.tf-card:hover .tf-card__img { transform: scale(1.04); }
.tf-card__noposter {
    width: 100%; height: 100%;
    background:
        linear-gradient(135deg, #e0e3eb 0%, #c7ccd8 100%);
}
.tf-card__rating {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(13,20,33,.88);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.tf-card__rating.is-hi { background: rgba(30,160,90,.95); }
.tf-card__rating.is-lo { background: rgba(193,68,68,.95); }

/* Бейдж «Сериал» — правый верхний угол постера (зеркально к рейтингу) */
.tf-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .6px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.tf-card__badge--series {
    background: rgba(8, 145, 178, .92); /* cyan-600 — отличается и от рейтинга, и от акцента */
}
.tf-card__meta {
    padding: 10px 12px 14px;
}
.tf-card__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--tf-ink);
    transition: color .15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Перенос длинных слов на узких карточках */
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}
.tf-card__year {
    margin-top: 4px;
    font-size: 12px;
    color: var(--tf-ink-mute);
}

/* ── Сетка карточек ────────────────────────────────────────── */
.tf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
    margin: 0 0 30px;
}

/* ── Секция и карусель ────────────────────────────────────── */
.tf-section { margin: 0 0 40px; }
.tf-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
}
.tf-section__title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.2px;
    margin: 0;
}
.tf-section__more {
    color: var(--tf-ink-soft);
    font-size: 13px;
    font-weight: 500;
}
.tf-section__more:hover { color: var(--tf-accent); }

.tf-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 1fr);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--tf-ink-mute) transparent;
}
.tf-carousel::-webkit-scrollbar { height: 6px; }
.tf-carousel::-webkit-scrollbar-thumb {
    background: var(--tf-ink-mute);
    border-radius: 3px;
}
.tf-carousel .tf-card {
    scroll-snap-align: start;
    min-width: 0;
}
@media (min-width: 640px) {
    .tf-carousel { grid-auto-columns: 200px; }
}

.tf-section--latest .tf-grid { margin-bottom: 18px; }

/* ── Страница фильма ──────────────────────────────────────── */
.tf-film {}
.tf-film__head {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    background: var(--tf-card);
    padding: 24px;
    border-radius: var(--tf-r-lg);
    box-shadow: var(--tf-sh);
    margin-bottom: 26px;
}
.tf-film__poster {
    border-radius: var(--tf-r);
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #eef0f5;
}
.tf-film__poster-img {
    width: 100%; height: 100%; object-fit: cover;
}
.tf-film__noposter {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #e0e3eb, #c7ccd8);
}
.tf-film__title {
    margin: 0 0 4px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.3px;
    line-height: 1.2;
}
.tf-film__orig {
    color: var(--tf-ink-mute);
    font-size: 16px;
    margin-bottom: 14px;
}
.tf-film__slogan {
    color: var(--tf-ink-soft);
    font-style: italic;
    font-size: 15px;
    padding: 8px 0 18px;
    border-bottom: 1px solid var(--tf-border-soft);
    margin-bottom: 18px;
}
.tf-film__facts {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
}
.tf-film__facts li {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    font-size: 14px;
}
.tf-film__facts li span {
    color: var(--tf-ink-mute);
}
.tf-film__facts li b {
    color: var(--tf-ink);
    font-weight: 500;
}

.tf-film__ratings {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.tf-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7f8fb;
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-r);
    padding: 8px 14px;
}
.tf-rating__label {
    font-size: 12px;
    color: var(--tf-ink-mute);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tf-rating__value {
    font-size: 18px;
    font-weight: 700;
}
.tf-rating--kp .tf-rating__value { color: var(--tf-rating-kp); }
.tf-rating--im .tf-rating__value { color: #c39400; }
.tf-rating.is-hi .tf-rating__value { color: var(--tf-go); }
.tf-rating.is-lo .tf-rating__value { color: var(--tf-rating-lo); }

/* ── Блоки фильма ──────────────────────────────────────────── */
.tf-block {
    background: var(--tf-card);
    border-radius: var(--tf-r-lg);
    padding: 22px 24px;
    margin-bottom: 22px;
    box-shadow: var(--tf-sh);
}
.tf-block__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    letter-spacing: -.2px;
}
.tf-film__text {
    color: var(--tf-ink);
    font-size: 15px;
    line-height: 1.7;
}
.tf-film__text p { margin: 0 0 12px; }

/* ===========================================================
   ТЕГИ-РУБРИКИ на странице фильма
   Карточный пилюлька-стиль с анимированной точкой-индикатором
   =========================================================== */
.tf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tf-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 14px;
    background: #f7f8fb;
    border: 1px solid var(--tf-border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--tf-ink);
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color       0.2s ease,
        border-color 0.2s ease,
        background  0.2s ease,
        transform   0.2s ease,
        box-shadow  0.2s ease;
}

.tf-tag::before {
    content: "";
    display: inline-block;
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tf-ink-mute);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tf-tag:hover {
    color: var(--tf-accent);
    border-color: var(--tf-accent);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 57, 70, 0.18);
}

.tf-tag:hover::before {
    background: var(--tf-accent);
    transform: scale(1.4);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.tf-tag:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(230, 57, 70, 0.18);
}

.tf-tag:focus-visible {
    outline: 2px solid var(--tf-accent);
    outline-offset: 2px;
}

/* Группировка визуально: блок «В рубриках» делаем заметнее */
.tf-film__cats .tf-block__title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tf-film__cats .tf-block__title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--tf-accent);
    border-radius: 2px;
}

/* ── Люди (режиссёр + актёры) ─────────────────────────────── */
.tf-people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}
.tf-person { text-align: center; }
.tf-person__photo {
    border-radius: 50%;
    overflow: hidden;
    width: 96px;
    height: 96px;
    margin: 0 auto 10px;
    background: #eef0f5;
}
.tf-person__photo img {
    width: 100%; height: 100%; object-fit: cover;
}
.tf-person__nophoto {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #e0e3eb, #c7ccd8);
}
.tf-person__name {
    font-weight: 600;
    font-size: 13.5px;
}
.tf-person__role {
    color: var(--tf-ink-mute);
    font-size: 12px;
    margin-top: 2px;
}
.tf-person--director .tf-person__photo {
    box-shadow: 0 0 0 2px var(--tf-accent), 0 0 0 4px var(--tf-card);
}

/* ── Пагинация WP ──────────────────────────────────────────── */
.pagination, .nav-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 30px 0 0;
}
.page-numbers {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-r-sm);
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tf-ink);
}
.page-numbers:hover { border-color: var(--tf-accent); color: var(--tf-accent); }
.page-numbers.current {
    background: var(--tf-accent);
    border-color: var(--tf-accent);
    color: #fff;
}
.page-numbers.dots { background:transparent; border:0; }

/* ── Поиск (страница результатов и 404) ───────────────────── */
.tf-search-results__count {
    color: var(--tf-ink-soft);
    margin: -10px 0 18px;
    font-size: 14px;
}
.tf-search-form {
    display: flex;
    gap: 8px;
    max-width: 500px;
    margin: 20px auto;
}
.tf-search-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-r);
    background: var(--tf-card);
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease;
}
.tf-search-form input:focus { border-color: var(--tf-accent); }
.tf-search-form button {
    background: var(--tf-accent);
    color: #fff;
    border: 0;
    padding: 10px 22px;
    border-radius: var(--tf-r);
    font-weight: 600;
}
.tf-search-form button:hover { background: var(--tf-accent-d); }

/* ── 404 ───────────────────────────────────────────────────── */
.tf-404 {
    text-align: center;
    background: var(--tf-card);
    border-radius: var(--tf-r-lg);
    padding: 60px 24px;
    box-shadow: var(--tf-sh);
}
.tf-404__code {
    font-size: 92px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--tf-accent), var(--tf-header-bg));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}
.tf-404__title { margin: 0 0 12px; font-size: 24px; }
.tf-404__home {
    display: inline-block;
    margin-top: 14px;
    color: var(--tf-accent);
    font-weight: 600;
}

/* ── Подвал ────────────────────────────────────────────────── */
.tf-footer {
    background: var(--tf-header-bg);
    color: var(--tf-header-mute);
    padding: 30px 0 22px;
    margin-top: 40px;
}
.tf-footer__row {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.tf-footer__brand strong { color: var(--tf-header-ink); display: block; font-size: 16px; margin-bottom: 4px; }
.tf-footer__brand p { margin: 0; font-size: 13px; }
.tf-footer__nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.tf-footer__nav a {
    color: var(--tf-header-mute);
    font-size: 14px;
}
.tf-footer__nav a:hover { color: #fff; }
.tf-footer__copy {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 16px;
    font-size: 12.5px;
    color: var(--tf-header-mute);
}

/* ============================================================
   ТАБЛИЦА ТОРРЕНТОВ
   ============================================================ */
.torrents-wrapper { margin: 0; }
.torrents-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--tf-r);
    overflow: hidden;
    font-size: 14px;
    background: #fbfcfe;
    border: 1px solid var(--tf-border);
}
.torrents-table thead th {
    background: var(--tf-header-bg);
    color: #e8ecf3;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.torrents-table thead th:hover { background: var(--tf-header-bg2); }
.torrents-table thead th .sort-icon {
    display: inline-block;
    margin-left: 4px;
    opacity: .45;
    font-size: 10px;
}
.torrents-table thead th[data-sort-direction] .sort-icon { opacity: 1; color: var(--tf-accent); }
.torrents-table tbody tr { transition: background .12s; }
.torrents-table tbody tr:nth-child(even) { background: #f7f8fb; }
.torrents-table tbody tr:hover { background: #f0f2f7; }
.torrents-table tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--tf-border-soft);
    vertical-align: middle;
    color: var(--tf-ink);
}
.torrents-table tbody tr:last-child td { border-bottom: 0; }

.quality-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--tf-r-sm);
    font-size: 12px;
    font-weight: 700;
    background: #e9ebf0;
    color: #4a5366;
}
.quality-badge.q-hd  { background: #dbeafe; color: #1d4ed8; }
.quality-badge.q-fhd { background: #fce7f3; color: #be185d; }
.quality-badge.q-4k  { background: #fef3c7; color: #b45309; }
.quality-badge.q-web { background: #dcfce7; color: #166534; }

.seeds-peers { white-space: nowrap; }
.seeds { color: var(--tf-go); font-weight: 700; }
.peers { color: #c14444; font-weight: 600; font-size: 12px; }

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--tf-r-sm);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    transition: all .15s;
    white-space: nowrap;
}
.dl-torrent {
    background: var(--tf-go);
    color: #fff !important;
}
.dl-torrent:hover {
    background: var(--tf-go-d);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30,160,90,.3);
    color: #fff !important;
}
.dl-magnet {
    background: var(--tf-magnet);
    color: #fff !important;
}
.dl-magnet:hover {
    background: #b85a04;
    transform: translateY(-1px);
    color: #fff !important;
}
.dl-none { color: var(--tf-ink-mute); }

.translation-cell { min-width: 160px; }
.translation-name { font-weight: 500; }

.extra-info {
    font-size: 11px;
    color: var(--tf-ink-mute);
    margin-top: 3px;
}
.extra-info span { margin-right: 8px; }
.size-cell { white-space: nowrap; font-weight: 500; }

.torrents-loader { text-align: center; padding: 30px 0; color: var(--tf-ink-mute); }
@keyframes torrents-spin { to { transform: rotate(360deg); } }
.torrents-loader svg { animation: torrents-spin 0.8s linear infinite; }

/* ── Мобильная адаптация ─────────────────────────────────── */
@media (max-width: 900px) {
    .tf-header__inner {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        padding: 12px 14px;
    }
    .tf-nav {
        position: fixed;
        inset: 64px 0 0 0;
        background: var(--tf-header-bg);
        padding: 20px;
        transform: translateX(100%);
        transition: transform .25s ease;
        z-index: 70;
    }
    .tf-nav.is-open { transform: translateX(0); }
    .tf-nav__list {
        flex-direction: column;
        gap: 4px;
    }
    .tf-nav__list a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,.05);
        font-size: 16px;
    }
    .tf-search { width: 200px; }
    .tf-burger {
        display: inline-flex;
        flex-direction: column;
        gap: 4px;
        background: transparent;
        border: 0;
        padding: 8px;
        width: 38px; height: 38px;
        justify-content: center;
        align-items: center;
    }
    .tf-burger span {
        display:block; width:20px; height:2px; background:#fff; border-radius:1px;
        transition: transform .2s, opacity .2s;
    }
    .tf-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .tf-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .tf-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .tf-film__head {
        grid-template-columns: 1fr;
        padding: 18px;
    }
    .tf-film__poster {
        max-width: 220px;
        margin: 0 auto;
    }
    .tf-film__title { font-size: 22px; }
    .tf-film__facts {
        grid-template-columns: 1fr;
    }
    .tf-film__facts li { grid-template-columns: 100px 1fr; }
    .tf-page-title { font-size: 22px; }
    .tf-section__title { font-size: 18px; }

    .tf-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .tf-carousel { grid-auto-columns: 140px; }

    .tf-block { padding: 16px; }
    .tf-block__title { font-size: 17px; margin-bottom: 12px; }

    .tf-person__photo { width: 76px; height: 76px; }

    .tf-tag {
        padding: 7px 14px 7px 12px;
        font-size: 12.5px;
    }
    .tf-tag::before { width: 5px; height: 5px; }
    .tf-tags { gap: 6px; }

    /* Таблица торрентов: карточный вид */
    .torrents-table { font-size: 13px; border-radius: var(--tf-r); border: 0; background: transparent; }
    .torrents-table thead { display: none; }
    .torrents-table tbody,
    .torrents-table tbody tr,
    .torrents-table tbody td { display: block; width: 100%; }
    .torrents-table tbody tr {
        margin-bottom: 10px;
        border-radius: var(--tf-r);
        box-shadow: var(--tf-sh);
        padding: 12px;
        background: var(--tf-card) !important;
    }
    .torrents-table tbody td { padding: 4px 0; border-bottom: 0; text-align: left; }
    .torrents-table tbody td:before {
        content: attr(data-label);
        display: inline-block;
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        color: var(--tf-ink-mute);
        min-width: 90px;
        margin-right: 8px;
    }
    .torrents-table tbody td:last-child { margin-top: 8px; text-align: center; }
    .torrents-table tbody td:last-child:before { display: none; }
    .dl-btn { padding: 8px 16px; font-size: 13px; width: 100%; justify-content: center; }
    .translation-cell { min-width: 0; }
}

@media (max-width: 480px) {
    .tf-search { display: none; }
    .tf-header__inner { grid-template-columns: 1fr auto; }
    .tf-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .tf-carousel { grid-auto-columns: 130px; }
    .tf-section__more { font-size: 12px; }
}

/* ── Уважаем prefers-reduced-motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}