/* --- 搜索栏 --- */
.search-page-wrapper {
    padding-top: 18px;
}

.search-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.search-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 8px;
}

.search-hero-image {
    display: block;
    width: min(100%, 480px);
    height: auto;
    object-fit: contain;
}

.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: hidden;
    padding: 28px;
    border-radius: var(--radius-2xl);
}

.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;
    margin-bottom: 0;
    width: 100%;
}

.input-group-custom {
    width: min(70%, 1080px);
    margin: 0;
    padding: 10px;
    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: 24px;
    overflow: hidden;
}

#searchInput {
    height: 58px;
    border: none;
    background: transparent;
    font-size: 1rem;
    padding-left: 18px;
    color: var(--text-primary);
}

#searchInput:focus {
    box-shadow: none;
    background: transparent;
}

#searchButton {
    width: 58px;
    font-weight: 600;
    background: linear-gradient(135deg, #f8ca72, #eeaf46);
    border: none;
    color: #1f2937;
    padding: 0;
    height: 58px;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
    box-shadow: 0 14px 30px rgba(245, 191, 96, 0.3);
    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 i {
    animation: fly-animate 0.8s ease-in-out infinite;
}

#searchButton.searching {
    background: linear-gradient(135deg, #f5bf60, #dd9f31);
}

#searchButton:hover:not(.searching) {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(245, 191, 96, 0.36);
}

#searchButton i {
    font-size: 1.1rem;
    /* 稍微调大一点点更有力量感 */
    color: #4A3728;
    /* 这里替换成我上面建议的颜色，比如深棕色 */
    transition: color 0.3s ease;
}

#searchButton:hover i {
    color: #ffffff;
}

/* --- 结果区网盘徽章颜色（弱化显示，不与主按钮竞争） --- */
.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;
}

/* --- 初始提示区域 --- */
.initial-prompt-area {
    padding-top: 64px;
    padding-bottom: 64px;
    color: var(--text-secondary);
}

.initial-icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(245, 191, 96, 0.16), rgba(247, 222, 164, 0.38));
    border: 1px solid rgba(148, 163, 184, 0.18);
    margin-bottom: 18px;
}

.initial-icon-wrapper i {
    font-size: 1.75rem;
    /* color: var(--brand); */
    color: #b7791f;
}

.initial-prompt-area h3 {
    font-size: 1.05rem;
    font-weight: 600;
    /* color: var(--text-secondary) !important; */
    color: #64748b !important;
}


/* --- 网盘过滤栏 --- */
#netdisk-filter-bar {
    padding: 4px 0 14px;
    margin-bottom: 14px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#netdisk-filter-bar::-webkit-scrollbar {
    display: 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);
}

.filter-and-count-container {
    gap: 16px;
    margin-bottom: 20px;
}

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

.result-count {
    flex: 0 0 auto;
    color: #334155;
    font-size: 0.94rem;
    font-weight: 600;
}

.filter-toggle-button {
    flex: 0 0 auto;
    border-radius: 999px;
    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: 20px;
    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: 14px !important;
    border-bottom-left-radius: 14px !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: 14px !important;
    border-bottom-right-radius: 14px !important;
}

.advanced-filter-apply {
    height: 46px;
    min-width: 92px;
    padding: 0.5rem 1.1rem;
    font-weight: 600;
}

.view-result-modal {
    border: none;
    border-radius: 24px;
    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);
}

.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: 18px;
    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 {
    position: relative;
    max-height: 80vh;
    overflow-y: hidden;
    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: 0 24px;
    border-radius: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    z-index: 1;
}

#scrollableResults>* {
    position: relative;
    z-index: 1;
}

.result-item {
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.result-info {
    flex-grow: 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 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.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: 700;
}

.result-item.hot-result .result-title {
    color: #000 !important;
}

.result-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 10px;
    gap: 10px;
}

.netdisk-badge {
    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.14);
}



.copy-button,
.view-button {
    min-width: 84px;
    min-height: 38px;
    border-radius: 999px !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #334155 !important;
    font-weight: 600 !important;
}

.copy-button:hover,
.view-button:hover {
    border-color: rgba(245, 191, 96, 0.3) !important;
    color: #b7791f !important;
    background: rgba(245, 191, 96, 0.12) !important;
}

.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 {
        justify-content: space-between;
    }

    #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,
    .login-panel {
        border-radius: 24px;
    }

    .search-shell {
        padding-left: 20px;
        padding-right: 20px;
    }

    .search-layout {
        gap: 14px;
    }

    .search-hero {
        padding-top: 0;
    }

    .search-hero-image {
        width: min(100%, 280px);
    }

    .input-group-custom {
        width: 100%;
        border-radius: 18px;
        padding: 8px;
    }

    #searchInput,
    #searchButton {
        height: 50px;
    }

    .result-count {
        text-align: left;
        white-space: normal;
        word-break: break-word;
        line-height: 1.5;
    }

    .filter-toolbar {
        align-items: center;
    }

    .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: 14px;
    }

    #scrollableResults {
        padding: 0 16px;
        border-radius: 18px;
    }

    .result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 0;
    }

    .result-info {
        width: 100%;
    }

    .result-title,
    .result-url-line {
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        word-break: break-word;
    }

    .result-actions {
        width: 100%;
        margin-left: 0;
        margin-top: 0;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .result-actions .btn {
        min-width: 84px;
    }

    .login-shell {
        min-height: auto;
        padding-top: 24px;
    }

    .login-panel {
        padding: 24px 20px;
    }

    .login-title {
        font-size: 1.7rem;
    }
}

/* --- 热搜区域样式 --- */
.hot-search-container {
    width: min(70%, 1080px);
    margin-top: 16px;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.hot-search-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.hot-search-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
}

.hot-search-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hot-search-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(248, 250, 252, 0.95);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.hot-search-item:hover {
    background: rgba(245, 191, 96, 0.12);
    border-color: rgba(245, 191, 96, 0.2);
    transform: translateY(-1px);
}

.hot-search-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    min-width: 18px;
    text-align: center;
}

.hot-search-rank.rank-first {
    color: #ef4444;
}

.hot-search-rank.rank-second {
    color: #f97316;
}

.hot-search-rank.rank-third {
    color: #eab308;
}

.hot-search-keyword {
    font-size: 0.88rem;
    color: #334155;
    font-weight: 600;
}

.hot-search-count {
    font-size: 0.72rem;
    color: #94a3b8;
    padding-left: 4px;
}

.search-query-badge {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hot-search-container {
        width: 100%;
        padding: 12px 16px;
        border-radius: 14px;
    }

    .hot-search-title {
        font-size: 0.88rem;
    }

    .hot-search-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .hot-search-item {
        padding: 6px 10px;
        justify-content: flex-start;
    }

    .hot-search-keyword {
        font-size: 0.82rem;
    }

    .hot-search-count {
        font-size: 0.66rem;
    }
}

@media (max-width: 480px) {
    .container-fluid-custom {
        padding: 0 12px;
    }

    #netdisk-filter-bar {
        gap: 8px;
        margin-bottom: 12px;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 0.82rem;
    }

    #scrollableResults {
        padding: 0 12px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .search-shell-title {
        font-size: 1.75rem;
    }

    .result-title {
        font-size: 0.98rem;
    }

    .result-url-line {
        font-size: 0.82rem;
    }

    .netdisk-badge {
        font-size: 0.72rem;
        padding: 4px 9px;
    }

    .hot-search-container {
        padding: 10px 14px;
    }

    .hot-search-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .hot-search-item {
        padding: 5px 8px;
        justify-content: flex-start;
    }

    .hot-search-keyword {
        font-size: 0.78rem;
    }

    .hot-search-count {
        font-size: 0.62rem;
    }

    .hot-search-rank {
        font-size: 0.68rem;
        min-width: 14px;
    }
}