@charset "utf-8";
/* CSS Document */
.torrents-zz {
    color:yellow;
    background-color:crimson;;
    font-size: 14px;
}


.music_cover {
    width: 53px;
    height: 46px;
    text-align: center;
    vertical-align: middle;
}
.music_cover img {
    width: 100%;
    height: 100%;
}

.torrent-hot-completed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.torrent-hot-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #ff6a1a;
    font-size: 12px;
    line-height: 1;
    vertical-align: middle;
    text-shadow: 0 0 2px rgba(255, 140, 0, 0.25);
    appearance: none;
    -webkit-appearance: none;
}

.torrent-front-filter-anchor {
    position: relative;
}

/*
 * 当前页筛选面板 —— 与高级搜索 (.torrent-search-box__advanced-panel / __hero) 完全同语言
 *
 * 配色 / 描边 / 投影 / 磨砂规格 100% 复刻，确保上下两块卡片放在一起时看不
 * 出差异；只有内部的字段组布局与高级搜索不同（5 列 × 2 行的扁平排布）。
 *
 *   外层卡片       ⇐ rgba(255,255,255,0.72) + blur(10px) saturate(1.08)
 *   细描边         ⇐ 1px rgba(220,227,236,0.82)  (= advanced hero 边)
 *   柔和冷灰蓝投影 ⇐ 0 8px 20px rgba(49,66,96,0.045) + 0 2px 6px rgba(49,66,96,0.025)
 *   分组分隔线     ⇐ rgba(220,227,236,0.55)      (= 同描边淡化版)
 */
.torrent-front-filter-box {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 30;
    display: none;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045), 0 2px 6px rgba(49, 66, 96, 0.025);
}

.torrent-front-filter-box.is-visible,
.torrent-front-filter-box.is-measuring {
    display: block;
}

.torrent-front-filter-box.is-measuring {
    visibility: hidden;
}

/*
 * 内层 <table class="searchbox torrent-front-filter-panel"> 整表复位：
 * 去掉 HTML 属性 border="1" / cellpadding="5" 留下的边框、间距；
 * 背景 / 描边 / 阴影 统一由 .torrent-front-filter-box 承担，这里保持透明。
 * 宽度 100% + border-box，对齐下方 #torrenttable 的左右边界。
 */
.torrent-front-filter-panel {
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
}

.torrent-front-filter-panel td,
.torrent-front-filter-panel td.rowfollow,
.torrent-front-filter-panel td.colhead {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.torrent-front-filter-panel td.rowfollow {
    padding: 0;
}

.torrent-front-filter-spacer-row td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

#torrent-front-filter-spacer {
    height: 0;
    overflow: hidden;
}

/* —— 顶部工具条（"当前页筛选"标签 + 命中数 + 重置按钮）—— */
body.page-torrents .torrent-front-filter-box td.colhead,
.torrent-front-filter-panel td.colhead {
    padding: 9px 16px 8px !important;
    background: rgba(255, 255, 255, 0.35) !important;
    box-shadow: inset 0 -1px 0 rgba(180, 170, 155, 0.28) !important;
    border-radius: 16px 16px 0 0;
    color: inherit;
}

.torrent-front-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* 顶部"当前页筛选"标题：去掉左侧色块，仅保留朴素文字 */
.torrent-front-filter-title {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-weight: 700;
    font-size: 12px;
    color: #6b5743;
    letter-spacing: 0.02em;
}

.torrent-front-filter-head-cell {
    position: relative;
}

.torrent-front-filter-head-link {
    display: inline-block;
}

.torrent-front-filter-toggle-anchor {
    margin-right: 0;
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.torrent-front-filter-toggle {
    justify-content: center;
}

.torrent-front-filter-toggle,
.torrent-front-filter-toggle:hover,
.torrent-front-filter-toggle.is-expanded {
    border: none;
    border-radius: 0;
    background: transparent;
}

.torrent-front-filter-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

/* 命中数气泡：柔米色软胶囊，与高级搜索 active-filter-chip 同族 */
.torrent-front-filter-result {
    font-size: 11px;
    color: #8a5518;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    border: 1px solid rgba(229, 214, 191, 0.75);
    line-height: 1.45;
}

/*
 * 字段标题：前置一条 3×12 的暖焦糖色块作为视觉锚点，
 * 替代以前的顶部"当前页筛选"色块定位 —— 现在色块跟着每个字段走，
 * 让标题 / 简介 / 评分 / 做种 / 下载 / 完成人数 / 大小 / 发布时间 / 进度
 * 这 9 个字段的标头形成整齐的一列"红条"视觉韵律。
 */
.torrent-front-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    padding-left: 0;
    font-size: 11px;
    color: #7b6c58;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.torrent-front-filter-label::before {
    content: "";
    display: inline-block;
    flex: none;
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: linear-gradient(180deg, #e3a06c 0%, #c78340 100%);
}

.torrent-front-filter-body-cell {
    padding: 10px 16px 12px !important;
    background: transparent !important;
}

/*
 * 字段网格：5 列 × 2 行，所有单元格上下成对、宽度均匀对齐。
 *
 *   col   | col1 | col2     | col3      | col4       | col5
 *   上行  | text | ratings  | seeders   | completed  | size
 *   下行  | text | ratings  | leechers  | progress   | time
 *
 * 设计要点 ——
 *   1. 列间距放大到 26px，中间 3 个数字列（seeders/completed/size 及下方）
 *      即使输入框被限宽到 ~80px，依然有明显的列间留白，视觉呼吸感更舒展。
 *   2. 每列都使用 `minmax(0, 1fr)` 均分网格可用空间；真正限制输入框宽度由
 *      .torrent-front-filter-range 内部的 grid 控制，详见下方规则。
 *   3. 文本列 1.5fr、评分列 0.95fr、time 列 1.3fr；数字字段 1fr 均分。
 */
.torrent-front-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.5fr)         /* text      */
        minmax(200px, 1fr)       /* ratings   —— 评分行含图标(~22px)+区间(80+14+80),
                                                  最小锁 200px 避免 rating-row 被挤压 */
        minmax(0, 1fr)           /* seeders / leechers */
        minmax(0, 1fr)           /* completed / progress */
        minmax(0, 1.3fr);        /* size      / time (time 行横向较长) */
    grid-template-areas:
        "text ratings seeders completed size"
        "text ratings leechers progress time";
    gap: 10px 26px;
}

.torrent-front-filter-field-time {
    grid-area: time;
}

.torrent-front-filter-field-size {
    grid-area: size;
}

.torrent-front-filter-field-progress {
    grid-area: progress;
}

.torrent-front-filter-field-completed {
    grid-area: completed;
}

.torrent-front-filter-field-seeders {
    grid-area: seeders;
}

.torrent-front-filter-field-leechers {
    grid-area: leechers;
}

.torrent-front-filter-field {
    box-sizing: border-box;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.torrent-front-filter-field-text {
    grid-area: text;
    display: grid;
    align-content: start;
    gap: 8px;
}

.torrent-front-filter-text-section + .torrent-front-filter-text-section {
    padding-top: 0;
}

.torrent-front-filter-field-ratings {
    grid-area: ratings;
    display: grid;
    align-content: start;
    gap: 8px;
}

.torrent-front-filter-ratings-section + .torrent-front-filter-ratings-section {
    padding-top: 0;
}

.torrent-front-filter-ratings-group {
    display: grid;
    gap: 4px;
}

.torrent-front-filter-rating-row {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 6px;
}

.torrent-front-filter-rating-name {
    font-size: 11px;
    color: #6e5a45;
    font-weight: 600;
    white-space: nowrap;
}

/*
 * 数字区间 (min - max) 布局：两个输入框各限宽 80px，中间 14px 的短横线。
 * 总宽控制在 ~174px，多数情况下填不满 grid 列（`1fr`）—— 多余宽度在列
 * 右侧自然留白，与列间距一起形成视觉呼吸，也让上下两行输入框严格对齐。
 */
.torrent-front-filter-range {
    display: grid;
    grid-template-columns: minmax(0, 80px) 14px minmax(0, 80px);
    align-items: center;
    justify-content: start;
    gap: 4px;
    white-space: nowrap;
}

.torrent-front-filter-text-group {
    display: grid;
    gap: 5px;
}

.torrent-front-filter-text-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

/* +/- 前缀：中性灰描边 chip，不抢色；hover 同色族加深一档 */
.torrent-front-filter-text-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(180, 170, 155, 0.45);
    color: #8a7258;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: help;
}

.torrent-front-filter-text-row:last-child .torrent-front-filter-text-prefix {
    border-color: rgba(198, 146, 140, 0.45);
    color: #a1685e;
}

.torrent-front-filter-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #a79b89;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

/*
 * 输入框：与高级搜索 #torrent-search-advanced .torrent-search-box__field-input
 * 同款 —— 冷灰蓝描边 `#ddd4c8`? 不，高级搜索里是 `#ddd4c8` 暖米色边 +
 * `#cf994e` 焦糖焦点环。保持一致即可。
 */
.torrent-front-filter-input,
.torrent-front-filter-count,
.torrent-front-filter-time-input,
.torrent-front-filter-text-input {
    box-sizing: border-box;
    height: 28px;
    padding: 0 10px;
    border: 1px solid #ddd4c8;
    border-radius: 8px;
    background: #fff;
    color: #4d4030;
    font-size: 11.5px;
    line-height: 1.2;
    outline: none;
    vertical-align: middle;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.torrent-front-filter-input:hover,
.torrent-front-filter-count:hover,
.torrent-front-filter-time-input:hover,
.torrent-front-filter-text-input:hover {
    border-color: #d2b083;
}

.torrent-front-filter-input:focus,
.torrent-front-filter-count:focus,
.torrent-front-filter-time-input:focus,
.torrent-front-filter-text-input:focus {
    border-color: #cf994e;
    box-shadow: 0 0 0 3px rgba(229, 164, 79, 0.12);
    background: #fff;
}

.torrent-front-filter-input::placeholder,
.torrent-front-filter-count::placeholder,
.torrent-front-filter-time-input::placeholder,
.torrent-front-filter-text-input::placeholder {
    color: #c6b9a7;
}

.torrent-front-filter-input {
    width: 100%;
    min-width: 0;
}

.torrent-front-filter-text-input {
    width: 100%;
}

.torrent-front-filter-count {
    width: 100%;
    min-width: 0;
}

.torrent-front-filter-time-range {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 0;
    white-space: nowrap;
}

/* time 字段内部：min / max 两行上下排列，不再横向展开；
 * 这样 time 字段能挤进一个普通数字列的宽度，布局整齐。 */
.torrent-front-filter-time-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 4px;
    justify-content: start;
    white-space: nowrap;
}

.torrent-front-filter-time-prefix {
    display: inline-block;
    min-width: 22px;
    padding-right: 3px;
    font-size: 11px;
    color: #8d7a65;
    font-weight: 600;
}

.torrent-front-filter-time-input {
    width: 38px;
    height: 26px;
    padding: 0 2px;
    text-align: center;
    font-size: 11px;
    appearance: textfield;
    -moz-appearance: textfield;
}

.torrent-front-filter-time-input::-webkit-outer-spin-button,
.torrent-front-filter-time-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.torrent-front-filter-time-unit {
    color: #a0907a;
    font-size: 10.5px;
    margin: 0 2px 0 1px;
}

.torrent-front-filter-result-cell {
    white-space: nowrap;
}

/* 重置按钮：同高级搜索 active-filters-clear 的白底圆角胶囊风 */
.torrent-front-filter-reset-inline.btn {
    flex: none;
    min-width: 0;
    height: 26px;
    padding: 0 12px;
    border: 1px solid #e3dbd0;
    border-radius: 999px;
    background: #fff;
    color: #6f5a43;
    font-size: 11px;
    font-weight: 600;
    line-height: 24px;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.torrent-front-filter-reset-inline.btn:hover,
.torrent-front-filter-reset-inline.btn:focus {
    border-color: #cfb188;
    background: #fff3e1;
    color: #8a5518;
    outline: none;
}

.torrent-front-filter-empty {
    margin: 10px 0 12px;
    padding: 10px 14px;
    border: 1px solid rgba(217, 179, 108, 0.55);
    border-radius: 10px;
    background: #fff8e6;
    color: #8a5a00;
    font-size: 12px;
}

.torrent-search-box {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

/*
 * 横幅宽度由 include/functions.php 的内联 <style> (--site-shell-side-gap)
 * 与 styles/custom.css 统一管理，这里不再覆盖，避免规则不一致导致左右边线
 * 与 mainouter / nav / userbar 不对齐。
 */

.site-head.site-head--with-banner .site-hero-banner-cell {
    width: 100%;
    padding: 0;
    white-space: normal;
}

.site-head.site-head--with-banner .site-hero-banner,
.site-head.site-head--with-banner .site-hero-banner__swiper,
.site-head.site-head--with-banner .site-hero-banner__slide,
.site-head.site-head--with-banner .site-hero-banner__image-link {
    display: block;
    width: 100% !important;
    max-width: none;
}

.torrent-search-box__body-cell {
    padding: 0 0 14px;
    background: transparent;
}

.torrent-search-box__stack {
    display: grid;
    gap: 12px;
    position: relative;
    z-index: 20;
}

.torrent-search-box__hero {
    position: relative;
    z-index: 3;
    display: grid;
    gap: 10px;
    padding: 10px 12px 12px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045), 0 2px 6px rgba(49, 66, 96, 0.025);
}

.torrent-search-box__search-main {
    --torrent-search-main-action-width: 36px;
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 800px;
    justify-self: center;
    border: 1px solid rgba(220, 227, 236, 0.88);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 6px 14px rgba(49, 66, 96, 0.035);
}

.torrent-search-box__search-main:focus-within {
    border-color: rgba(208, 186, 152, 0.92);
    box-shadow: 0 0 0 3px rgba(229, 164, 79, 0.08), 0 6px 14px rgba(49, 66, 96, 0.04);
}

.torrent-search-box__keyword-wrap {
    position: relative;
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
}

.torrent-search-box__keyword-area {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    z-index: 1;
}

.torrent-search-box__keyword-submit {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9f8765;
    cursor: pointer;
    z-index: 2;
    transition: color 0.16s ease, opacity 0.16s ease;
}

.torrent-search-box__keyword-submit:hover,
.torrent-search-box__keyword-submit:focus {
    outline: none;
    color: #7a572d;
}

.torrent-search-box__keyword-submit[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.torrent-search-box__search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
}

.torrent-search-box__keyword-input,
.torrent-search-box__field-input {
    box-sizing: border-box;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd4c8;
    border-radius: 6px;
    background: #fff;
    color: #4d4030;
    font-size: 12px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.torrent-search-box__keyword-input {
    height: 36px;
    padding-left: 36px;
    padding-right: 36px;
    border: 0;
    border-radius: 10px 0 0 10px;
    background: transparent;
    box-shadow: none;
}

.torrent-search-box__keyword-clear {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b7ab9c;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%);
    transition: color 0.16s ease, opacity 0.16s ease;
    z-index: 2;
}

.torrent-search-box__keyword-clear.is-visible {
    opacity: 1;
    visibility: visible;
}

.torrent-search-box__keyword-clear:hover,
.torrent-search-box__keyword-clear:focus {
    outline: none;
    color: #8f6c42;
}

.torrent-search-box__keyword-clear-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
}

.torrent-search-box__keyword-input:focus,
.torrent-search-box__field-input:focus,
#torrent-search-form .torrent-meta-multiselect__toggle:focus,
#torrent-search-form .torrent-meta-multiselect__toggle:focus-within,
#torrent-search-form .torrent-meta-multiselect__search-input:focus {
    border-color: #cf994e;
    box-shadow: 0 0 0 3px rgba(229, 164, 79, 0.12);
    background: #fff;
}

.torrent-search-box__keyword-input::placeholder,
.torrent-search-box__field-input::placeholder {
    color: #b6aa9b;
}

.torrent-search-box__search-main .torrent-search-box__keyword-input:focus {
    border-color: transparent;
    box-shadow: none;
    background: transparent;
}

.torrent-search-box__search-settings {
    position: relative;
    flex: none;
    margin-left: 0;
    z-index: 2;
}

.torrent-search-box__search-settings-toggle {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 36px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #978878;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    box-shadow: inset 1px 0 0 rgba(221, 227, 235, 0.95);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.torrent-search-box__search-settings-toggle:hover,
.torrent-search-box__search-settings-toggle:focus {
    outline: none;
    border-color: transparent;
    background: rgba(244, 247, 251, 0.34);
    color: #7f6c56;
    box-shadow: inset 1px 0 0 rgba(221, 227, 235, 0.95);
}

.torrent-search-box__search-settings.is-open .torrent-search-box__search-settings-toggle {
    border-color: transparent;
    background: rgba(240, 245, 251, 0.5);
    color: #78654f;
    box-shadow: inset 1px 0 0 rgba(221, 227, 235, 0.95);
}

.torrent-search-box__search-settings.is-active .torrent-search-box__search-settings-toggle {
    border-color: transparent;
    background: rgba(245, 248, 252, 0.24);
}

.torrent-search-box__search-settings-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    font-size: 11px;
    line-height: 1;
}

.torrent-search-box__search-settings-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #d18a35;
    box-shadow: 0 0 0 3px rgba(209, 138, 53, 0.12);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.torrent-search-box__search-settings.is-active .torrent-search-box__search-settings-dot {
    opacity: 1;
    transform: scale(1);
}

.torrent-search-box__search-settings-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 272px;
    padding: 12px 14px;
    border: 1px solid rgba(214, 222, 232, 0.96);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(252, 250, 247, 0.985) 100%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 14px 32px rgba(49, 66, 96, 0.08), 0 4px 10px rgba(49, 66, 96, 0.04);
    z-index: 40;
}

.torrent-search-box__search-settings-panel[hidden] {
    display: none;
}

.torrent-search-box__search-settings-fields {
    display: grid;
    gap: 10px;
}

.torrent-search-box__search-settings-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.torrent-search-box__search-settings-label {
    padding-left: 2px;
    color: #7b6750;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.torrent-search-box__search-settings-select-wrap {
    width: 100%;
    min-width: 0;
}

.torrent-search-box__search-settings-panel .torrent-meta-multiselect {
    width: 100% !important;
}

.torrent-search-box__search-settings-panel .torrent-meta-multiselect__toggle {
    min-height: 34px;
    padding: 4px 30px 4px 10px;
    border: 1px solid #e1dbd1;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: #725d44;
    font-size: 11px;
}

.torrent-search-box__search-settings-panel .torrent-meta-multiselect__toggle:hover {
    border-color: #d2b083;
    background: #fff8ef;
}

.torrent-search-box__search-settings-panel .torrent-meta-multiselect__toggle:focus,
.torrent-search-box__search-settings-panel .torrent-meta-multiselect__toggle:focus-within,
.torrent-search-box__search-settings-panel .torrent-meta-multiselect.is-open .torrent-meta-multiselect__toggle {
    border-color: #cf994e;
    box-shadow: 0 0 0 3px rgba(229, 164, 79, 0.08);
    background: rgba(255, 255, 255, 0.96);
}

.torrent-search-box__search-settings-panel .torrent-meta-multiselect__placeholder {
    color: #9b8a78;
    font-size: 11px;
    line-height: 18px;
}

.torrent-search-box__search-settings-panel .torrent-meta-multiselect__chips {
    gap: 4px;
}

.torrent-search-box__search-settings-panel .torrent-meta-multiselect__chip {
    min-height: 20px;
    padding: 0 5px 0 7px;
    font-size: 10.5px;
    line-height: 18px;
}

.torrent-search-box__search-settings-panel .torrent-meta-multiselect__chip-remove {
    width: 15px;
    height: 15px;
    font-size: 11px;
}

.torrent-search-box__search-settings-panel .torrent-meta-multiselect__arrow {
    right: 10px;
    border-left-width: 4px;
    border-right-width: 4px;
    border-top-width: 5px;
}

.torrent-search-box__search-main-actions {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    flex: none;
    margin-left: 0;
    border-radius: 0 12px 12px 0;
    background: transparent;
    box-shadow: none;
    z-index: 2;
}

.torrent-search-box__search-main-actions:focus-within {
    border-color: transparent;
    box-shadow: none;
}

.torrent-search-box__submit.btn {
    min-width: 90px;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: rgba(245, 233, 214, 0.74);
    color: #7a572d;
    font-weight: 600;
    box-shadow: none;
}

.torrent-search-box__submit.btn:hover,
.torrent-search-box__submit.btn:focus {
    border-color: transparent;
    background: rgba(240, 226, 204, 0.86);
    color: #6b4b24;
}

.torrent-search-box__submit.btn[disabled] {
    opacity: 0.68;
    cursor: not-allowed;
    background: rgba(245, 233, 214, 0.74);
}

.torrent-search-box__submit--advanced {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 140px;
}

.torrent-search-box__submit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.torrent-search-box__advanced-toggle {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 36px;
    width: 36px;
    padding: 0;
    border: 0;
    border-radius: 0 10px 10px 0;
    background: transparent;
    color: #978878;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.torrent-search-box__advanced-toggle::before {
    content: none;
}

.torrent-search-box__advanced-toggle-text {
    display: none;
}

.torrent-search-box__advanced-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    font-size: 11px;
    line-height: 1;
}

.torrent-search-box__advanced-toggle:hover,
.torrent-search-box__advanced-toggle:focus {
    outline: none;
    background: rgba(244, 247, 251, 0.34);
    color: #7f6c56;
    box-shadow: none;
}

.torrent-search-box__advanced-toggle.is-open {
    background: rgba(240, 245, 251, 0.5);
    color: #78654f;
}

.torrent-search-box__advanced-toggle.is-open::before {
    background: rgba(221, 227, 235, 0.95);
}

.torrent-search-box__advanced-toggle:active {
    background: rgba(233, 238, 245, 0.6);
}

.torrent-search-box__captcha {
    margin-top: 2px;
}

.torrent-search-box__quick-tags {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

/*
 * 历史样式：原本展开高级搜索时会通过 .is-hidden 折叠 quick-tags，
 * 但与 advanced 面板的展开会形成叠加位移，造成"面板冒头 + 上移"的眼花感。
 * 现已改为 quick-tags 始终展示（torrents.php 中 syncQuickTagsVisibility 已置空）。
 * 保留下面的折叠规则便于未来如需联动时直接启用。
 */
.torrent-search-box__quick-tags.is-hidden {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    overflow: hidden;
    pointer-events: none;
}

.torrent-search-box__active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border: 1px solid #f0e2cc;
    border-radius: 6px;
    background: rgba(247, 161, 58, 0.04);
    overflow: hidden;
    opacity: 1;
    max-height: 480px;
    transition: max-height 0.3s ease-in-out, opacity 0.22s ease-in-out, padding 0.3s ease-in-out, margin 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.torrent-search-box__active-filters.is-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-color: transparent;
    pointer-events: none;
}

.torrent-search-box__active-filters-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(247, 161, 58, 0.1);
    color: #b4701a;
    font-size: 10px;
    line-height: 1;
}

.torrent-search-box__active-filters-label {
    color: #7b6750;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.torrent-search-box__active-filters-list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    flex-wrap: wrap;
    min-width: 0;
}

.torrent-search-box__active-filter-chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 24px;
    padding: 0 10px;
    border: 1px solid #e5d6bf;
    border-radius: 999px;
    background: #fff7eb;
    color: #8a5518;
    font-size: 11px;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.torrent-search-box__active-filter-chip:hover,
.torrent-search-box__active-filter-chip:focus {
    border-color: #d7ae72;
    background: #fff1de;
    box-shadow: 0 1px 3px rgba(215, 163, 97, 0.18);
}

.torrent-search-box__active-filter-chip-text {
    display: inline-block;
}

.torrent-search-box__active-filter-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: rgba(196, 122, 26, 0.12);
    color: inherit;
    font-size: 12px;
    line-height: 1;
}

.torrent-search-box__active-filters-clear.btn {
    flex: none;
    min-width: 0;
    height: 26px;
    padding: 0 10px;
    border: 1px solid #e3dbd0;
    border-radius: 999px;
    background: #fff;
    color: #6f5a43;
    font-size: 11px;
    box-shadow: none;
}

.torrent-search-box__active-filters-clear.btn:hover,
.torrent-search-box__active-filters-clear.btn:focus {
    border-color: #cfb188;
    background: #fff3e1;
    color: #8a5518;
}

.torrent-search-box__tag-cloud,
.torrent-search-box__hot-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.torrent-search-box__tag-cloud {
    width: 100%;
    justify-content: center;
    /* 组间 gap 放大（行间 8 / 列间 10），组内 gap 由 .tag-group 自己控制；
     * 两层 gap 的对比让"同一语义组"在视觉上自然聚拢。 */
    gap: 8px 10px;
}

/*
 * 标签语义分组（lang / origin / flag / rule / media / misc）。
 *
 * 同一组内的 tag 紧靠在一起（组内 gap 3px），组与组之间靠 .tag-cloud 的
 * 10px 列 gap + 一道 14px 高的竖线分隔符区分——既保持信息密度，又让
 * 不同语义（语言 / 来源 / 画质 / 流通 / 媒体）的 tag 不再混成一条彩虹。
 *
 * 分隔符用 ::before 伪元素，随 flex-wrap 换行时会自然跟随；首组没有
 * 前导竖线（:first-child 去掉）。竖线颜色取整页暖奶油语境里的中性暖灰，
 * 与 tag 本身的饱和色保持"分隔但不抢戏"的层级。
 */
.torrent-search-box__tag-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 4px;
    position: relative;
}

.torrent-search-box__tag-group::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 14px;
    margin-right: 8px;
    background: linear-gradient(
        180deg,
        rgba(160, 135, 100, 0) 0%,
        rgba(160, 135, 100, 0.32) 20%,
        rgba(160, 135, 100, 0.32) 80%,
        rgba(160, 135, 100, 0) 100%
    );
    vertical-align: middle;
    flex: 0 0 auto;
}

.torrent-search-box__tag-group:first-child::before {
    display: none;
}

.torrent-search-box__hot-links {
    gap: 6px;
}

/*
 * 搜索栏标签云里的 span.tags 只覆盖两项 "场景差异"：
 *   1. margin: 0   —— 云里标签紧挨展示，不需要通用规则的外边距
 *   2. hover scale —— 给"可点击跳转"的标签云额外一份交互反馈
 * 颜色 / 饱和度 / 圆角 / 阴影 等观感一律交给全站 span.tags 规则，
 * 确保与种子列表行、详情页、论坛等位置的标签完全一致。
 */
.torrent-search-box__tag-cloud .tags {
    margin: 0;
    transform: scale(1);
    transition: transform 0.16s ease;
}

.torrent-search-box__tag-cloud .tags:hover,
.torrent-search-box__tag-cloud .tags:focus {
    transform: scale(1.05);
}

.torrent-search-box__tag-cloud .tags.is-combo-selected {
    box-shadow: 0 0 0 1px rgba(207, 153, 78, 0.55), 0 2px 6px rgba(124, 82, 28, 0.12);
    transform: scale(1.03);
}

.torrent-search-box__quick-tag-combo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 18px;
    margin-left: 2px;
    padding-left: 10px;
    border-left: 1px solid rgba(160, 135, 100, 0.28);
}

.torrent-search-box__quick-tag-combo[hidden] {
    display: none;
}

.torrent-search-box__quick-tag-combo-apply {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.torrent-search-box__quick-tag-combo-apply:hover,
.torrent-search-box__quick-tag-combo-apply:focus {
    color: #6f3a00;
    outline: none;
}

.torrent-search-box__quick-tag-combo-list {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px 4px;
}

.torrent-search-box__tag-cloud .torrent-search-box__quick-tag-combo-item {
    margin: 0;
    white-space: nowrap;
    transform: scale(1);
}

.torrent-search-box__quick-tag-combo-separator {
    color: #c89042;
    font-size: 10px;
    line-height: 1;
}

.torrent-search-box__quick-tag-combo-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid rgba(204, 118, 107, 0.28);
    border-radius: 999px;
    background: rgba(204, 118, 107, 0.08);
    color: #94463e;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease, background-color 0.14s ease;
}

.torrent-search-box__quick-tag-combo:hover .torrent-search-box__quick-tag-combo-clear,
.torrent-search-box__quick-tag-combo:focus-within .torrent-search-box__quick-tag-combo-clear,
.torrent-search-box__quick-tag-combo-clear:hover,
.torrent-search-box__quick-tag-combo-clear:focus {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.torrent-search-box__quick-tag-combo-clear:hover,
.torrent-search-box__quick-tag-combo-clear:focus {
    background: rgba(204, 118, 107, 0.15);
    outline: none;
}

.torrent-search-box__hot-links a {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid #e1dbd1;
    border-radius: 999px;
    background: #faf8f5;
    color: #725d44;
    font-size: 11px;
    line-height: 1.2;
    text-decoration: none;
}

.torrent-search-box__hot-links a:hover,
.torrent-search-box__hot-links a:focus {
    border-color: #d2b083;
    background: #fff4e5;
    color: #9b5910;
    text-decoration: none;
}

.torrent-search-box__advanced {
    /*
     * 显式定位 + z-index:1，确保 hero (z-index:3) 与其内部弹出的
     * .torrent-search-box__hot-search-section 始终画在高级搜索面板之上。
     * 之前仅依赖 transform / backdrop-filter 创建的隐式堆叠上下文，
     * 实际渲染中 advanced-panel 的 backdrop-filter (blur + 半透明白底)
     * 会把上方的热门搜索弹层"罩"成模糊半透状，看起来像有透明效果。
     */
    position: relative;
    z-index: 1;
    overflow: hidden;
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, transform 0.3s ease-in-out, margin-top 0.3s ease-in-out;
}

.torrent-search-box__advanced.is-open {
    margin-top: 2px;
    opacity: 1;
    transform: translateY(0);
    overflow: visible;
    pointer-events: auto;
}

.torrent-search-box__advanced-panel {
    display: grid;
    gap: 12px;
    padding: 12px 14px 14px;
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045), 0 2px 6px rgba(49, 66, 96, 0.025);
}

.torrent-search-box__advanced-layout {
    display: grid;
    grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.65fr);
    gap: 12px;
    align-items: start;
}

.torrent-search-box__advanced-section {
    min-width: 0;
    padding: 11px 13px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.44);
}

.torrent-search-box__advanced-section--fields {
    padding: 12px 14px 13px;
    background: rgba(255, 255, 255, 0.52);
}

.torrent-search-box__advanced-section--fields .torrent-search-box__advanced-grid {
    gap: 10px 12px;
}

.torrent-search-box__advanced-section--fields .torrent-search-box__control-field,
.torrent-search-box__advanced-section--fields .torrent-meta-filter-field {
    gap: 6px;
}

.torrent-search-box__advanced-section--tags {
    background: rgba(255, 255, 255, 0.38);
    box-shadow: none;
}

.torrent-search-box__advanced-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
}

.torrent-search-box__control-row {
    min-width: 0;
}

.torrent-search-box__control-row--search {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 262px;
    gap: 12px;
    align-items: start;
}

.torrent-search-box__control-row--search .torrent-search-box__control-field {
    min-width: 0;
}

.torrent-search-box__control-field--search-settings {
    grid-column: auto;
    width: 100%;
    max-width: 100%;
}

.torrent-search-box__control-field,
#torrent-search-form .torrent-meta-filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin-right: 0;
    line-height: 1.2;
}

.torrent-search-box__control-field--range {
    grid-column: 1 / -1;
}

.torrent-search-box__control-field--year-range {
    grid-column: auto;
    width: 100%;
    max-width: 100%;
}

.torrent-search-box__control-field--submit {
    align-items: flex-end;
    align-self: end;
    grid-column: 3 / 4;
    justify-self: stretch;
    margin-top: 4px;
}

.torrent-search-box__label,
.torrent-search-box__section-title,
.torrent-search-box__filter-title {
    color: #695743;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.torrent-search-box__range-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
    gap: 4px;
    align-items: center;
}

.torrent-search-box__range-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8d7a65;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.torrent-search-box__search-settings-fields--inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 6px;
    align-items: end;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect {
    width: 100% !important;
}

.torrent-search-box__search-settings-select-wrap--area .torrent-meta-multiselect {
    width: 100% !important;
    max-width: 100%;
}

.torrent-search-box__search-settings-select-wrap--mode .torrent-meta-multiselect {
    width: 100% !important;
    max-width: 100%;
}

.torrent-search-box__search-settings-field {
    min-width: 0;
}

.torrent-search-box__search-settings-select-wrap--area {
    width: 100%;
}

.torrent-search-box__search-settings-field--mode {
    min-width: 0;
    width: 92px;
}

.torrent-search-box__search-settings-select-wrap--mode {
    width: 92px;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__value {
    display: block;
    min-width: 0;
    overflow: hidden;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__placeholder,
.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__chips {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.torrent-search-box__search-settings-field--mode .torrent-search-box__search-settings-label {
    display: none;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__toggle {
    min-height: 32px;
    padding: 4px 30px 4px 10px;
    border: 1px solid #ddd4c8;
    border-radius: 8px;
    background: #fff;
    color: #695743;
    font-size: 11px;
    font-weight: 500;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__toggle:hover {
    border-color: #d2b083;
    background: #fff8ef;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__toggle:focus,
.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__toggle:focus-within,
.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect.is-open .torrent-meta-multiselect__toggle {
    border-color: #cf994e;
    box-shadow: 0 0 0 3px rgba(229, 164, 79, 0.08);
    background: rgba(255, 255, 255, 0.96);
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__placeholder {
    color: #8a7762;
    font-size: 11px;
    font-weight: 400;
    line-height: 18px;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__chips {
    gap: 4px;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__chip {
    min-height: 20px;
    padding: 0 5px 0 7px;
    font-size: 10.5px;
    line-height: 18px;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__chip-remove {
    width: 15px;
    height: 15px;
    font-size: 11px;
}

.torrent-search-box__search-settings-fields--inline .torrent-meta-multiselect__arrow {
    right: 10px;
    border-left-width: 4px;
    border-right-width: 4px;
    border-top-width: 5px;
}

#torrent-search-advanced .torrent-search-box__field-input {
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 11px;
}

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

.torrent-search-box__filter-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 12px;
}

.torrent-search-box__filter-group {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
    flex: 1 1 210px;
    max-width: 100%;
}

.torrent-search-box__filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.torrent-search-box__filter-title {
    margin: 0;
    color: #5a4a39;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.torrent-search-box__filter-action.btn {
    min-width: 0;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    border: 1px solid #f1ebe4;
    background: rgba(123, 103, 80, 0.03);
    color: #b0a291;
    font-size: 11px;
    font-weight: 400;
    box-shadow: none;
}

.torrent-search-box__filter-action.btn:hover,
.torrent-search-box__filter-action.btn:focus {
    border-color: #e2d5c6;
    background: #f6f1ea;
    color: #887562;
}

.torrent-search-box__filter-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: none;
    order: 999;
    margin-left: 8px;
}

.torrent-search-box__filter-action--inline.btn {
    flex: none;
    order: 999;
}

.torrent-search-box__filter-action--inline.btn:not(.torrent-search-box__filter-action--icon) {
    height: 24px;
    margin-left: 0;
    padding: 0 1px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #89735b;
    font-size: 11px;
    font-weight: 500;
    line-height: 24px;
    box-shadow: none;
    white-space: nowrap;
}

.torrent-search-box__filter-action--inline.btn:not(.torrent-search-box__filter-action--icon):hover,
.torrent-search-box__filter-action--inline.btn:not(.torrent-search-box__filter-action--icon):focus {
    border-color: transparent;
    background: transparent;
    color: #80684a;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.torrent-search-box__filter-action--icon.btn {
    display: inline-flex;
    align-items: center;
    width: 24px;
    padding: 0;
    justify-content: center;
}

.torrent-search-box__filter-actions .torrent-search-box__filter-action--icon.btn {
    width: 18px;
    min-width: 18px;
    height: 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #89735b;
}

.torrent-search-box__filter-actions .torrent-search-box__filter-action--icon.btn:hover,
.torrent-search-box__filter-actions .torrent-search-box__filter-action--icon.btn:focus {
    border-color: transparent;
    background: transparent;
    color: #80684a;
}

.torrent-search-box__filter-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 11px;
    line-height: 1;
}

.torrent-search-box__filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.torrent-search-box__filter-tag {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.torrent-search-box__filter-tag--stateful {
    cursor: default;
}

.torrent-search-box__filter-tag input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.torrent-search-box__filter-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid #eee6dd;
    border-radius: 999px;
    background: #fdfcfb;
    color: #7d6954;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.25;
    box-shadow: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

button.torrent-search-box__filter-tag-chip {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.torrent-search-box__filter-tag:hover .torrent-search-box__filter-tag-chip {
    border-color: #ddc8b3;
    background: #f1e5da;
    color: #66492a;
    transform: translateY(-1px);
}

.torrent-search-box__filter-tag input:checked + .torrent-search-box__filter-tag-chip {
    border-color: #e3c49c;
    background: #f7e7cb;
    color: #93652d;
    box-shadow: none;
    font-weight: 600;
    transform: none;
}

.torrent-search-box__filter-tag--stateful[data-tag-state="include"] .torrent-search-box__filter-tag-chip {
    border-color: #e3c49c;
    background: #f7e7cb;
    color: #93652d;
    box-shadow: none;
    font-weight: 600;
    transform: none;
}

.torrent-search-box__filter-tag--stateful[data-tag-state="exclude"] .torrent-search-box__filter-tag-chip {
    border-color: rgba(188, 106, 96, 0.34);
    background: rgba(204, 118, 107, 0.12);
    color: #94463e;
}

.torrent-search-box__filter-tag--stateful[data-tag-state="include"] .torrent-search-box__filter-tag-chip::before,
.torrent-search-box__filter-tag--stateful[data-tag-state="exclude"] .torrent-search-box__filter-tag-chip::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-right: -1px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    background: rgba(255, 255, 255, 0.72);
}

.torrent-search-box__filter-tag--stateful[data-tag-state="include"] .torrent-search-box__filter-tag-chip::before {
    content: '+';
    color: #93652d;
}

.torrent-search-box__filter-tag--stateful[data-tag-state="exclude"] .torrent-search-box__filter-tag-chip::before {
    content: '-';
    width: 16px;
    font-size: 12px;
    color: #94463e;
}

.torrent-search-box__filter-tag input:focus + .torrent-search-box__filter-tag-chip {
    box-shadow: 0 0 0 3px rgba(231, 207, 170, 0.18);
}

.torrent-search-box__filter-tag--stateful .torrent-search-box__filter-tag-chip:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 207, 170, 0.18);
}

.torrent-search-box__filter-tag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.torrent-search-box__filter-tag-icon img {
    display: block;
    width: 19px;
    height: 19px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.torrent-search-box__filter-tag-text {
    min-width: 0;
    white-space: nowrap;
}

.torrent-search-box__filter-group--cat {
    order: 1;
    flex-basis: 210px;
}

.torrent-search-box__filter-group--cat .torrent-search-box__filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.torrent-search-box__filter-group--cat .torrent-search-box__filter-tag {
    width: auto;
}

.torrent-search-box__filter-group--cat .torrent-search-box__filter-tag-chip {
    width: auto;
    min-height: 26px;
    padding: 0 9px;
    justify-content: flex-start;
    flex-direction: row;
    gap: 6px;
}

.torrent-search-box__filter-group--cat .torrent-search-box__filter-tag-icon img {
    width: 19px;
    height: 19px;
}

.torrent-search-box__filter-group--cat .torrent-search-box__filter-tag-text {
    font-size: 11.5px;
    line-height: 1.25;
    white-space: nowrap;
    text-align: left;
}

.torrent-search-box__filter-group--source,
.torrent-search-box__filter-group--medium,
.torrent-search-box__filter-group--standard,
.torrent-search-box__filter-group--tag {
    flex-basis: 220px;
}

.torrent-search-box__filter-group--source {
    order: 2;
    flex-basis: 210px;
}

.torrent-search-box__filter-group--codec {
    order: 3;
    flex-basis: 380px;
}

.torrent-search-box__filter-group--audiocodec {
    order: 4;
    flex-basis: 290px;
}

.torrent-search-box__filter-group--medium {
    order: 5;
    flex-basis: 185px;
}

.torrent-search-box__filter-group--standard {
    order: 6;
    flex-basis: 220px;
}

.torrent-search-box__filter-group--processing {
    order: 7;
    flex-basis: 300px;
}

.torrent-search-box__filter-group--team {
    order: 8;
    flex-basis: 250px;
}

.torrent-search-box__filter-group--torrentcheck {
    flex-basis: 250px;
}

.torrent-search-box__filter-group--torrentcheck {
    order: 9;
    flex-basis: 180px;
}

.torrent-search-box__filter-group--tag {
    order: 10;
    flex: 1 1 100%;
}

.torrent-search-box__hot-search-section {
    position: absolute;
    /*
     * 直接贴住输入框底部 (4px 仅留作描边/阴影呼吸，避免与输入框焦点环重合)。
     * 原值 calc(100% + 10px) 让 popup 上沿正好落在 hero grid-gap 之外的
     * quick-tags 顶端，下方 quick-tags 从 popup 的左右两侧露出（hero 比
     * search-main 宽，popup 只覆盖 search-main 宽度），看起来像有"标签
     * 行的部分内容夹在中间"。
     */
    top: calc(100% + 4px);
    left: 0;
    right: calc(var(--torrent-search-main-action-width) * -1);
    display: none;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(214, 222, 232, 0.96);
    border-radius: 16px;
    /*
     * 完全不透明的背景：原先用 rgba(...,0.99) 在大多数情况下也接近实色，
     * 但叠在 .torrent-search-box__advanced-panel (backdrop-filter blur)
     * 上时会出现"透出后方模糊"的视觉，导致热门搜索的卡片与文字看起来发灰。
     * 这里改成纯 rgb，配合下方加重的 box-shadow，形成清晰的悬浮卡片层级。
     */
    background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgb(252, 250, 247) 100%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 18px 40px rgba(49, 66, 96, 0.16), 0 6px 14px rgba(49, 66, 96, 0.08);
    /*
     * z-index 抬到 60，确保压过下方 .torrent-search-box__advanced 面板
     * （后者通过 transform / backdrop-filter 创建了独立堆叠上下文，
     * 仅靠 35 在跨上下文比较时不一定胜出）。
     */
    z-index: 60;
}

.torrent-search-box__keyword-area:focus-within .torrent-search-box__hot-search-section {
    display: grid;
}

.torrent-search-box__hot-search-section .torrent-search-box__hot-links {
    justify-content: flex-start;
}

.torrent-search-box__hot-search-section--fixed {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    min-height: 22px;
    margin: -3px 0 0;
    padding: 0 3px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    z-index: auto;
}

.torrent-search-box__hot-search-section--fixed .torrent-search-box__section-title {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    color: #9a7a55;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 20px;
    white-space: nowrap;
}

.torrent-search-box__hot-search-section--fixed .torrent-search-box__section-title::after {
    content: "";
    width: 1px;
    height: 12px;
    margin-left: 8px;
    background: rgba(160, 135, 100, 0.24);
}

.torrent-search-box__hot-search-section--fixed .torrent-search-box__hot-links {
    flex: 1 1 auto;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 8px;
    min-width: 0;
    overflow: visible;
}

.torrent-search-box__hot-search-section--fixed .torrent-search-box__hot-links a {
    position: relative;
    flex: 0 0 auto;
    min-height: 20px;
    padding: 0 8px 0 0;
    margin-right: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #7e6a55;
    font-size: 11px;
    line-height: 20px;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.16s ease, text-decoration-color 0.16s ease;
    white-space: nowrap;
}

.torrent-search-box__hot-search-section--fixed .torrent-search-box__hot-links a::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 2px;
    height: 2px;
    border-radius: 999px;
    background: rgba(160, 135, 100, 0.34);
    transform: translateY(-50%);
}

.torrent-search-box__hot-search-section--fixed .torrent-search-box__hot-links a:last-child::after {
    display: none;
}

.torrent-search-box__hot-search-section--fixed .torrent-search-box__hot-links a:hover,
.torrent-search-box__hot-search-section--fixed .torrent-search-box__hot-links a:focus {
    background: transparent;
    color: #8d6332;
    text-decoration: underline;
    text-decoration-color: rgba(196, 139, 68, 0.38);
}

#torrent-search-form .torrent-meta-multiselect {
    width: 100% !important;
}

#torrent-search-form .torrent-meta-multiselect__toggle {
    min-height: 32px;
    padding: 4px 34px 4px 10px;
    border: 1px solid #ddd4c8;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

#torrent-search-form .torrent-meta-multiselect__placeholder {
    color: #9b8a78;
    font-size: 11px;
}

#torrent-search-form .torrent-meta-multiselect__chips {
    gap: 6px;
}

#torrent-search-form .torrent-meta-multiselect__chip {
    min-height: 22px;
    padding: 0 6px 0 8px;
    font-size: 11px;
}

#torrent-search-form .torrent-meta-multiselect__chip-remove {
    width: 15px;
    height: 15px;
}

#torrent-search-form .torrent-meta-multiselect__arrow {
    right: 12px;
    border-top-color: #8f7858;
}

#torrent-search-form .torrent-meta-multiselect__panel {
    min-width: 260px;
    width: 280px;
    max-width: min(360px, calc(100vw - 24px));
    border: 1px solid #e5ddd3;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 32px 72px rgba(32, 24, 17, 0.12), 0 12px 28px rgba(32, 24, 17, 0.05);
}

#torrent-search-form .torrent-meta-multiselect__search {
    padding: 10px;
    background: #fff;
    border-bottom: 1px solid #f0eae2;
}

#torrent-search-form .torrent-meta-multiselect__search-icon {
    left: 12px;
}

#torrent-search-form .torrent-meta-multiselect__search-input {
    height: 32px;
    padding-left: 34px;
    border: 1px solid #ddd4c8;
    border-radius: 8px;
    font-size: 12px;
}

#torrent-search-form .torrent-meta-multiselect__options {
    padding: 8px;
}

#torrent-search-form .torrent-meta-multiselect__option-frame {
    padding: 10px 11px;
    border-radius: 10px;
}

#torrent-search-form .torrent-meta-multiselect__option-check {
    width: 18px;
    height: 18px;
}

#torrent-search-form .torrent-meta-multiselect__option-text {
    font-size: 12px;
}

/*
 * 当前页筛选面板的"基础容器 / 标题 / 字段 / 重置按钮"在顶部
 * `.torrent-front-filter-box` ~ `.torrent-front-filter-reset-inline`
 * 一整套规则中集中定义，这里原先的橙黄主题补丁 (#ffc56f / #f7a13a /
 * #f5d6ab 等) 已全部移除 —— 目的是让面板配色与高级搜索 (.torrent-
 * search-box__advanced-panel) 的白玻璃 + 暖焦糖按钮族保持协调，而不是
 * 再叠一层"黄配橙"。如果未来要切回深橙主题，去上方主规则中覆盖即可。
 */

@media (min-width: 981px) {
    .torrent-search-box__advanced-layout {
        grid-template-columns: minmax(540px, 1.26fr) minmax(328px, 0.84fr);
        gap: 16px;
    }

    .torrent-search-box__advanced-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px 10px;
    }

    .torrent-search-box__control-row--search {
        display: contents;
    }

    .torrent-search-box__control-field--search-settings,
    .torrent-search-box__control-field--year-range {
        grid-column: auto;
    }

    .torrent-search-box__search-settings-fields--inline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 10px;
    }

    .torrent-search-box__search-settings-field--mode,
    .torrent-search-box__search-settings-select-wrap--mode {
        width: 100%;
    }

    .torrent-search-box__control-field--submit {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 8px;
    }

    #torrent-search-form .torrent-meta-multiselect__toggle {
        padding: 4px 32px 4px 10px;
    }

    #torrent-search-form .torrent-meta-multiselect__placeholder,
    #torrent-search-form .torrent-meta-multiselect__chip {
        font-size: 11px;
    }

    .torrent-search-box__advanced-section--fields {
        order: 2;
        padding: 14px 16px 16px;
    }

    .torrent-search-box__advanced-section--tags {
        order: 1;
        box-shadow: none;
        padding: 14px 16px 16px;
    }

    .torrent-search-box__advanced-section--tags .torrent-search-box__filter-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
        align-items: start;
    }

    .torrent-search-box__advanced-section--tags .torrent-search-box__filter-group {
        min-width: 0;
        max-width: 100%;
    }

    .torrent-search-box__advanced-section--tags .torrent-search-box__filter-group--tag {
        grid-column: 1 / -1;
        margin-top: 2px;
    }

    .torrent-search-box__control-field--submit {
        grid-column: 1 / -1;
        width: 100%;
        align-items: flex-end;
        justify-self: stretch;
    }
}

@media (max-width: 980px) {
    .torrent-search-box__advanced-layout {
        grid-template-columns: 1fr;
    }

    .torrent-search-box__advanced-section--tags {
        box-shadow: none;
    }

    .torrent-search-box__advanced-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .torrent-search-box__search-main {
        flex-direction: row;
        align-items: stretch;
        gap: 0;
    }

    .torrent-search-box__keyword-area {
        width: auto;
        flex: 1 1 auto;
    }

    .torrent-search-box__keyword-input {
        border-radius: 12px 0 0 12px;
    }

    .torrent-search-box__search-settings {
        width: auto;
        margin-left: 0;
    }

    .torrent-search-box__search-settings-toggle {
        width: 36px;
        border-radius: 0;
    }

    .torrent-search-box__hot-search-section {
        position: static;
        margin-top: 8px;
        padding: 10px 12px;
        box-shadow: 0 12px 26px rgba(49, 66, 96, 0.07), 0 3px 8px rgba(49, 66, 96, 0.035);
    }

    .torrent-search-box__search-settings-panel {
        left: auto;
        right: 0;
        width: 272px;
        max-width: min(360px, calc(100vw - 24px));
    }

    .torrent-search-box__search-main-actions {
        width: auto;
        margin-left: 0;
        border-radius: 0 12px 12px 0;
    }

    .torrent-search-box__advanced-toggle {
        flex: none;
        justify-content: center;
    }

    .torrent-search-box__submit.btn {
        flex: none;
        width: auto;
        min-width: 80px;
    }

    .torrent-search-box__advanced-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .torrent-search-box__control-field--search-settings,
    .torrent-search-box__control-field--year-range,
    .torrent-search-box__control-field--submit {
        grid-column: 1 / -1;
    }

    .torrent-search-box__control-row--search {
        grid-template-columns: 1fr;
    }

    .torrent-search-box__search-settings-fields--inline {
        grid-template-columns: 1fr;
    }

    .torrent-search-box__search-settings-field--mode .torrent-search-box__search-settings-label {
        display: block;
    }

    .torrent-search-box__search-settings-select-wrap--area .torrent-meta-multiselect,
    .torrent-search-box__search-settings-select-wrap--mode .torrent-meta-multiselect {
        width: 100% !important;
        max-width: 100%;
    }

    .torrent-search-box__control-field--search-settings,
    .torrent-search-box__control-field--year-range,
    .torrent-search-box__search-settings-field--mode,
    .torrent-search-box__search-settings-select-wrap--mode {
        width: auto;
        max-width: 100%;
    }

    .torrent-search-box__range-inline {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .torrent-search-box__filter-group {
        flex-basis: calc(50% - 7px);
    }

    .torrent-search-box__filter-group--cat {
        flex: 0 0 calc(50% - 7px);
    }

    .torrent-search-box__active-filters {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .torrent-search-box__search-main {
        --torrent-search-main-action-width: 40px;
    }

    .torrent-search-box__body-cell {
        padding: 12px !important;
    }

    .torrent-search-box__search-main {
        flex-direction: row;
        gap: 0;
    }

    .torrent-search-box__search-main-actions {
        flex-direction: row;
        width: auto;
    }

    .torrent-search-box__submit.btn {
        width: auto;
        flex: none;
    }

    .torrent-search-box__advanced-toggle {
        width: 40px;
        height: 40px;
        align-self: stretch;
    }

    .torrent-search-box__advanced-grid {
        grid-template-columns: 1fr;
    }

    .torrent-search-box__keyword-submit {
        width: 38px;
    }

    .torrent-search-box__filter-group {
        flex-basis: 100%;
    }

    .torrent-search-box__filter-group--cat {
        flex: 0 0 100%;
    }

    .torrent-search-box__active-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .torrent-search-box__active-filters-list {
        width: 100%;
    }

    .torrent-search-box__active-filters-clear.btn {
        width: 100%;
    }

    .torrent-search-box__range-inline {
        grid-template-columns: 1fr;
    }

    .torrent-search-box__range-divider {
        display: none;
    }

    .torrent-search-box__filter-head {
        align-items: center;
    }

    .torrent-front-filter-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "text"
            "ratings"
            "time"
            "size"
            "seeders"
            "leechers"
            "completed"
            "progress";
    }
}

.torrent-progress-cell {
    width: 1%;
    min-width: 62px;
    padding-left: 3px !important;
    padding-right: 3px !important;
    text-align: center;
    white-space: nowrap;
}

.torrent-progress-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1;
    font-weight: bold;
}

.torrent-progress-value {
    color: inherit;
    font-variant-numeric: tabular-nums;
}

.torrent-progress-badge i {
    font-size: 11px;
    opacity: 1;
}

.torrent-progress-badge--downloading {
    color: #c56a16;
}

.torrent-progress-badge--incomplete {
    color: #b7aca2;
}

.torrent-progress-badge--completed {
    color: #98a1ab;
    font-weight: 500;
}

.torrent-progress-badge--completed i {
    color: #8da0b5;
}

.torrent-progress-badge--seeding {
    color: #1b7b42;
    font-weight: 800;
}

.torrent-progress-badge--seeding i {
    color: #14823f;
}

.torrent-title-progress {
    position: relative;
    width: 100%;
    height: 3px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(131, 110, 80, 0.14);
}

.torrent-title-progress--seeding {
    height: 3px;
}

.torrent-title-progress__bar {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.torrent-title-progress__bar.torrent-progress-badge--downloading {
    background: var(--torrent-progress-bar-downloading, #c56a16);
}

.torrent-title-progress__bar.torrent-progress-badge--incomplete {
    background: var(--torrent-progress-bar-incomplete, #c9bfb6);
}

.torrent-title-progress__bar.torrent-progress-badge--completed {
    background: var(--torrent-progress-bar-completed, #a1b2c5);
}

.torrent-title-progress__bar.torrent-progress-badge--seeding {
    background: var(--torrent-progress-bar-seeding, #14823f);
}
}

.torrent-title-progress__bar.torrent-progress-badge--none {
    background: #a79e92;
}

.torrent-seeders-highlight {
    display: inline-block;
    min-width: 1.4em;
    color: #0f8b46 !important;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    line-height: 1;
    text-align: center;
}

.torrent-progress-badge--none {
    color: #a79e92;
    font-weight: normal;
}

.torrent-progress-badge--none .torrent-progress-value {
    font-size: 11px;
}

.torrent-progress-badge--none i {
    display: none;
}
