/* ==========================================
   MALOSOLKA — TORRENT UI
   Compact classic design
   ========================================== */

.torrent-ui {
    --tor-bg: #080d12;
    --tor-surface: #0d151c;
    --tor-line: #1a2932;
    --tor-green: #36c76a;
    --tor-muted: #9baab8;

    width: 100%;
    min-width: 0;
    margin: 24px 0;

    color: #f5f8fc;
    font: 13px/1.5 Arial, Helvetica, sans-serif;
}

.torrent-ui *,
.torrent-ui *::before,
.torrent-ui *::after {
    box-sizing: border-box;
}

/* Исходная таблица остаётся для фильтрации */

#restable_sort.torrent-ui__source {
    display: none !important;
}

/* ==========================================
   HEADER
   ========================================== */

.torrent-ui__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.torrent-ui__heading h2 {
    margin: 0;
    color: #fff;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
}

.torrent-ui__symbol {
    color: var(--tor-green);
    font-size: 24px;
}

.torrent-ui__total {
    margin-left: auto;
    color: var(--tor-muted);
    font-size: 12px;
    white-space: nowrap;
}

/* ==========================================
   FILTERS
   ========================================== */

.torrent-ui__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.torrent-ui__filter {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 9px;

    padding: 8px 13px;

    background: #121b24;
    color: #a9bac8;

    font: inherit;
    font-size: 12px;

    cursor: pointer;
    transition: background .15s, color .15s;
}

.torrent-ui__filter:hover {
    color: #fff;
    border-color: #2a404a;
}

.torrent-ui__filter.is-active {
    background: var(--tor-green);
    color: #04100a;
    font-weight: 700;
}

/* ==========================================
   SORT LABEL
   ========================================== */

.torrent-ui__sort {
    margin: 0 3px 10px;
    color: var(--tor-muted);
    text-align: right;
    font-size: 12px;
}

/* ==========================================
   LIST
   ========================================== */

.torrent-ui__list {
    overflow: hidden;

    background: var(--tor-bg);
    border: 1px solid var(--tor-line);
    border-radius: 13px;
}

.torrent-ui__row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        172px;

    align-items: center;
    column-gap: 14px;
    row-gap: 0;

    min-height: 56px;
    padding: 11px 16px;

    border-bottom: 1px solid #142029;
}

.torrent-ui__row:last-child {
    border-bottom: 0;
}

.torrent-ui__row:hover {
    background: #101b20;
}

.torrent-ui__row.has-ad {
    background: #171714;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */

.torrent-ui__main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.torrent-ui__description {
    min-width: 0;
    flex: 1;
}

.torrent-ui__name {
    color: #f0f4fa;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Основное название + источник + качество */

.torrent-ui__release {
    color: #f0f4fa;
    font-weight: 600;
}

/* Перевод — второстепенная информация */

.torrent-ui__translation {
    display: inline;
    margin-left: 9px;

    color: #9baab8;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

/* ==========================================
   QUALITY BADGES
   ========================================== */

.torrent-ui__quality {
    flex: 0 0 70px;

    padding: 4px 5px;

    border: 1px solid #285443;
    border-radius: 9px;

    background: #06331f;
    color: #3ce38c;

    text-align: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.torrent-ui__quality--4k {
    color: #cf92ff;
    background: #27123e;
    border-color: #7135a5;
}

.torrent-ui__quality--720p,
.torrent-ui__quality--480p,
.torrent-ui__quality--other {
    color: #b5c2d0;
    background: #1c222b;
    border-color: #3c4550;
}

/* ==========================================
   SEASONS
   ========================================== */

.torrent-ui__season {
    display: inline-block;

    margin-left: 7px;
    padding: 2px 7px;

    border-radius: 5px;

    background: #17283a;
    color: #b9d6f7;

    font-size: 11px;
    font-weight: 600;
    white-space: normal;
}

/* ==========================================
   AD MARKER
   ========================================== */

.torrent-ui__ad {
    display: inline-block;

    margin-left: 7px;
    padding: 2px 7px;

    border-radius: 5px;

    background: #3a2019;
    color: #ffae73;

    font-size: 11px;
    font-weight: 700;
}

/* ==========================================
   STATS
   ========================================== */

.torrent-ui__stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;

    white-space: nowrap;
    font-size: 12px;
}

.torrent-ui__size {
    color: #afbfcd;
}

.torrent-ui__seeds {
    color: #45BA50;
}

.torrent-ui__peers {
    color: #96a6b6;
}

/* ==========================================
   ACTIONS
   ========================================== */

.torrent-ui__actions {
    display: grid;
    grid-template-columns: 94px 30px 28px;

    align-items: center;
    justify-items: center;

    gap: 8px;
    width: 172px;
    min-width: 172px;
}

.torrent-ui__actions a {
    text-decoration: none;
}

/* Download */

.torrent-ui__download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    width: 94px;
    height: 34px;
    padding: 0 7px;

    border-radius: 9px;

    background: #37bf58;
    color: #041308 !important;

    font-size: 12px;
    font-weight: 700;
    line-height: 1;

    white-space: nowrap;
}

.torrent-ui__download:hover {
    background: #4ee071;
}

/* Magnet */

.torrent-ui__magnet,
.torrent-ui__action-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 34px;
    min-width: 30px;
}

.torrent-ui__magnet {
    cursor: pointer;
}

.torrent-ui__magnet-emoji {
    display: block;
    font-size: 20px;
    line-height: 1;

    transition: transform .18s ease;
}

.torrent-ui__magnet:hover .torrent-ui__magnet-emoji {
    transform: scale(1.15);
}

/* Сохраняем место, если ссылки нет */

.torrent-ui__action-placeholder {
    visibility: hidden;
    pointer-events: none;
}

/* SVG */

.torrent-ui__icon {
    display: block;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* Details toggle */

.torrent-ui__details-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 34px;
    padding: 0;

    border: 0;
    background: transparent;
    color: #9aabb9;

    cursor: pointer;
}

.torrent-ui__details-toggle:hover {
    color: #fff;
}

.torrent-ui__details-toggle .torrent-ui__icon {
    transition: transform .18s ease;
}

.torrent-ui__details-toggle[aria-expanded="true"]
.torrent-ui__icon {
    transform: rotate(180deg);
}

/* ==========================================
   EXPANDABLE DETAILS
   ========================================== */

.torrent-ui__details {
    grid-column: 1 / -1;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 9px 22px;

    margin-top: 12px;
    padding: 12px 0 4px;

    border-top: 1px solid #1a2932;
}

.torrent-ui__details[hidden] {
    display: none !important;
}

.torrent-ui__detail {
    min-width: 0;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.torrent-ui__detail span {
    color: #9baab8;
    margin-right: 7px;
}

.torrent-ui__detail strong {
    color: #e9f0f5;
    font-weight: 500;
}

.torrent-ui__detail:first-child {
    grid-column: 1 / -1;
}

/* ==========================================
   SHOW MORE
   ========================================== */

.torrent-ui__more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    padding: 13px;

    border: 1px solid var(--tor-line);
    border-radius: 0 0 12px 12px;

    background: transparent;
    color: #aebdcc;

    font: inherit;
    font-size: 13px;

    cursor: pointer;
}

.torrent-ui__more:hover {
    color: #fff;
    background: #111b22;
}

.torrent-ui__more[hidden] {
    display: none;
}

.torrent-ui__more .torrent-ui__icon {
    transition: transform .2s ease;
}

.torrent-ui__more.is-expanded .torrent-ui__icon {
    transform: rotate(180deg);
}

/* ==========================================
   EMPTY
   ========================================== */

.torrent-ui__empty {
    padding: 25px;
    color: var(--tor-muted);
    text-align: center;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {

    .torrent-ui__row {
        grid-template-columns: minmax(0, 1fr) 172px;
        row-gap: 8px;
    }

    .torrent-ui__stats {
        grid-column: 1;
        justify-content: flex-start;
        padding-left: 82px;
    }

    .torrent-ui__actions {
        grid-column: 2;
        grid-row: 1 / 3;
    }

    .torrent-ui__details {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {

    .torrent-ui__heading h2 {
        font-size: 20px;
    }

    .torrent-ui__row {
        grid-template-columns: minmax(0, 1fr);
        padding: 12px;
    }

    .torrent-ui__main {
        gap: 8px;
    }

    .torrent-ui__quality {
        flex-basis: 65px;
    }

    .torrent-ui__stats {
        grid-column: 1;
        padding-left: 0;
    }

    .torrent-ui__actions {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
    }

    .torrent-ui__details {
        grid-column: 1;
    }

    .torrent-ui__translation {
        margin-left: 5px;
    }
}
/* ==========================================
   MALOSOLKA CLASSIC TABLE DESIGN
   ========================================== */

.torrent-ui {
    --tor-bg: #ffffff;
    --tor-surface: #ffffff;
    --tor-line: #cccccc;
    --tor-green: #81b752;
    --tor-muted: #777777;

    color: #333333;
    font: 12px/1.4 Arial, Helvetica, sans-serif;
}

/* Заголовок */

.torrent-ui__heading h2 {
    color: #333333;
    font-size: 20px;
}

.torrent-ui__symbol {
    color: #81b752;
}

.torrent-ui__total,
.torrent-ui__sort {
    color: #777777;
}

/* Фильтры */

.torrent-ui__filter {
    background: #ebebeb;
    color: #666666;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    font-size: 12px;
    padding: 6px 11px;
}

.torrent-ui__filter:hover {
    background: #dce9d0;
    color: #333333;
}

.torrent-ui__filter.is-active {
    background: #81b752;
    border-color: #81b752;
    color: #ffffff;
}

/* Таблица */

.torrent-ui__list {
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    overflow: hidden;
}

.torrent-ui__row {
    background: #ffffff;
    border-bottom: 1px solid #cccccc;

    min-height: 46px;
    padding: 6px;

    column-gap: 12px;
}

.torrent-ui__row:nth-child(even) {
    background: #f7f7f7;
}

.torrent-ui__row:hover {
    background: #e7e7e7;
}

.torrent-ui__row.has-ad {
    background: #fff8e8;
}

/* Названия */

.torrent-ui__name,
.torrent-ui__release {
    color: #222222;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.torrent-ui__translation {
    color: #777777;
    font-size: 11px;
    font-weight: 400;
}

/* Качество */

.torrent-ui__quality {
    flex-basis: 58px;
    padding: 3px 4px;

    border-radius: 3px;
    border: 1px solid #b9d5a8;

    background: #e9f5e3;
    color: #45842b;

    font-size: 11px;
}

.torrent-ui__quality--4k {
    background: #f2e9fa;
    color: #7e39a6;
    border-color: #d6b7ed;
}

.torrent-ui__quality--720p,
.torrent-ui__quality--480p,
.torrent-ui__quality--other {
    background: #eeeeee;
    color: #666666;
    border-color: #cccccc;
}

/* Статистика */

.torrent-ui__stats {
    gap: 12px;
    font-size: 12px;
}

.torrent-ui__size {
    color: #333333;
}



/* Скачать */

.torrent-ui__download {
    background: linear-gradient(
        to bottom,
        #96ca6d,
        #70a844
    );

    border: 1px solid #609c35;
    border-radius: 4px;

    color: #ffffff !important;
    font-size: 12px;

    height: 30px;
}

.torrent-ui__download:hover {
    background: #81b752;
}

/* Магнит */

.torrent-ui__magnet-emoji {
    font-size: 17px;
}

/* Раскрытие */

.torrent-ui__details-toggle {
    color: #777777;
}

.torrent-ui__details-toggle:hover {
    color: #333333;
}

.torrent-ui__details {
    border-top: 1px solid #cccccc;
}

.torrent-ui__detail span {
    color: #777777;
}

.torrent-ui__detail strong {
    color: #333333;
}

/* Сезоны */

.torrent-ui__season {
    background: #edf2f8;
    color: #46688a;
    border-radius: 3px;
}

/* Реклама */

.torrent-ui__ad {
    background: #fff0dc;
    color: #b56b16;
}

/* Показать ещё */

.torrent-ui__more {
    background: #f7f7f7;
    color: #444444;

    border: 1px solid #cccccc;
    border-radius: 0 0 4px 4px;

    padding: 10px;
    font-size: 12px;
}

.torrent-ui__more:hover {
    background: #e7e7e7;
    color: #222222;
}

.torrent-ui__empty {
    color: #777777;
}