/* --- 搜索栏 --- */
.search-page-wrapper {
    --search-control-radius: 12px;
    --search-container-radius: 22px;
    padding-top: 26px;
}

.search-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-page-wrapper .container-fluid-custom {
    padding-left: 0;
    padding-right: 0;
}

.search-area,
.trend-cloud,
.search-shell {
    width: calc(100% - 32px);
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.search-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding-top: 8px;
}

.search-hero-image {
    display: none;
    width: min(100%, 360px);
    aspect-ratio: 2.5 / 1;
}

.search-hero-image img {
    display: block;
    width: 100%;
    height: auto;
}

@media (min-width: 769px) {
    .search-hero-image {
        display: block;
    }
}

.search-shell,
.login-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(245, 191, 96, 0.14);
    color: var(--brand);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-shell {
    position: relative;
    overflow: visible;
    padding: 0 0 28px;
    border-radius: var(--search-container-radius);
}

.search-shell-intro {
    position: relative;
    z-index: 1;
    margin-bottom: 22px;
}

.search-shell-title {
    margin: 16px 0 10px;
    max-width: 12em;
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.search-shell-description {
    max-width: 48rem;
    margin: 0;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.search-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    gap: 16px;
}

.input-group-custom {
    width: 100%;
    margin: 0;
    padding: 10px;
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 18px 42px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--search-container-radius);
    overflow: hidden;
}

#searchInput {
    height: 54px;
    border: none;
    background: transparent;
    font-size: 1rem;
    padding-left: 18px;
    color: var(--text-primary);
}

#searchInput:focus {
    box-shadow: none;
    background: transparent;
}

#searchButton {
    width: 50px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #475569;
    padding: 0;
    height: 50px;
    border-radius: 50% !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
    transition: all 0.2s ease;
}

@keyframes fly-animate {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(3px, -3px) rotate(15deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

#searchButton.is-flying .search-button-icon {
    animation: fly-animate 0.8s ease-in-out infinite;
}

#searchButton.searching {
    background: #fff8e8;
    color: #b7791f;
}

#searchButton:hover:not(.searching) {
    transform: translateY(-1px);
    color: #8a5c14;
    border-color: rgba(222, 159, 45, 0.48);
    box-shadow: 0 12px 24px rgba(180, 116, 22, 0.18);
}

.search-button-icon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

/* --- 结果区网盘徽章颜色（弱化显示，不与主按钮竞争） --- */
.result-actions .bg-purple {
    background-color: #f1eaff !important;
    color: #7a56d6 !important;
}

.result-actions .bg-orange {
    background-color: #fff2e2 !important;
    color: #c97f12 !important;
}

.result-actions .bg-teal {
    background-color: #e8f8f6 !important;
    color: #24897f !important;
}

.result-actions .bg-mid-blue {
    background-color: #eaf0ff !important;
    color: #4768c7 !important;
}

.result-actions .bg-light-green {
    background-color: #edf8e2 !important;
    color: #6f9f1e !important;
}

.result-actions .bg-salmon {
    background-color: #fff0eb !important;
    color: #d06f4c !important;
}

.result-actions .bg-slate-blue {
    background-color: #edf2f7 !important;
    color: #51687f !important;
}

.result-actions .bg-deep-violet {
    background-color: #efe8ff !important;
    color: #6c43d7 !important;
}

.result-actions .bg-coral {
    background-color: #ffeded !important;
    color: #d85e5e !important;
}

.result-actions .bg-navy-blue {
    background-color: #edf1f5 !important;
    color: #3f5265 !important;
}

.result-actions .bg-rose {
    background-color: #ffeaf1 !important;
    color: #ca557d !important;
}

.result-actions .bg-dark-mint {
    background-color: #e9f8f2 !important;
    color: #2a8d71 !important;
}

.result-actions .bg-warm-gold {
    background-color: #fff5df !important;
    color: #be8b1f !important;
}

.result-actions .bg-olive {
    background-color: #eff4e6 !important;
    color: #6b7f38 !important;
}

.result-actions .bg-grape {
    background-color: #f2eef5 !important;
    color: #6e5d7e !important;
}

.result-actions .bg-terracotta {
    background-color: #fdf0ec !important;
    color: #b86450 !important;
}

/* --- 首页资源列表 --- */
.home-resource-sections {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.home-resource-section,
.home-resource-list {
    min-width: 0;
    max-width: 100%;
}

.home-resource-section h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.home-resource-list .result-actions {
    display: flex;
    visibility: visible;
}

.home-resource-platform-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 38px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #eadbc7;
    border-radius: 8px;
    background: #f7efe5;
    color: #765331;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.home-resource-empty,
.empty-search-message {
    padding: 28px 0;
    color: var(--text-secondary);
    text-align: center;
}


/* --- 网盘过滤栏 --- */
#netdisk-filter-bar {
    width: 100%;
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

@media (max-width: 768px) {
    .input-group-custom,
    #netdisk-filter-bar {
        width: 100%;
    }

    #netdisk-filter-bar {
        justify-content: center;
        overflow-x: visible;
    }
}

#netdisk-filter-bar::-webkit-scrollbar {
    display: none;
}

.trend-cloud {
    --trend-stage-height: 124px;
    min-height: 0;
    padding: 12px 18px;
    border: 1px solid rgba(245, 191, 96, 0.32);
    border-radius: var(--search-container-radius);
    background: radial-gradient(circle at 50% 32%, rgba(248, 202, 114, 0.22), transparent 44%), rgba(255, 255, 255, 0.72);
    overflow: hidden;
}
.trend-cloud-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.trend-cloud-eyebrow { margin: 0; color: #b7791f; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.trend-cloud h2 { margin: 4px 0 0; font-size: 1.2rem; color: #334155; }
.trend-cloud-scope { padding: 5px 9px; border-radius: 999px; color: #8a5c14; background: rgba(245, 191, 96, .16); font-size: .8rem; font-weight: 700; }
.trend-cloud-placeholder { display: grid; min-height: var(--trend-stage-height); place-items: center; margin: 0; color: #64748b; }
.trend-cloud.is-compact { min-height: 0; padding: 13px 18px; }
.trend-cloud.is-compact .trend-cloud-heading { align-items: center; }
.trend-cloud.is-compact .trend-cloud-eyebrow { display: none; }
.trend-cloud.is-compact h2 { margin: 0; font-size: .96rem; }
.trend-cloud.is-compact .trend-cloud-placeholder { display: block; min-height: 0; margin-top: 2px; font-size: .88rem; }
.trend-cloud-stage { position: relative; height: var(--trend-stage-height); margin-top: 6px; overflow: hidden; touch-action: pan-y; user-select: none; }
.trend-cloud[data-item-count="1"] { --trend-stage-height: 76px; }
.trend-cloud[data-item-count="2"] { --trend-stage-height: 94px; }
.trend-cloud[data-item-count="3"] { --trend-stage-height: 106px; }
.trend-cloud.has-search-results { --trend-stage-height: 44px; margin-bottom: -4px; padding: 6px 14px; }
.trend-cloud.has-search-results .trend-cloud-stage { margin-top: 2px; }
.trend-cloud-stage::before { content: ''; position: absolute; inset: 7% 13%; border: 1px solid rgba(224, 159, 45, .24); border-radius: 50%; background: radial-gradient(ellipse at 50% 43%, rgba(248,202,114,.25), rgba(255,255,255,.06) 53%, transparent 70%); box-shadow: inset 0 -18px 26px rgba(138,92,20,.05); pointer-events: none; }
.trend-cloud-word { position: absolute; left: 50%; top: 50%; z-index: 1; min-height: 44px; border: 1px solid rgba(180, 116, 22, .18); border-radius: 999px; padding: 7px 10px; color: hsl(var(--word-tone, 32), 65%, 25%); background: rgba(255,255,255,.88); box-shadow: 0 7px 18px rgba(138,92,20,.10); font-size: .8rem; font-weight: 700; line-height: 1.05; white-space: nowrap; transform: translate(-50%, -50%); transition: color .18s ease, background .18s ease, box-shadow .18s ease; will-change: transform, opacity; }
.trend-cloud-word:hover, .trend-cloud-word:focus-visible { color: #6d4306; background: rgba(248,202,114,.46); box-shadow: 0 10px 24px rgba(180,116,22,.18); outline: 2px solid rgba(222,159,45,.35); outline-offset: 2px; }
.trend-cloud-stage.is-static .trend-cloud-word { transition: none; }

.filter-btn {
    background-color: rgba(255, 255, 255, 0.88);
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
    font-weight: 600;
    transition: all 0.18s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(245, 191, 96, 0.28);
    background-color: rgba(255, 255, 255, 0.98);
}

.filter-btn.active {
    background: rgba(245, 191, 96, 0.16);
    color: #b7791f;
    border-color: rgba(245, 191, 96, 0.3);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(245, 191, 96, 0.08);
}

.precise-search-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; margin: 0; color: #475569; font-size: .9rem; cursor: pointer; }
.precise-search-toggle select { min-height: 34px; border: 1px solid rgba(148, 163, 184, .38); border-radius: var(--search-control-radius); padding: 4px 8px; color: #334155; background: #fff; }

.filter-and-count-container {
    margin-bottom: 16px;
}

.filter-toolbar {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "status filter";
    gap: 12px;
    margin-bottom: 0;
}

.result-count {
    display: none;
    color: #334155;
    font-size: 0.94rem;
    font-weight: 600;
}

.filter-toggle-button {
    grid-area: filter;
    flex: 0 0 auto;
    border-radius: var(--search-control-radius) !important;
    padding: 0.5rem 0.95rem;
    color: #475569;
    border-color: rgba(148, 163, 184, 0.2);
    background-color: rgba(255, 255, 255, 0.9);
}

.filter-toggle-button:hover,
.filter-toggle-button:focus {
    color: var(--text-primary);
    border-color: rgba(245, 191, 96, 0.3);
    background-color: rgba(255, 255, 255, 1);
}

.advanced-filter-panel {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--search-container-radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.9) 100%);
}

#advanced-filter-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 auto;
}

.advanced-filter-group {
    width: 250px;
    height: 46px;
}

.advanced-filter-label {
    background-color: rgba(248, 250, 252, 0.95);
    border-color: rgba(148, 163, 184, 0.18);
    min-width: 78px;
    justify-content: center;
    padding: 0.35rem 0.9rem;
    font-weight: 600;
    color: #475569;
    border-top-left-radius: var(--search-control-radius) !important;
    border-bottom-left-radius: var(--search-control-radius) !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.advanced-filter-input {
    padding: 0.5rem 0.75rem;
    border-color: rgba(148, 163, 184, 0.18);
    background-color: rgba(255, 255, 255, 0.98);
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: var(--search-control-radius) !important;
    border-bottom-right-radius: var(--search-control-radius) !important;
}

.advanced-filter-apply {
    height: 46px;
    min-width: 92px;
    padding: 0.5rem 1.1rem;
    font-weight: 600;
    border-radius: var(--search-control-radius);
}

.view-result-modal {
    border: none;
    border-radius: var(--search-container-radius);
    overflow: hidden;
    box-shadow: var(--shadow-float);
}

#viewResultModal.show {
    display: grid;
    align-content: start;
    justify-items: center;
    padding-top: 20vh;
}

#viewResultModal .modal-dialog,
#viewResultModal .modal-dialog.modal-dialog-centered {
    width: min(calc(100vw - 3rem), 520px);
    max-width: 520px;
    min-height: auto;
    margin: 0 auto;
    transform: none;
}

@media (max-width: 768px) {
    #viewResultModal.show {
        padding-top: 10vh;
    }
}

.view-result-modal .modal-header,
.view-result-modal .modal-footer {
    border-color: rgba(148, 163, 184, 0.14);
}

#statusBar {
    grid-area: status;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 44px;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #475569;
    background: transparent;
    border: 0;
    border-radius: var(--search-container-radius);
    text-align: left;
}

#statusBar .staged-control-button {
    min-height: 44px;
    margin-left: 0 !important;
    border-radius: var(--search-control-radius);
}

#loadMoreButton,
#continueSearchAtEnd,
#refineSearchAtEnd {
    min-height: 44px;
    border-radius: var(--search-control-radius);
}

#statusBar [data-stage-progress] {
    white-space: nowrap;
}

.view-result-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.view-result-actions .btn {
    border-radius: var(--search-control-radius);
}

.view-result-loading p {
    font-size: 0.95rem;
}

.view-result-field {
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--search-container-radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.view-result-label {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 6px;
    font-weight: 600;
}

.view-result-title {
    font-size: 1rem;
    color: #212529;
    word-break: break-word;
    line-height: 1.5;
}

.view-result-link {
    display: block;
    font-size: 0.95rem;
    line-height: 1.6;
    word-break: break-all;
    text-decoration: underline;
}

/* --- 搜索结果容器 --- */
#scrollableResults,
.home-resource-list {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at calc(100% + 42px) calc(100% + 56px),
            rgba(245, 191, 96, 0.11) 0%,
            rgba(245, 191, 96, 0.06) 18%,
            rgba(245, 191, 96, 0.025) 32%,
            transparent 46%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 252, 0.68));
    border: 1px solid rgba(148, 163, 184, 0.14);
    padding: 18px 20px;
    border-radius: var(--search-container-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    z-index: 1;
}

#scrollableResults>*,
.home-resource-list>* {
    position: relative;
    z-index: 1;
}

.result-end-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 0 28px;
}

.result-end-actions .btn {
    min-height: 44px;
}

.result-end-hint {
    color: #64748b;
}

.back-to-top-fab {
    position: fixed;
    right: max(24px, calc((100vw - 1240px) / 2 - 32px));
    top: 50vh;
    bottom: auto;
    z-index: 1040;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    color: #8a5c14;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(222, 159, 45, 0.36);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(-50%);
}

.result-item {
    min-height: 76px;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.result-title,
.result-url-line {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.result-title {
    display: block;
    height: 1.5em;
    font-size: 0.975rem;
    font-weight: 400;
    line-height: 1.5;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.result-observed-at {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.result-url-line {
    font-size: 0.86rem;
    color: #64748b;
    margin-top: 7px;
}

.result-url-line a {
    color: inherit;
    text-decoration: underline;
}

/* --- Hot 资源定制样式 --- */
.result-item.hot-result .result-title,
.result-item.hot-result .result-url-line a {
    font-size: 1rem;
    font-weight: 400;
}

.result-item.hot-result .result-title {
    color: #000 !important;
}

.result-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 14px;
}

.netdisk-badge {
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 999px;
    flex-shrink: 0;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: none;
    letter-spacing: 0.01em;
}

.result-divider {
    margin: 0;
    border-color: rgba(148, 163, 184, 0.22);
}

.result-actions .btn {
    flex: 0 0 auto;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: var(--search-control-radius) !important;
    font-size: 0.84rem;
    font-weight: 400 !important;
    white-space: nowrap;
    box-shadow: none !important;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.result-actions .view-button {
    position: relative;
    isolation: isolate;
    width: 72px;
    border-color: transparent !important;
    background: transparent !important;
    color: #334155 !important;
}

.result-actions .view-button::before {
    content: "";
    position: absolute;
    inset: 4px 0;
    z-index: 0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--search-control-radius);
    background: #fff;
}

.result-actions .view-button span {
    position: relative;
    z-index: 1;
}

.result-actions .acquire-button {
    position: relative;
    isolation: isolate;
    width: 104px;
    border-color: transparent !important;
    background: transparent !important;
    color: #5d3c03 !important;
    font-weight: 400 !important;
}

.result-actions .acquire-button::before {
    content: "";
    position: absolute;
    inset: 4px 0;
    z-index: 0;
    border: 1px solid #f5b942;
    border-radius: var(--search-control-radius);
    background: #f5b942;
}

.result-actions .acquire-button span {
    position: relative;
    z-index: 1;
}

.result-actions .result-action-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.result-actions .view-button:hover,
.result-actions .view-button:active {
    background: transparent !important;
    border-color: transparent !important;
}

.result-actions .view-button:hover::before,
.result-actions .view-button:active::before {
    background: #f8fafc;
    border-color: rgba(100, 116, 139, 0.34);
}

.result-actions .acquire-button:hover,
.result-actions .acquire-button:active {
    background: transparent !important;
    border-color: transparent !important;
}

.result-actions .acquire-button:hover::before,
.result-actions .acquire-button:active::before {
    background: #eeb64d;
    border-color: #eeb64d;
}

.result-actions .btn:focus-visible {
    outline: 2px solid rgba(180, 116, 22, 0.72);
    outline-offset: 1px;
}

.result-actions .btn:disabled,
.result-actions .btn[aria-disabled="true"] {
    color: #64748b !important;
    cursor: not-allowed;
    opacity: 0.58;
}

.login-shell {
    margin-top: 30px;
    min-height: calc(100vh - 240px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-panel {
    width: min(100%, 460px);
    padding: 34px;
    border-radius: 20px;
}

.login-copy {
    margin-bottom: 22px;
}

.login-title {
    margin: 16px 0 10px;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    text-align: left;
}

.login-description {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.75;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
}

.form-group input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    font-size: 0.98rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.96);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(245, 191, 96, 0.42);
    box-shadow: 0 0 0 4px rgba(245, 191, 96, 0.12);
}

.btn-login {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    background: linear-gradient(135deg, #f8ca72, #eeaf46);
    color: #1f2937;
    border: none;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(245, 191, 96, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 40px rgba(245, 191, 96, 0.34);
}

.error-message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(239, 68, 68, 0.16);
    border-radius: 16px;
    background: rgba(254, 242, 242, 0.88);
    color: #b91c1c;
    text-align: left;
    font-weight: 600;
}

/* 响应式调整 */
@media (min-width: 769px) {
    .filter-toolbar {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        grid-template-areas: "spacer status filter";
        gap: 0;
    }

    #statusBar {
        justify-self: center;
        justify-content: center;
        text-align: center;
    }

    .filter-toggle-button {
        justify-self: end;
    }

    #advanced-filter-bar {
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .advanced-filter-group {
        flex: 1 1 280px;
        max-width: 420px;
    }

    .advanced-filter-apply {
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .search-page-wrapper {
        padding-top: 14px;
    }

    .search-shell {
        border-radius: var(--search-container-radius);
    }

    .login-panel {
        border-radius: 24px;
    }

    .trend-cloud { --trend-stage-height: 100px; min-height: 0; padding: 10px 14px; border-radius: var(--search-container-radius); }
    .trend-cloud.is-compact { min-height: 0; padding: 12px 14px; }
    .trend-cloud-stage { min-height: 0; height: var(--trend-stage-height); }
    .trend-cloud-placeholder { min-height: var(--trend-stage-height); }
    .trend-cloud.is-compact .trend-cloud-placeholder { min-height: 0; }
    .trend-cloud[data-item-count="1"] { --trend-stage-height: 66px; }
    .trend-cloud[data-item-count="2"] { --trend-stage-height: 80px; }
    .trend-cloud[data-item-count="3"] { --trend-stage-height: 92px; }
    .trend-cloud.has-search-results { --trend-stage-height: 44px; margin-bottom: -4px; padding: 5px 12px; }
    .trend-cloud-word { min-height: 44px; padding: 6px 9px; font-size: .74rem; }

    .search-layout {
        gap: 16px;
    }

    .search-hero {
        padding-top: 0;
    }

    .search-hero-image {
        width: min(100%, 280px);
    }

    .input-group-custom {
        width: 100%;
        border-radius: var(--search-container-radius);
        padding: 8px;
    }

    #searchInput,
    #searchButton {
        height: 50px;
    }

    #searchButton {
        width: 50px;
    }

    .result-count {
        text-align: left;
        white-space: normal;
        word-break: break-word;
        line-height: 1.5;
    }

    .filter-toolbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "status status status"
            "spacer continue filter";
        column-gap: 8px;
        row-gap: 8px;
        align-items: center;
    }

    #statusBar {
        display: contents;
    }

    #statusBar [data-stage-progress] {
        grid-area: status;
        justify-self: center;
        white-space: normal;
        text-align: center;
    }

    #statusBar .staged-control-button {
        grid-area: continue;
        justify-self: end;
    }

    .filter-toggle-button {
        justify-self: end;
    }

    .filter-toggle-button {
        padding: 0.42rem 0.78rem;
        font-size: 0.88rem;
    }

    #advanced-filter-bar {
        width: 100%;
        justify-content: stretch;
    }

    .advanced-filter-group {
        width: 100%;
        height: auto;
    }

    .advanced-filter-label {
        min-width: 72px;
    }

    .advanced-filter-input {
        min-height: 38px;
    }

    .advanced-filter-apply {
        width: 100%;
        min-height: 38px;
    }

    .advanced-filter-panel {
        padding: 10px;
        border-radius: var(--search-container-radius);
    }

    #scrollableResults,
    .home-resource-list {
        padding: 16px 12px;
        border-radius: var(--search-container-radius);
    }

    .result-item {
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        min-height: 76px;
        padding: 12px 0;
    }

    .result-info {
        flex: 0 0 100%;
        width: 100%;
    }

    .result-title {
        height: 1.5em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: normal;
    }

    .result-actions {
        flex: 0 0 auto;
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }

    .result-actions .btn {
        min-width: 0;
        height: 44px;
        min-height: 44px;
        padding-inline: 4px;
        font-size: 13px;
    }

    .result-actions .view-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 112px;
        color: #9a570d !important;
    }

    .result-actions .view-button::before {
        border-color: #f0dec6;
        background: #fff4e6;
    }

    .result-actions .acquire-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 142px;
        color: #9a570d !important;
    }

    .result-actions .acquire-button::before {
        border-color: #f0dec6;
        background: #fff4e6;
    }

    .result-actions .view-button:hover::before,
    .result-actions .view-button:active::before,
    .result-actions .acquire-button:hover::before,
    .result-actions .acquire-button:active::before {
        border-color: #e8cda9;
        background: #fbe8cf;
    }

    /* The home page is browsed as a compact feed on phones.  Keep each
       resource self-contained without reserving a blank second title line. */
    .home-resource-list {
        display: grid;
        gap: 10px;
        border-color: #eee3d7;
        background: #f7f2ec;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    }

    .home-resource-list .result-item {
        align-items: stretch;
        gap: 12px;
        min-height: 0;
        padding: 14px;
        border: 1px solid #ece2d6;
        border-radius: 14px;
        background: #fffdfa;
        box-shadow: 0 4px 14px rgba(92, 65, 38, 0.07);
    }

    .home-resource-list .result-info {
        flex: 0 0 auto;
    }

    .home-resource-list .result-title {
        display: -webkit-box;
        height: auto;
        overflow: hidden;
        color: #1f2937;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.45;
        white-space: normal;
        text-overflow: clip;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .home-resource-list .result-actions {
        display: grid;
        grid-template-columns: auto minmax(0, 1.05fr) minmax(0, 1.2fr);
        width: 100%;
        gap: 8px;
        align-items: center;
    }

    .home-resource-list .result-actions .btn,
    .home-resource-list .result-actions .view-button,
    .home-resource-list .result-actions .acquire-button {
        width: 100%;
        height: 38px;
        min-height: 38px;
    }

    .home-resource-list .result-actions .view-button::before,
    .home-resource-list .result-actions .acquire-button::before {
        inset: 0;
    }

    .home-resource-list .result-actions .view-button,
    .home-resource-list .result-actions .acquire-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        color: #9a570d !important;
    }

    .home-resource-list .result-actions .view-button,
    .home-resource-list .result-actions .acquire-button,
    .home-resource-list .result-actions .view-button::before,
    .home-resource-list .result-actions .acquire-button::before {
        border-radius: 8px !important;
    }

    .home-resource-list .result-actions .acquire-button::before {
        border-color: #f0dec6;
        background: #fff4e6;
    }

    .home-resource-list .result-actions .view-button::before {
        border-color: #f0dec6;
        background: #fff4e6;
    }

    .home-resource-list .result-actions .view-button:hover::before,
    .home-resource-list .result-actions .view-button:active::before,
    .home-resource-list .result-actions .acquire-button:hover::before,
    .home-resource-list .result-actions .acquire-button:active::before {
        border-color: #e8cda9;
        background: #fbe8cf;
    }

    .home-resource-section h2 {
        display: flex;
        align-items: center;
        color: #2f2923;
        font-weight: 700;
    }

    .home-resource-section h2::before {
        content: "";
        width: 4px;
        height: 16px;
        margin-right: 8px;
        border-radius: 2px;
        background: #e2a24e;
    }

    .home-resource-list .result-divider {
        display: none;
    }

    .back-to-top-fab {
        right: max(16px, env(safe-area-inset-right));
        top: auto;
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 48px;
        height: 48px;
        transform: none;
    }

    .staged-control-button,
    #loadMoreButton,
    .filter-btn,
    .filter-toggle-button,
    .advanced-filter-apply {
        min-height: 44px;
    }

    #viewResultModal.show {
        display: block;
        padding: 0;
    }

    #viewResultModal .modal-dialog,
    #viewResultModal .modal-dialog.modal-dialog-centered {
        width: 100vw;
        max-width: none;
        height: 100dvh;
        margin: 0;
    }

    .view-result-modal {
        height: 100dvh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .view-result-modal .modal-body {
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .view-result-actions {
        position: sticky;
        bottom: 0;
        padding: 12px 0 2px;
        background: #fff;
    }

    .view-result-actions .btn,
    .snapshot-folder-toggle,
    .snapshot-more-button {
        min-height: 44px;
    }

    .login-shell {
        min-height: auto;
        padding-top: 24px;
    }

    .login-panel {
        padding: 24px 20px;
    }

    .login-title {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .container-fluid-custom {
        padding: 0 12px;
    }

    #netdisk-filter-bar {
        gap: 8px;
        margin-bottom: 0;
    }

    .filter-btn {
        min-height: 44px;
        padding: 6px 14px;
        font-size: 0.82rem;
    }

    #scrollableResults,
    .home-resource-list {
        padding: 16px 12px;
    }


    .hero-title {
        font-size: 1.75rem;
    }

    .search-shell-title {
        font-size: 1.75rem;
    }

    .result-title {
        font-size: 14px;
    }

    .result-item.hot-result .result-title {
        font-size: 14px;
    }

    .result-url-line {
        font-size: 0.82rem;
    }

    .netdisk-badge {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
}

/* Landscape phones are short but often wider than the normal handset
   breakpoint.  Remove decorative space so search, drive choice and the
   trend preview remain available without a forced scroll. */
@media (max-width: 900px) and (max-height: 500px) {
    .search-page-wrapper {
        padding-top: 8px;
    }

    .search-layout {
        gap: 16px;
    }

    .search-hero {
        display: none;
    }

    .trend-cloud {
        --trend-stage-height: 82px;
        min-height: 0;
        padding: 10px 14px;
    }
}
.snapshot-list {
    margin: 0;
    padding-left: 1.1rem;
    list-style: none;
}

.snapshot-entry {
    margin: 0.45rem 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.snapshot-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 0.8rem;
}

.snapshot-scroll {
    max-height: min(52vh, 480px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2px 8px 2px 0;
    scrollbar-gutter: stable;
}

.snapshot-folder-toggle,
.snapshot-more-button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.snapshot-folder-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 5px 6px;
    border-radius: var(--search-control-radius);
    text-align: left;
}

.snapshot-folder-toggle:hover,
.snapshot-folder-toggle:focus-visible {
    background: rgba(245, 191, 96, 0.12);
    outline: none;
}

.snapshot-caret {
    width: 12px;
    color: #94a3b8;
    font-size: 0.68rem;
    flex: 0 0 auto;
}

.snapshot-item-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.snapshot-folder-count {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.75rem;
    white-space: nowrap;
}

.snapshot-file-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 4px 6px 4px 25px;
}

.snapshot-children {
    margin-left: 1.25rem;
    padding-left: 0.45rem;
    border-left: 2px solid #e7ebf2;
}

.snapshot-more-row {
    margin: 0.5rem 0 0;
    list-style: none;
}

.snapshot-more-button {
    padding: 6px 10px;
    color: #b7791f;
    font-weight: 600;
    border-radius: var(--search-control-radius);
    background: rgba(245, 191, 96, 0.12);
}

.snapshot-more-button:hover,
.snapshot-more-button:focus-visible {
    background: rgba(245, 191, 96, 0.2);
    outline: none;
}

.snapshot-notice {
    margin: 1rem 0 0;
    color: #6c757d;
    font-size: 0.86rem;
}

.submit-resource-open {
    color: #63758c;
    text-decoration: none;
}

.submit-resource-open:hover {
    color: #3978e6;
    text-decoration: underline;
}

/* Search-result cards: platform identity, real preview metadata and clear actions. */
#scrollableResults {
    border-color: #eee3d7;
    background: #f7f2ec;
}

.search-result-wrapper + .search-result-wrapper {
    margin-top: 10px;
}

.search-result-card {
    --result-accent: #7a6654;
    --result-soft: #f5f1ed;
    --result-border: #ded5cc;
    position: relative;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    min-height: 0;
    padding: 16px;
    border: 1px solid #ece2d8;
    border-radius: 16px;
    background: #fffdfa;
    box-shadow: 0 4px 14px rgba(92, 65, 38, 0.07);
}

.search-result-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--result-accent);
}

.search-result-card.result-platform-baidu {
    --result-accent: #3976d3;
    --result-soft: #edf4ff;
    --result-border: #b9d0f3;
}

.search-result-card.result-platform-quark {
    --result-accent: #dc8414;
    --result-soft: #fff4df;
    --result-border: #f0cf9e;
}

.search-result-card.result-platform-uc {
    --result-accent: #8b58b5;
    --result-soft: #f7effd;
    --result-border: #d8bee9;
}

.search-result-card.result-platform-mobile {
    --result-accent: #299369;
    --result-soft: #eaf8f1;
    --result-border: #b3ddca;
}

.search-result-card.result-platform-xunlei {
    --result-accent: #247e92;
    --result-soft: #eaf7fa;
    --result-border: #add8e1;
}

.result-platform-row {
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.result-platform-badge,
.result-preview-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.result-platform-badge {
    padding: 5px 8px;
    border-radius: 8px;
    color: var(--result-accent);
    background: var(--result-soft);
    font-size: 0.78rem;
    font-weight: 600;
}

.result-platform-icon,
.result-preview-status svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.result-preview-status {
    color: #746f69;
    font-size: 0.76rem;
    white-space: nowrap;
}

.result-preview-status svg {
    width: 14px;
    height: 14px;
}

.search-result-card .result-info {
    margin-top: 2px;
}

.search-result-card .result-title {
    display: -webkit-box;
    height: auto;
    overflow: hidden;
    color: #20242b;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: normal;
    text-overflow: clip;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.result-title-keyword {
    padding: 0;
    color: #df3030;
    background: transparent;
}

.search-result-card .result-actions {
    margin-left: auto;
}

.search-result-card .result-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.search-result-card .result-actions .view-button {
    width: 112px;
    color: #a75e0d !important;
}

.search-result-card .result-actions .view-button::before {
    border-color: #edcfab;
    background: #fff4e7;
}

.search-result-card .result-actions .acquire-button {
    width: 142px;
    color: var(--result-accent) !important;
}

.search-result-card .result-actions .acquire-button::before {
    border-color: var(--result-border);
    background: var(--result-soft);
}

.search-result-card .result-actions .view-button:hover::before,
.search-result-card .result-actions .view-button:active::before {
    border-color: #e4b981;
    background: #fce9d0;
}

.search-result-card .result-actions .acquire-button:hover::before,
.search-result-card .result-actions .acquire-button:active::before {
    border-color: var(--result-accent);
    background: var(--result-soft);
}

.result-acquire-platform {
    padding: 2px 5px;
    border-radius: 5px;
    color: #fff;
    background: var(--result-accent);
    font-size: 0.74rem;
    line-height: 1.2;
}

.result-inline-preview {
    flex: 0 0 100%;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: var(--result-soft);
}

.result-inline-head,
.result-inline-head > span,
.result-inline-note,
.result-inline-loading {
    display: flex;
    align-items: center;
}

.result-inline-head {
    justify-content: space-between;
    gap: 10px;
    color: #68645f;
    font-size: 0.8rem;
}

.result-inline-head > span,
.result-inline-note,
.result-inline-loading {
    gap: 5px;
}

.result-inline-head svg,
.result-inline-note svg,
.result-inline-file > svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.result-inline-files {
    margin: 8px 0;
    padding: 0;
    list-style: none;
}

.result-inline-file {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(91, 107, 128, 0.18);
    color: #334155;
    font-size: 0.82rem;
}

.result-inline-file:last-child {
    border-bottom: 0;
}

.result-inline-file > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-inline-file small {
    color: #78736d;
    white-space: nowrap;
}

.result-file-folder > svg { color: #d08016; }
.result-file-video > svg { color: #8957b2; }
.result-file-image > svg { color: #d34968; }
.result-file-archive > svg,
.result-file-sheet > svg { color: #29946a; }
.result-file-document > svg { color: #3276d5; }

.result-content-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.result-content-tag {
    padding: 3px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: #fffdfa;
    font-size: 0.72rem;
}

.result-content-tag-1 { color: #3276d5; }
.result-content-tag-2 { color: #29946a; }
.result-content-tag-3 { color: #d08016; }

.result-inline-note {
    margin: 9px 0 0;
    color: #746f69;
    font-size: 0.74rem;
}

.result-inline-loading,
.result-inline-error,
.result-inline-empty {
    min-height: 42px;
    margin: 0;
    color: #746f69;
    font-size: 0.8rem;
}

.result-inline-error {
    display: flex;
    align-items: center;
    color: #a64040;
}

.result-inline-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ead8c1;
    border-top-color: #d08016;
    border-radius: 50%;
    animation: result-inline-spin 700ms linear infinite;
}

@keyframes result-inline-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .result-inline-spinner { animation: none; }
}

@media (max-width: 768px) {
    .search-result-card {
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }

    .search-result-card .result-info {
        flex: 0 0 100%;
        margin-top: 0;
    }

    .search-result-card .result-title,
    .search-result-card.hot-result .result-title {
        height: auto;
        color: #20242b !important;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.45;
        white-space: normal;
        text-overflow: clip;
        -webkit-line-clamp: 2;
    }

    .search-result-card .result-actions {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        width: 100%;
        margin-left: 0;
        gap: 8px;
    }

    .search-result-card .result-actions .view-button,
    .search-result-card .result-actions .acquire-button {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .result-preview-status {
        display: none;
    }

    .search-result-card .result-actions {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .result-acquire-platform {
        padding-inline: 4px;
    }
}
