/* ==========================================================
   七分之一 · 搜索结果页 UI（2026-12-02）
   只负责结果区工具条与反馈入口，不影响其他页面
   ========================================================== */

/* ---------- 结果工具条 ---------- */
.section-header-compact {
    margin: 0 0 14px !important;
}

/* 旧的 h3 结构已弃用，保留兜底隐藏 */
.section-header-compact > h3 {
    display: none !important;
}

.rs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.rs-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.rs-query {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 0 1 auto;
}

.rs-query::before {
    content: "";
    flex: 0 0 4px;
    width: 4px;
    height: 17px;
    border-radius: 3px;
    background: var(--yx-brand, #534AB7);
}

.rs-label {
    font-size: 12.5px;
    color: var(--yx-t3, #9AA0AA);
    letter-spacing: .4px;
    white-space: nowrap;
}

.rs-word {
    display: inline-block;
    max-width: 300px;
    padding: 3px 10px;
    border-radius: 8px;
    background: var(--yx-brand-soft, #EEEDFE);
    color: var(--yx-brand, #534AB7);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.rs-count {
    font-size: 12.5px;
    color: var(--yx-t3, #9AA0AA);
    white-space: nowrap;
    padding-left: 2px;
    flex: 0 0 auto;
    margin-left: auto;
}

.rs-count b {
    font-style: normal;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--yx-t1, #1A1C22);
    margin: 0 2px;
}

.rs-bar .pan-filter-minimal {
    flex: 0 0 100%;
    justify-content: center;
    padding: 2px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
    gap: 8px !important;
    overflow-x: auto;
}

/* ---------- 空结果反馈按钮 ---------- */
#app .search-results-section .el-empty {
    margin-top: 0 !important;
    padding: 8px 0 4px !important;
}

#app .search-results-section .el-empty__image {
    width: 132px !important;
    height: 132px !important;
}

#app .search-results-section .el-empty__description p {
    font-size: 13px !important;
    color: var(--yx-t3, #9AA0AA) !important;
    margin-top: 6px !important;
}

.rs-empty-cta {
    display: flex;
    justify-content: center;
    margin: 14px 0 18px;
}

.rs-feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border: 1px solid #DCD8FA;
    border-radius: 999px;
    background: var(--yx-brand-soft, #EEEDFE);
    color: var(--yx-brand, #534AB7);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}

.rs-feedback-btn:hover {
    background: var(--yx-brand, #534AB7);
    border-color: var(--yx-brand, #534AB7);
    color: #fff;
    transform: translateY(-1px);
}

.rs-feedback-btn:active {
    transform: translateY(0);
}

/* ---------- 页头反馈入口 ---------- */
.headerBox .box .navs .nav-feedback {
    margin-left: 18px !important;
    padding: 7px 14px !important;
    border: 1px solid #DCD8FA;
    border-radius: 999px;
    background: var(--yx-brand-soft, #EEEDFE);
    color: var(--yx-brand, #534AB7);
    font-size: 12.5px;
    line-height: 1.1;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}

.headerBox .box .navs .nav-feedback:hover {
    background: var(--yx-brand, #534AB7);
    border-color: var(--yx-brand, #534AB7);
    color: #fff !important;
}

/* ---------- 加载态：不再撑出大片空白 ---------- */
.search-results-section,
.search-results-section.is-loading,
.search-results-section:has(.loading-minimal) {
    min-height: 0 !important;
}

.loading-minimal {
    display: none !important;
}

.rs-count.is-loading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--yx-brand, #534AB7);
}

.rs-count.is-loading::before {
    content: "";
    width: 11px;
    height: 11px;
    border: 2px solid rgba(83, 74, 183, .2);
    border-top-color: var(--yx-brand, #534AB7);
    border-radius: 50%;
    animation: rs-spin .7s linear infinite;
}

@keyframes rs-spin {
    to { transform: rotate(360deg); }
}

.loader-minimal {
    width: 18px !important;
    height: 18px !important;
    border-width: 2px !important;
    border-color: rgba(83, 74, 183, .16) !important;
    border-top-color: var(--yx-brand, #534AB7) !important;
}

/* ---------- 有效性检测处理动画 ---------- */
.validating-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    margin: 4px 0 8px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(83, 74, 183, .06), rgba(83, 74, 183, .12));
    color: var(--yx-brand, #534AB7);
    font-size: 14px;
    font-weight: 500;
}
.validating-spinner {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border: 2px solid rgba(83, 74, 183, .2);
    border-top-color: var(--yx-brand, #534AB7);
    border-radius: 50%;
    animation: rs-spin .7s linear infinite;
}
.validating-text {
    white-space: nowrap;
}

/* ---------- 右侧榜单标题 ---------- */
.listBox .right .nav {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--yx-t1, #1A1C22) !important;
    letter-spacing: .2px;
}

.listBox .right .nav::before {
    content: "";
    flex: 0 0 3px;
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--yx-brand, #534AB7);
    margin-right: 8px;
}

/* ---------- 无封面卡片：用标题首字代替破图三角 ---------- */
.resource-cover.is-empty {
    background: linear-gradient(135deg, #F4F3FB 0%, #E8E6F6 100%) !important;
    border: 1px solid #E6E4F2 !important;
}

.resource-cover-fallback {
    font-size: 22px !important;
    line-height: 1 !important;
    color: #ADA6DC !important;
    font-weight: 600 !important;
}

.resource-cover-fallback::after {
    display: none !important;
    content: none !important;
}

/* ---------- 链接有效性检测按钮 ---------- */
.resource-card-footer .result-actions .resource-check-btn,
.resource-result-card .result-actions .resource-check-btn,
.listBox .left .Ebox .list .item .result-actions .resource-check-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 64px;
    height: 27px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid #e9eaf0;
    background: #fff;
    color: #6b7280;
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 25px;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s, background .15s, border-color .15s;
}

.resource-check-btn:hover:not(:disabled) {
    border-color: #cfcbef;
    color: var(--yx-brand, #534ab7);
}

.resource-check-btn:disabled {
    opacity: 1;
    cursor: default;
}

.resource-check-btn .check-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c9ccd6;
    flex: 0 0 auto;
}

.resource-check-btn .check-spin {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #dcdfe6;
    border-top-color: #8a90a0;
    flex: 0 0 auto;
    animation: rs-check-spin .8s linear infinite;
}

@keyframes rs-check-spin {
    to { transform: rotate(360deg); }
}

.resource-check-btn.is-checking {
    color: #9096a2;
    background: #fafafb;
    border-color: #e9eaee;
}

.resource-check-btn.is-valid {
    color: #0f8a4d;
    background: #f1fbf5;
    border-color: #c6e9d5;
}

.resource-check-btn.is-valid .check-dot {
    background: #12a150;
}

.resource-check-btn.is-invalid {
    color: #d33a2c;
    background: #fdf3f2;
    border-color: #f6cec9;
}

.resource-check-btn.is-invalid .check-dot {
    background: #e5484d;
}

.resource-check-btn.is-warn {
    color: #b45309;
    background: #fff9ee;
    border-color: #f3ddb5;
}

.resource-check-btn.is-warn .check-dot {
    background: #f0a020;
}

.resource-check-btn.is-unknown {
    color: #6b7280;
    background: #f7f8fa;
    border-color: #e6e8ec;
}

/* ---------- 弹窗内链接检测按钮（对齐 resource-dialog-btn） ---------- */
.dialogUrlBox .resource-dialog-check {
    gap: 5px;
    border: 1px solid #e4e7ed;
    background: #fff;
    color: #555;
}

.dialogUrlBox .resource-dialog-check:hover:not(:disabled) {
    border-color: #cfcbef;
    color: var(--yx-brand, #534ab7);
}

.dialogUrlBox .resource-dialog-check:disabled {
    cursor: default;
}

.dialogUrlBox .resource-dialog-check .check-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c9ccd6;
    flex: 0 0 auto;
}

.dialogUrlBox .resource-dialog-check .check-spin {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid #dcdfe6;
    border-top-color: #8a90a0;
    flex: 0 0 auto;
    animation: rs-check-spin .8s linear infinite;
}

.dialogUrlBox .resource-dialog-check.is-checking {
    color: #9096a2;
    background: #fafafb;
    border-color: #e9eaee;
}

.dialogUrlBox .resource-dialog-check.is-valid {
    color: #0f8a4d;
    background: #f1fbf5;
    border-color: #c6e9d5;
}

.dialogUrlBox .resource-dialog-check.is-valid .check-dot {
    background: #12a150;
}

.dialogUrlBox .resource-dialog-check.is-invalid {
    color: #d33a2c;
    background: #fdf3f2;
    border-color: #f6cec9;
}

.dialogUrlBox .resource-dialog-check.is-invalid .check-dot {
    background: #e5484d;
}

.dialogUrlBox .resource-dialog-check.is-warn {
    color: #b45309;
    background: #fff9ee;
    border-color: #f3ddb5;
}

.dialogUrlBox .resource-dialog-check.is-warn .check-dot {
    background: #f0a020;
}

.dialogUrlBox .resource-dialog-check.is-unknown {
    color: #6b7280;
    background: #f7f8fa;
    border-color: #e6e8ec;
}

.resource-check-btn.is-unknown .check-dot {
    background: #9aa0ab;
}

/* ---------- 首页：微信交流群 ---------- */
.home-wx {
    width: 100%;
    max-width: 1120px;
    margin: 18px auto 0;
    padding: 0;
    box-sizing: border-box;
}

.home-wx-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #f0f1f5;
    border-radius: 14px;
}

.home-wx-qr {
    flex: 0 0 auto;
    padding: 6px;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 12px;
}

.home-wx-qr img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.home-wx-body {
    min-width: 0;
}

.home-wx-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-wx-badge {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 11px;
    line-height: 18px;
    padding: 0 7px;
    border-radius: 6px;
    color: #0e9f53;
    background: #e9f9f0;
}

.home-wx-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--yx-t1, #1a1c22);
    letter-spacing: .2px;
}

.home-wx-desc {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--yx-t2, #6b7280);
}

.home-wx-tip {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--yx-t3, #9aa0aa);
}

.home-wx-note {
    margin-left: auto;
    padding-left: 20px;
    border-left: 1px dashed #eceef3;
    text-align: right;
    flex: 0 0 auto;
}

.home-wx-note p {
    margin: 0;
    font-size: 12px;
    line-height: 1.9;
    color: var(--yx-t3, #9aa0aa);
}

@media (max-width: 900px) {
    .home-wx-note {
        display: none;
    }
}

@media (max-width: 768px) {
    .home-wx {
        width: min(calc(100% - 52px), 468px);
        padding: 0;
        margin-top: 20px;
    }

    .home-wx-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 18px 16px 20px;
        border-radius: 16px;
        box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
    }

    .home-wx-qr img {
        width: 150px;
        height: 150px;
    }

    .home-wx-head {
        justify-content: center;
    }

    .home-wx-desc {
        font-size: 12.5px;
    }
}

/* 与首页内容卡同步收窄，保持左右边缘对齐 */
@media (max-width: 390px) {
    .home-wx {
        width: calc(100% - 40px);
    }
}

@media (max-width: 340px) {
    .home-wx {
        width: calc(100% - 32px);
    }
}

/* ---------- 平板宽度：原来 1200 定宽会横向溢出 ---------- */
@media (min-width: 769px) and (max-width: 1279px) {
    .headerBox .box {
        width: 100% !important;
        padding: 0 18px;
        box-sizing: border-box;
    }

    .headerBox .box .search {
        min-width: 120px;
    }

    .listBox {
        width: 100% !important;
        max-width: 1200px;
        padding: 0 18px;
        box-sizing: border-box;
    }

    .listBox .right {
        width: 260px;
        flex: 0 0 260px;
        margin-left: 16px;
    }
}

/* ---------- 窄屏适配 ---------- */
@media (max-width: 1080px) {
    .headerBox .box .navs .nav-feedback {
        margin-left: 12px !important;
        padding: 6px 10px !important;
        font-size: 11.5px;
    }
}

@media (max-width: 768px) {
    /* 页头上下留出呼吸空间，避免图标贴边 */
    .headerBox .box {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    #app .search-results-section {
        padding: 12px 14px 8px !important;
        border-radius: 12px !important;
    }

    .rs-bar {
        gap: 8px;
        align-items: center;
    }

    /* 让 query / 条数 / 筛选项 成为工具条的直接子项，便于换行排序 */
    .rs-main {
        display: contents;
    }

    .rs-query {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }

    .rs-word {
        max-width: 44vw;
        font-size: 14px;
    }

    .rs-count {
        order: 2;
        font-size: 12px;
    }

    .rs-bar .pan-filter-minimal {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        padding: 2px 0 0 !important;
    }

    .rs-empty-cta {
        margin: 12px 0;
    }

    .rs-feedback-btn {
        width: 100%;
        justify-content: center;
        font-size: 13px;
        padding: 11px 16px;
    }

    /* 检测按钮在窄屏收窄，避免和「目录 / 获取资源」挤在一起 */
    .resource-result-card .result-actions .resource-check-btn {
        min-width: 58px;
        padding: 0 8px !important;
        gap: 4px;
    }
}

/* ==========================================================
   中文字体栈（修复移动端中文渲染，明确中文字体优先级）
   ========================================================== */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ==========================================================
   资源弹窗美化（2026-12-03）
   1) 桌面端左侧海报竖向居中 2) 卡片风格统一 3) 按钮主次分明
   ========================================================== */
/* 桌面端：左侧海报竖向居中（右侧内容更高时不再贴顶留白） */
.dialogUrlBox .resource-dialog-shell {
    align-items: center;
}

/* 海报圆角与阴影统一 */
.dialogUrlBox .resource-dialog-poster {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(26, 28, 34, .08);
}

/* 链接卡 / 二维码卡：白底 + 统一描边 */
.dialogUrlBox .resource-dialog-link-card {
    border: 1px solid #eceef3;
    background: #fff;
}
.dialogUrlBox .resource-dialog-qr {
    border: 1px solid #eceef3;
    background: #fbfbfd;
}

/* 按钮组：桌面端左对齐，主次分明 */
.dialogUrlBox .resource-dialog-actions {
    justify-content: flex-start;
}

/* 检测按钮：品牌色描边，明确可点击（去除灰色禁用感） */
.dialogUrlBox .resource-dialog-check {
    border: 1px solid var(--yx-brand, #534AB7);
    background: #fff;
    color: var(--yx-brand, #534AB7);
    font-weight: 600;
}
.dialogUrlBox .resource-dialog-check:hover:not(:disabled) {
    background: var(--yx-brand-soft, #EEEDFE);
    border-color: var(--yx-brand, #534AB7);
    color: var(--yx-brand, #534AB7);
}
.dialogUrlBox .resource-dialog-check .check-dot {
    background: var(--yx-brand, #534AB7);
}

/* 复制链接：中性次按钮 */
.dialogUrlBox .resource-dialog-btn.btn-copy {
    border: 1px solid #e4e7ed;
    background: #fff;
    color: #444;
    font-weight: 600;
}

/* 打开链接：实色主按钮 */
.dialogUrlBox .resource-dialog-btn.btn-open {
    border: 1px solid var(--yx-brand, #534AB7);
    background: var(--yx-brand, #534AB7);
    color: #fff;
    font-weight: 600;
}
.dialogUrlBox .resource-dialog-btn.btn-open:hover {
    background: var(--yx-brand-dark, #423A9E);
    border-color: var(--yx-brand-dark, #423A9E);
    color: #fff;
}

/* 声明区弱化 */
.dialogUrlBox .dialogUrl .statement {
    margin-top: 16px;
    padding: 10px 12px;
    border: 0;
    background: #f7f8fa;
}
.dialogUrlBox .dialogUrl .statement .content {
    color: #9aa0aa;
}
