/* --- 搜索栏 --- */
.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;
    justify-content: center;
    margin-bottom: 0;
}

/* --- 分类展示区域 --- */
.categories-section {
    margin-top: 24px;
    margin-bottom: 8px;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 0 20px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    text-decoration: none;
    transition: all 0.25s ease;
    min-width: 90px;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(245, 191, 96, 0.35);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 191, 96, 0.12);
    border-radius: 14px;
    color: #f5bf60;
    font-size: 1.3rem;
    transition: all 0.25s ease;
}

.category-card:hover .category-icon-wrapper {
    background: rgba(245, 191, 96, 0.2);
    transform: scale(1.08);
}

.category-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    transition: color 0.25s ease;
}

.category-card:hover .category-name {
    color: #0f172a;
}

.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-item.saved-result {
    background: linear-gradient(135deg, rgba(245, 191, 96, 0.08) 0%, rgba(254, 243, 199, 0.15) 100%);
    border: 2px solid rgba(245, 191, 96, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(245, 191, 96, 0.15);
}

.result-item.saved-result .result-title {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #b7791f !important;
}

/* 已保存资源徽章 */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@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;
    }
}

/* --- 分类资源卡片网格 (上图下标题) --- */
.category-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

.category-resource-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.category-resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    border-color: rgba(245, 191, 96, 0.3);
}

.category-resource-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(245, 191, 96, 0.08), rgba(148, 163, 184, 0.08));
    overflow: hidden;
    position: relative;
}

.category-resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-resource-card:hover .category-resource-image img {
    transform: scale(1.05);
}

.category-resource-image .placeholder-icon {
    font-size: 2.5rem;
    color: rgba(148, 163, 184, 0.4);
}

.category-resource-info {
    width: 100%;
    padding: 10px 12px;
    text-align: center;
}

.category-resource-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* 分类区域样式 */
.category-section {
    margin-top: 24px;
    margin-bottom: 8px;
}

.category-container {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    padding: 20px;
}

.category-header {
    margin-bottom: 16px;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-title i {
    color: #f5bf60;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tab {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-tab:hover {
    border-color: rgba(245, 191, 96, 0.4);
    color: #0f172a;
}

.category-tab.active {
    background: rgba(245, 191, 96, 0.15);
    border-color: rgba(245, 191, 96, 0.4);
    color: #b7791f;
}

.category-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.category-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: rgba(148, 163, 184, 0.5);
}

/* 外部数据源资源样式 */
.category-resource-card.external-source {
    border: 1px solid rgba(245, 191, 96, 0.3);
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.3) 0%, rgba(254, 243, 199, 0.15) 100%);
}

.category-resource-card.external-source:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 191, 96, 0.25);
    border-color: rgba(245, 191, 96, 0.5);
}

.category-resource-image {
    position: relative;
}

.external-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    z-index: 10;
}

.ranking {
    font-size: 0.75rem;
    color: #dc2626;
    font-weight: 600;
    margin-top: 4px;
}

.hot-score {
    font-size: 0.7rem;
    color: #ea580c;
    font-weight: 500;
    margin-top: 2px;
}

/* ========== 资源详情弹窗样式 ========== */
.resource-detail-modal {
    border-radius: 16px;
    overflow: hidden;
    background: white !important;
}

/* 确保弹窗居中显示 */
#resourceDetailModal .modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 3rem);
}

#resourceDetailModal .modal-dialog-centered {
    align-items: center;
}

.resource-detail-modal .modal-header {
    background: linear-gradient(135deg, #d0d8e8 0%, #c5cee0 100%);
    color: #1e293b;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.resource-detail-modal .modal-header .modal-title,
.resource-detail-modal .modal-header i {
    color: #1e293b !important;
}

.resource-detail-modal .modal-header .btn-close {
    filter: none;
    opacity: 0.6;
}

.resource-detail-modal .modal-header .btn-close:hover {
    opacity: 1;
}

.resource-detail-modal .modal-body {
    padding: 1.5rem;
    background: white !important;
    color: #000000 !important;
}

.resource-detail-grid {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 2rem;
}

.resource-info-section {
    display: flex;
    flex-direction: column;
}

.resource-field {
    margin-bottom: 1rem;
}

.field-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8 !important;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-value.resource-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #000000 !important;
    line-height: 1.4;
    word-break: break-word;
}

.link-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.link-container .form-control {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #000000 !important;
    font-size: 0.85rem;
}

/* 复制按钮 */
#copyResourceLinkBtn,
.link-container .btn-outline-primary {
    background: linear-gradient(135deg, #f8ca72, #eeaf46) !important;
    border: none !important;
    color: #1f2937 !important;
    font-weight: 600 !important;
    box-shadow: 0 8px 20px rgba(245, 191, 96, 0.25) !important;
    transition: all 0.2s ease;
}

#copyResourceLinkBtn:hover,
.link-container .btn-outline-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 28px rgba(245, 191, 96, 0.35) !important;
    background: linear-gradient(135deg, #f5bf60, #dd9f31) !important;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 120px;
    color: #1f2937 !important;
}

/* 尝试转存按钮 - 橙黄色渐变 */
.action-buttons .btn-primary,
#transferBtn {
    background: linear-gradient(135deg, #f8ca72, #eeaf46) !important;
    border: none !important;
    box-shadow: 0 16px 34px rgba(245, 191, 96, 0.28) !important;
    font-weight: 700 !important;
    transition: all 0.2s ease;
}

.action-buttons .btn-primary:hover,
#transferBtn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 20px 40px rgba(245, 191, 96, 0.34) !important;
    background: linear-gradient(135deg, #f5bf60, #dd9f31) !important;
}

/* 直接访问按钮 - 绿色 */
.action-buttons .btn-success,
#directShareBtn {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.25) !important;
    transition: all 0.2s ease;
}

.action-buttons .btn-success:hover,
#directShareBtn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.35) !important;
}

.qrcode-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #000000 !important;
}

.qrcode-container {
    text-align: center;
    color: #000000 !important;
}

.qrcode-placeholder {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#qrcodeImage {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.qrcode-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    background: #ffffff !important;
    border-radius: 8px;
    color: #000000 !important;
}

/* 获取资源按钮样式 - 与尝试转存按钮同款 */
.resource-get-btn {
    background: linear-gradient(135deg, #f8ca72, #eeaf46) !important;
    color: #1f2937 !important;
    border: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 16px 34px rgba(245, 191, 96, 0.28) !important;
    font-weight: 700 !important;
}

.resource-get-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 20px 40px rgba(245, 191, 96, 0.34) !important;
    background: linear-gradient(135deg, #f5bf60, #dd9f31) !important;
    color: #1f2937 !important;
}

.resource-get-btn:active {
    transform: translateY(0) !important;
}

.resource-get-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* 加载状态文字样式 */
#resourceLoadingState p,
#resourceContentState p {
    color: #000000 !important;
}

#resourceLoadingState .text-muted {
    color: #000000 !important;
}

/* 搜索结果项简化样式（移除链接后） */
.result-item .result-info {
    flex: 1;
    min-width: 0;
}

.result-item .result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .resource-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .qrcode-section {
        order: -1;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }
}

/* ========== 弹窗全局黑色文字样式 ========== */
.resource-detail-modal * {
    color: #000000 !important;
}

.resource-detail-modal .modal-header *,
.resource-detail-modal .modal-header {
    color: #ffffff !important;
}

.resource-detail-modal .btn-primary,
.resource-detail-modal .btn-success,
.resource-detail-modal .resource-get-btn {
    color: #1f2937 !important;
}

.resource-detail-modal input[type="text"] {
    color: #000000 !important;
}

.resource-detail-modal label.field-label {
    color: #94a3b8 !important;
}

.resource-detail-modal .field-value {
    color: #000000 !important;
}