/* 网盘搜索页 — 主题变量均带 fallback，兼容无 OneNav 变量的旧主题 */

/* 边框色：日间跟随 --muted-bg-color；旧版夜间 io-black-mode 固定 #3d3d3d */
.io-black-mode {
    --sps-border-color: #3d3d3d;
}

/* 圆角：外层 --theme-border-radius（默认 12），内层 --theme-border-radius-lg（外层 − 2） */
/* 主题色：旧版真实色为 --mainColor（虽也有 --theme-color 但不可用）；新版多为 --theme-color */
.page-template-cloud-search-template-php,
.sps-app-container,
.sps-modal-overlay,
.sps-link-modal-overlay {
    --sps-radius: var(--theme-border-radius, 12px);
    --sps-radius-md: var(--theme-border-radius-lg, calc(var(--sps-radius) - 2px));
    --sps-theme: var(--mainColor, var(--theme-color, #0f766e));
    --sps-theme-hover: var(--hover-color, var(--sps-theme));
}


.sps-content-layout {
    padding: 0;
}

.sps-app-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 0;
}

/* 页脚贴底：主内容链 flex 撑满，避免资源少时 footer 上方大块留白 */
.page-template-cloud-search-template-php {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-template-cloud-search-template-php .sps-app-container,
.page-template-cloud-search-template-php .sps-page.active,
.page-template-cloud-search-template-php .sps-main,
.page-template-cloud-search-template-php .content-wrap,
.page-template-cloud-search-template-php .sps-content-layout {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

/* 内容与主题页脚的统一留白（勿在各 stack 再叠 padding-bottom） */
.page-template-cloud-search-template-php .sps-main {
    padding-bottom: 20px;
}

.page-template-cloud-search-template-php #sps-search-page.active .sps-home-stack,
.page-template-cloud-search-template-php #sps-cloud-search-results-page.active .sps-content-wrapper,
.page-template-cloud-search-template-php #sps-ranking-page.active .sps-content-wrapper,
.page-template-cloud-search-template-php #sps-top250-page.active .sps-content-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.page-template-cloud-search-template-php #sps-cloud-search-results-page .sps-results-grid-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.page-template-cloud-search-template-php #sps-cloud-search-results-page .sps-cloud-search-results-container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.page-template-cloud-search-template-php #sps-cloud-search-results-page .sps-tab-panel.active {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.page-template-cloud-search-template-php .main-footer.footer-stick {
    flex-shrink: 0;
    margin-top: auto !important;
}

/* 通用内容包裹容器 */
.sps-content-wrapper {
    width: 100%;
    max-width: var(--main-max-width, 1400px);
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    box-sizing: border-box;
}

.full-container .sps-content-wrapper {
    max-width: var(--home-max-width, 1400px);
}

/* 通用页面样式 */
.sps-page {
    display: none;
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

.sps-page.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.page-template-cloud-search-template-php .sps-page.active {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =================================
   全屏模态提示框
   ================================= */
.sps-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    backdrop-filter: saturate(2) blur(10px);
}

.sps-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sps-modal-content {
    text-align: center;
    max-width: 90%;
    width: 400px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.sps-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--main-color);
}

.sps-modal-message {
    color: var(--muted-color2, #4b5563);
    margin-bottom: 30px;
    line-height: 1.6;
}

.sps-modal-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid color-mix(in srgb, var(--sps-theme) 20%, transparent);
    border-radius: 50%;
    border-top-color: var(--sps-theme);
    animation: sps-spin 1s linear infinite;
    margin-bottom: 20px;
}

/* =================================
   搜索页 (Search Page)
   ================================= */
.sps-search-module {
    position: relative;
    z-index: 6;
    width: 100%;
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.sps-search-hero-section {
    position: relative;
    width: 100%;
    margin-top: calc(0px - var(--main-nav-hight, 0px));
    padding: calc(80px + var(--main-nav-hight, 0px)) 20px 80px;
    box-sizing: border-box;
    background-color: #0f172a;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    text-align: center;
    overflow: visible;
}

.sps-search-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.45));
    pointer-events: none;
}

.sps-search-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.sps-home-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 30px;
}

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

.sps-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #fff;
}

.sps-hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin: 0 0 2rem;
    color: rgba(255, 255, 255, 0.92);
}

.sps-search-form {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    z-index: 5;
}

.sps-search-shell {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 8px;
    box-sizing: border-box;
    background: var(--main-bg-color, #ffffff);
    border-radius: var(--sps-radius);
    box-shadow: 0 4px 12px var(--main-shadow, rgba(15, 23, 42, 0.1));
}

.sps-search-input-wrapper {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: var(--sps-radius-md);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.sps-search-input-wrapper:focus-within {
    border-color: var(--sps-theme);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sps-theme) 10%, transparent);
}

.sps-search-input-icon {
    flex: 0 0 auto;
    display: block;
    width: 22px;
    height: 22px;
    color: var(--muted-color, #6b7280);
    pointer-events: none;
}

.sps-search-input-wrapper > input[type="search"] {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    color: var(--main-color);
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
}

#sps-search-button {
    flex: 0 0 auto;
    padding: 0 1.5rem;
    height: 48px;
    font-size: 1rem;
    font-weight: 500;
    background-color: var(--sps-theme);
    color: #fff;
    border: none;
    border-radius: var(--sps-radius-md);
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    white-space: nowrap;
}

#sps-search-button:hover {
    background-color: var(--sps-theme-hover);
}

/* 最近搜索：挂在整个表单下，宽度与 sps-search-form 对齐 */
.sps-recent-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 50;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    text-align: left;
    background: var(--main-bg-color, #ffffff);
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    border-radius: var(--sps-radius);
    box-shadow: 0 8px 24px var(--main-shadow, rgba(15, 23, 42, 0.1));
}

.sps-recent-dropdown[hidden] {
    display: none !important;
}

.sps-recent-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
    padding: 2px 6px;
}

.sps-recent-dropdown-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-color, #6b7280);
    line-height: 1;
}

.sps-recent-clear {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 12px;
    color: var(--muted-color, #6b7280);
    cursor: pointer;
    line-height: 1;
}

.sps-recent-clear:hover {
    color: var(--sps-theme);
}

.sps-recent-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
}

.sps-recent-dropdown-item {
    appearance: none;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--sps-radius-md);
    background: transparent;
    color: var(--main-color);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sps-recent-dropdown-item:hover {
    background: color-mix(in srgb, var(--sps-theme) 8%, transparent);
    color: var(--sps-theme);
}

.sps-recent-dropdown-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sps-recent-dropdown-empty {
    margin: 0;
    padding: 10px 4px;
    font-size: 12px;
    color: var(--muted-color, #6b7280);
    text-align: center;
}

.sps-recent-dropdown-empty[hidden] {
    display: none !important;
}

/* 全站热门搜索（用户共享） */
.sps-hot-keywords {
    padding: 16px;
    box-sizing: border-box;
    background: var(--main-bg-color, #ffffff);
    border-radius: var(--sps-radius);
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    margin-bottom: -10px;
}

.sps-hot-keywords[hidden] {
    display: none !important;
}

.sps-hot-keywords-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.sps-hot-keywords-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--main-color);
    line-height: 1;
}

.sps-hot-keywords-icon {
    width: 18px;
    height: 18px;
    fill: var(--sps-theme);
}

.sps-hot-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sps-hot-keyword-item {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin: 0;
    padding: 6px 12px 6px 8px;
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    border-radius: 999px;
    background: transparent;
    color: var(--muted-color2, var(--muted-color, #6b7280));
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sps-hot-keyword-item:hover {
    color: #fff;
    border-color: var(--sps-theme);
    background: var(--sps-theme);
}

.sps-hot-keyword-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #bfbfbf;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.sps-hot-keyword-item.is-top1 .sps-hot-keyword-rank {
    background: #ff4d4f;
}

.sps-hot-keyword-item.is-top2 .sps-hot-keyword-rank {
    background: #ff7a45;
}

.sps-hot-keyword-item.is-top3 .sps-hot-keyword-rank {
    background: #ffa940;
}

.sps-hot-keyword-text {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sps-hot-keyword-count {
    font-size: 10px;
    color: var(--muted-color, #6b7280);
    opacity: 0.85;
}

.sps-hot-keyword-item:hover .sps-hot-keyword-count {
    color: rgba(255, 255, 255, 0.85);
}

.sps-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid color-mix(in srgb, var(--sps-theme) 20%, transparent);
    border-radius: 50%;
    border-top-color: var(--sps-theme);
    animation: sps-spin 0.8s linear infinite;
    margin-right: 12px;
    vertical-align: middle;
}

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

/* =================================
   通用头部 (Header)
   ================================= */
.sps-results-header {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 15px;
    border-radius: var(--sps-radius);
    background: var(--main-bg-color, #ffffff);
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    transition: all 0.3s ease-in-out;
    --sps-results-control-height: 38px;
    gap: 10px;
}

/* 搜索结果 / 榜单筛选：统一纵向间距，避免 header margin + gap 叠加大空白 */
.sps-page-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 资源介绍卡片 */
.sps-media-card {
    display: none;
    align-items: flex-start;
    gap: 14px;
    margin: 0;
    padding: 14px;
    border-radius: var(--sps-radius);
    background: var(--main-bg-color, #ffffff);
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    box-sizing: border-box;
}

.sps-media-card.is-visible {
    display: flex;
}

.sps-media-card.is-loading {
    align-items: center;
    min-height: 88px;
}

.sps-media-loading {
    width: 100%;
    text-align: center;
    color: var(--muted-color2, #4b5563);
    font-size: 13px;
}

.sps-media-poster {
    flex-shrink: 0;
    width: 86px;
    border-radius: var(--sps-radius-md);
    overflow: hidden;
    background: var(--muted-bg-color, #e5e7eb);
    line-height: 0;
}

.sps-media-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.sps-media-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 1px;
}

.sps-media-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 7px;
    border-radius: var(--sps-radius-md);
    background: color-mix(in srgb, var(--sps-theme) 12%, transparent);
    color: var(--sps-theme);
}

.sps-media-head {
    line-height: 1;
}

.sps-media-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    min-width: 0;
}

.sps-media-title-cn {
    font-size: 18px;
    font-weight: 700;
    color: var(--main-color);
    line-height: 1.35;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sps-media-title-en {
    font-size: 13px;
    color: var(--muted-color, #6b7280);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.sps-media-year {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--sps-theme);
    line-height: 1.35;
}

.sps-media-meta {
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted-color, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sps-media-overview {
    font-size: 13px;
    color: var(--muted-color, #6b7280);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 640px) {
    .sps-media-card {
        gap: 12px;
        padding: 12px;
    }

    .sps-media-poster {
        width: 72px;
    }

    .sps-media-overview {
        font-size: 12px;
    }
}

.sps-back-button {
    background-color: var(--main-bg-color, #ffffff);
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    padding: 0 12px;
    height: var(--sps-results-control-height, 38px);
    min-height: var(--sps-results-control-height, 38px);
    box-sizing: border-box;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--muted-color2, #4b5563);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
    border-radius: var(--sps-radius-md);
}
.sps-back-button svg {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    transition: all 0.2s ease-in-out;
}

.sps-back-button:hover {
    color: var(--sps-theme);
    background-color: var(--main-bg-color, #ffffff);
    border-color: var(--sps-theme);
    box-shadow: 0 2px 8px var(--main-shadow, rgba(15, 23, 42, 0.1));
    transform: translateY(-1px);
}

.sps-back-button:hover svg {
    transform: translateX(-3px);
}

/* =================================
   结果页 Tabs
   ================================= */
.sps-api-tabs {
    min-width: 0;
    max-width: 100%;
    margin-bottom: 12px;
    overflow: hidden;
}

.sps-page-stack > .sps-api-tabs {
    margin-bottom: 0;
}

.sps-api-tabs[hidden] {
    display: none !important;
}

.sps-api-tab-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 6px;
    list-style: none;
    box-sizing: border-box;
    background: var(--main-bg-color, #ffffff);
    border-radius: var(--sps-radius);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.sps-api-tab-nav::-webkit-scrollbar {
    display: none;
    height: 0;
}

.sps-api-tab-nav li {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    margin: 0 8px 0 0;
    padding: 0 14px;
    border: 0;
    border-radius: var(--sps-radius-md);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: var(--muted-color, #6b7280);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sps-api-tab-nav li:last-child {
    margin-right: 0;
}

.sps-api-tab-nav li:hover {
    color: var(--sps-theme);
}

.sps-api-tab-nav li.active {
    background: var(--sps-theme);
    color: #fff;
}

.sps-api-tab-nav li.active:hover {
    color: #fff;
}

.sps-tab-label {
    line-height: 1;
}

.sps-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--sps-radius-md);
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.sps-api-tab-nav li.active .sps-tab-count {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

/* 加载更多按钮样式 */
.sps-load-more-container {
    text-align: center;
}

.sps-load-more-button {
    padding: 12px 30px;
    background-color: var(--main-bg-color, #ffffff);
    color: var(--muted-color2, #4b5563);
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    border-radius: var(--sps-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 8px var(--main-shadow, rgba(15, 23, 42, 0.1));
}

.sps-load-more-button:hover {
    background-color: var(--sps-theme);
    color: white;
    border-color: var(--sps-theme);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sps-theme) 30%, transparent);
    transform: translateY(-1px);
}

.sps-load-more-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* =================================
   通用组件 (Common Components)
   ================================= */
/* 空信息提示 */
.sps-empty-info {
    text-align: center;
    padding: 30px 20px;
    color: var(--muted-color, #6b7280);
    background-color: var(--muted-bg-color-l, #f3f4f6);
    border-radius: var(--sps-radius);
    font-size: 1rem;
}

/* 链接有效性色点：黄检测中 / 绿有效 / 红失效 / 灰未知 */
.sps-cloud-status-indicator {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background: var(--dot, #94a3b8);
    box-shadow: 0 0 4px 2px var(--glow, rgba(148, 163, 184, 0.5));
}

.sps-cloud-status-indicator.checking {
    --dot: #f59e0b;
    --glow: rgba(245, 158, 11, 0.55);
}

.sps-cloud-status-indicator.valid {
    --dot: #22c55e;
    --glow: rgba(34, 197, 94, 0.55);
}

.sps-cloud-status-indicator.invalid {
    --dot: #ef4444;
    --glow: rgba(239, 68, 68, 0.55);
}

.sps-cloud-status-indicator.unknown {
    --dot: #94a3b8;
    --glow: rgba(148, 163, 184, 0.5);
}

/* =================================
   热门推荐区域 (Hot Recommendations)
   ================================= */
   .sps-hot-recommendations,
   .sps-250-recommendations{
       width: 100%;
       display: flex;
       flex-direction: column;
       flex: 1 0 auto;
       min-height: 0;
       gap: 12px;
   }

.sps-hot-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    background: var(--main-bg-color, #ffffff);
    border-radius: var(--sps-radius);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
}

.sps-hot-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0 10px;
    min-width: 0;
}

.sps-hot-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: var(--main-color);
    white-space: nowrap;
}

.sps-hot-title-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--sps-theme);
    fill: currentColor;
}

/* 分类标签 */
.sps-hot-tabs-container {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.sps-hot-toolbar-right {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.sps-hot-toolbar-right .sps-hot-tabs-container {
    flex: 1 1 auto;
}

.sps-hot-more-btn {
    appearance: none;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin: 0;
    padding: 6px 12px;
    border: 0;
    border-radius: var(--sps-radius-md);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: var(--sps-theme);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sps-hot-more-btn:hover {
    background: color-mix(in srgb, var(--sps-theme) 10%, transparent);
}

/* 榜单专页：加载更多 */
.sps-board-load-more {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
}

.sps-board-load-more[hidden] {
    display: none !important;
}

.sps-board-load-more-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 40px;
    margin: 0;
    padding: 10px 20px;
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    border-radius: var(--sps-radius);
    background: var(--main-bg-color, #ffffff);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--main-color);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sps-board-load-more-btn:hover:not(:disabled) {
    color: var(--sps-theme);
    border-color: color-mix(in srgb, var(--sps-theme) 35%, transparent);
    background: color-mix(in srgb, var(--sps-theme) 6%, transparent);
}

.sps-board-load-more-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sps-hot-title em {
    font-style: normal;
    color: var(--sps-theme);
    margin-left: 2px;
}

.sps-hot-tabs-container::-webkit-scrollbar {
    display: none;
    height: 0;
}

.sps-hot-tab,
.sps-ranking-rank-tab {
    appearance: none;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin: 0 8px 0 0;
    padding: 6px 12px;
    border: 0;
    border-radius: var(--sps-radius-md);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: var(--muted-color, #6b7280);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sps-hot-tab:last-child,
.sps-ranking-rank-tab:last-child {
    margin-right: 0;
}

.sps-hot-tab:hover,
.sps-ranking-rank-tab:hover {
    color: var(--sps-theme);
}

.sps-hot-tab.active,
.sps-ranking-rank-tab.is-active {
    background: var(--sps-theme);
    color: #fff;
}

.sps-hot-tab.active:hover,
.sps-ranking-rank-tab.is-active:hover {
    color: #fff;
}

/* 热门内容项 */
.sps-hot-items-container {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
    gap: 25px;
    min-height: 300px;
    align-items: start;
    margin-top: 0;
}

.sps-hot-item {
    appearance: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: inherit;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transform-origin: center center;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.sps-hot-item-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    position: relative;
    overflow: hidden;
    border-radius: var(--sps-radius);
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    background: var(--muted-bg-color, #e5e7eb);
}

.sps-hot-item-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.42) 38%,
        rgba(0, 0, 0, 0.08) 68%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
    transition: background 0.3s ease;
}

.sps-hot-item-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.3s ease;
}

.sps-hot-item-title {
    margin: 8px 0 0;
    font-size: 1rem;
    text-align: center;
    color: var(--main-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.25s ease;
}

.sps-hot-item-score {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: calc(100% - 16px);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sps-hot-item-score-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: #fff;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.sps-hot-item-score-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sps-hot-item-detail {
    display: none;
}

/* 桌面悬停：卡片放大 + 标题/简介（复用海报 ::after 作遮罩） */
@media (any-hover: hover) and (min-width: 993px) {
    .sps-hot-item-detail {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
        padding: 0 10px 12px;
        color: rgba(255, 255, 255, 0.88);
        font-size: 12px;
        text-align: left;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .sps-hot-item-detail-title {
        margin: 0 0 8px;
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sps-hot-item-detail-intro {
        margin: 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        color: #fff;
    }

    .sps-hot-item:hover {
        z-index: 99;
        transform: scale(1.18);
        filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
    }

    .sps-hot-item:hover .sps-hot-item-title,
    .sps-hot-item:hover .sps-hot-item-score {
        opacity: 0;
    }

    .sps-hot-item:hover .sps-hot-item-poster::after {
        background: linear-gradient(
            180deg,
            transparent 0%,
            rgba(0, 0, 0, 0.55) 42%,
            rgba(0, 0, 0, 0.92) 100%
        );
    }

    .sps-hot-item:hover .sps-hot-item-detail {
        opacity: 1;
    }

    .sps-hot-item:hover .sps-hot-item-poster img {
        transform: scale(1.06);
    }
}

@media (any-hover: hover) and (max-width: 992px) {
    .sps-hot-item:hover .sps-hot-item-poster img {
        transform: scale(1.06);
    }
}

/* 加载状态 */
.sps-hot-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    color: var(--muted-color2, #4b5563);
}

.sps-hot-loading .sps-spinner {
    margin-bottom: 15px;
    width: 40px;
    height: 40px;
}

/* 错误状态 */
.sps-hot-error {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    color: var(--sps-theme);
    font-size: 1.1rem;
}

/* 豆瓣 Top250 */
.sps-250-toolbar .sps-hot-title em {
    font-style: normal;
    color: var(--sps-theme);
    margin-left: 2px;
}

.sps-250-rank {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    min-width: 24px;
    height: 24px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 var(--sps-radius) 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.sps-250-rank.is-top3 {
    background: var(--sps-theme);
}

/* 榜单内页共用导航 */
.sps-board-nav {
    padding: 10px 12px;
}

.sps-board-nav-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.sps-board-nav-tabs::-webkit-scrollbar {
    display: none;
    height: 0;
}

.sps-board-nav-tab {
    appearance: none;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--sps-results-control-height, 38px);
    min-height: var(--sps-results-control-height, 38px);
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: var(--sps-radius-md);
    background: transparent;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
    color: var(--muted-color, #6b7280);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sps-board-nav-tab:hover {
    color: var(--sps-theme);
}

.sps-board-nav-tab.is-active {
    background: var(--sps-theme);
    color: #fff;
}

.sps-board-nav-tab.is-active:hover {
    color: #fff;
}

.sps-ranking-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: var(--sps-radius);
    background: var(--main-bg-color, #ffffff);
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
}

.sps-ranking-filter-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sps-ranking-filter-label {
    flex: 0 0 auto;
    flex-shrink: 0;
    padding-top: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted-color, #6b7280);
    line-height: 28px;
    white-space: nowrap;
}

.sps-ranking-filter-options {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.sps-ranking-filter-options::-webkit-scrollbar {
    display: none;
    height: 0;
}

.sps-ranking-filter-option {
    appearance: none;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin: 0;
    padding: 4px 10px;
    border: 0;
    border-radius: var(--sps-radius-md);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    color: var(--muted-color, #6b7280);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sps-ranking-filter-option:hover {
    color: var(--sps-theme);
}

.sps-ranking-filter-option.is-active {
    background: var(--sps-theme);
    color: #fff;
}

.sps-ranking-rankbar {
    margin: 0;
}

.sps-ranking-rank-tabs {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.sps-ranking-rank-tabs::-webkit-scrollbar {
    display: none;
}

.sps-ranking-items {
    min-height: 300px;
}

@media (any-hover: hover) and (min-width: 993px) {
    .sps-250-item:hover .sps-250-rank {
        opacity: 0;
    }
}

/* 搜索结果页面的搜索框 */
.sps-results-search-container {
    display: flex;
    align-items: stretch;
    flex-grow: 1;
    min-width: 0;
    gap: 10px;
}

.sps-results-search-container .sps-search-input-wrapper {
    height: var(--sps-results-control-height, 38px);
    min-height: var(--sps-results-control-height, 38px);
    border-color: var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    background-color: var(--main-bg-color, #ffffff);
}

.sps-results-search-container .sps-search-input-wrapper > input[type="search"] {
    font-size: 0.95rem;
}

#sps-results-search-button {
    height: var(--sps-results-control-height, 38px);
    min-height: var(--sps-results-control-height, 38px);
    padding: 0 16px;
    box-sizing: border-box;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    background-color: var(--sps-theme);
    color: #fff;
    border: none;
    border-radius: var(--sps-radius-md);
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#sps-results-search-button:hover {
    background-color: var(--sps-theme-hover);
}

/* 标签内容面板 */
.sps-tab-panel {
    display: none;
    padding: 5px 0;
}

.sps-tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* 结果网格包装器 */
.sps-results-grid-wrapper {
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.sps-results-summary {
    margin: 20px 0;
    text-align: center;
    border-radius: var(--sps-radius);
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    padding: 10px;
    background-color: var(--main-bg-color, #ffffff);
}

/* 云盘结果列表 - 使用CSS变量控制列数 */
.sps-cloud-results-list {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 2), 1fr);
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 100%;
    position: relative;
}

/* 云盘结果项（对齐 star-pan-item） */
.sps-cloud-result-item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    padding: 12px;
    border-radius: var(--sps-radius);
    background: var(--main-bg-color, #ffffff);
    border: 0;
    color: var(--muted-color2, #4b5563);
    transition: background-color 0.15s ease, color 0.15s ease;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.sps-cloud-result-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding-right: 12px;
}

.sps-cloud-result-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
}

.sps-cloud-result-meta {
    display: block;
    max-width: 100%;
    overflow: hidden;
}

.sps-cloud-meta-item {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    color: inherit;
    opacity: 0.75;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sps-cloud-meta-label {
    font-weight: 400;
}

.sps-cloud-meta-value {
    font-weight: 500;
}

.sps-cloud-result-item.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.sps-cloud-result-item.clickable-item {
    cursor: pointer;
}

.sps-cloud-result-item.clickable-item:hover {
    background: var(--sps-theme);
    color: #fff;
}

.sps-cloud-result-item.clickable-item:hover .sps-cloud-meta-item {
    opacity: 0.9;
}

.sps-cloud-result-item.clickable-item:active {
    opacity: 0.92;
}

.sps-cloud-result-item.clickable-item.invalid-link,
.sps-cloud-result-item.clickable-item.unknown-link {
    opacity: 0.85;
}

.sps-cloud-result-item.clickable-item.invalid-link:hover,
.sps-cloud-result-item.clickable-item.unknown-link:hover {
    opacity: 1;
}

/* =================================
   Tooltip 样式
   ================================= */
.sps-tooltip {
    position: absolute;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: var(--sps-radius-md);
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 300px;
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    white-space: normal;
}

.sps-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.sps-tooltip.top {
    transform-origin: bottom center;
}

.sps-tooltip.bottom {
    transform-origin: top center;
}

/* Tooltip 箭头 */
.sps-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.sps-tooltip.top::before {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.sps-tooltip.bottom::before {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent rgba(0, 0, 0, 0.9) transparent;
}

/* =================================
   OneNav / onenav-star 页脚对齐
   ================================= */
.page-template-cloud-search-template-php:not(.full-container) .main-footer.footer-stick.Welt .switch-container.container-footer {
    max-width: var(--main-max-width, 1400px);
}

.page-template-cloud-search-template-php:not(.full-container) .main-footer.footer-stick.Welt .container-footer .footer {
    box-shadow: 0 5px 20px var(--main-shadow, rgba(15, 23, 42, 0.1));
}

.page-template-cloud-search-template-php .main-footer.footer-stick.Fullwidth .footer-fullwidth-wrap {
    width: 100%;
}

.page-template-cloud-search-template-php .main-footer.footer-stick.Fullwidth {
    width: 100%;
    padding-top: 10px;
}

/* =================================
   网盘转存弹窗（对齐 mizhiady，适配搜索页主题）
   ================================= */
.sps-link-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.sps-link-modal {
    position: relative;
    width: min(100%, 420px);
    max-height: calc(100vh - 32px);
    overflow: auto;
    border-radius: var(--sps-radius);
    background: var(--sps-card-bg, #fff);
    color: var(--sps-text-color, #334155);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}

.sps-link-modal-x {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: var(--sps-radius-md);
    background: transparent;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.sps-link-modal-x:hover {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
}

.sps-link-modal-title {
    padding: 18px 20px 0;
    font-size: 16px;
    font-weight: 600;
}

.sps-link-modal-body {
    padding: 14px 20px 8px;
}

.sps-link-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 88px;
    color: #64748b;
    font-size: 14px;
}

.sps-link-modal-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid color-mix(in srgb, var(--sps-theme) 20%, transparent);
    border-top-color: var(--sps-theme);
    border-radius: 50%;
    animation: sps-link-spin 0.8s linear infinite;
}

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

.sps-link-modal-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.sps-link-modal-row .k {
    flex: 0 0 52px;
    color: #94a3b8;
}

.sps-link-modal-row .v {
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

.sps-link-modal-state-row[hidden] {
    display: none !important;
}

.sps-link-modal-state.is-ok {
    color: #16a34a;
    font-weight: 600;
}

.sps-link-modal-state.is-bad {
    color: #dc2626;
    font-weight: 600;
}

.sps-link-modal-state.is-checking {
    color: var(--sps-theme);
    font-weight: 600;
}

.sps-link-modal-state.is-unknown {
    color: var(--muted-color, #6b7280);
    font-weight: 500;
}

.sps-link-modal-link {
    color: var(--sps-theme) !important;
    text-decoration: none !important;
}

.sps-link-modal-link:hover {
    text-decoration: underline !important;
}

.sps-link-modal-qr-wrap {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    text-align: center;
}

.sps-link-modal-qr-tip {
    margin: 0 0 8px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.sps-link-modal-qr {
    display: inline-block;
    padding: 8px;
    background: #fff;
    border-radius: var(--sps-radius-md);
    line-height: 0;
}

.sps-link-modal-qr canvas,
.sps-link-modal-qr img {
    display: block;
    width: 128px;
    height: 128px;
}

.sps-link-modal-hint {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: var(--sps-radius-md);
    background: color-mix(in srgb, var(--sps-theme) 6%, transparent);
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

.sps-link-modal-msg {
    margin: 8px 0 0;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

.sps-link-modal-actions {
    display: flex;
    gap: 10px;
    padding: 8px 20px 18px;
}

.sps-link-modal-go {
    flex: 1;
    height: 36px;
    border: 0;
    border-radius: var(--sps-radius-md);
    background: var(--sps-theme);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.sps-link-modal-go:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sps-link-modal-cancel {
    flex: 0 0 auto;
    min-width: 72px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--sps-border-color, var(--muted-bg-color, #e5e7eb));
    border-radius: var(--sps-radius-md);
    background: #fff;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
}

.sps-link-modal-cancel:hover {
    background: #f8fafc;
}

/* =================================
   响应式设计 (Responsive)
   ================================= */
@media (max-width: 1200px) {
    .sps-hot-items-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: auto;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .sps-hot-items-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .sps-cloud-results-list {
        gap: 12px;
    }

    .sps-hero-title {
        font-size: 2rem;
    }

    .sps-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .sps-search-hero-section {
        padding: calc(36px + var(--main-nav-hight, 0px)) 16px 36px;
    }

    .sps-search-shell {
        flex-direction: column;
    }

    .sps-search-shell .sps-search-input-wrapper,
    #sps-search-button {
        width: 100%;
        height: 44px;
        font-size: 0.95rem;
    }

    .sps-results-header {
        flex-wrap: nowrap;
        flex-direction: column;
        align-items: stretch;
    }

    /* 移动端结果页：隐藏返回，搜索框/按钮拉满卡片内容宽 */
    .sps-results-header > .sps-back-button {
        display: none;
    }

    .sps-board-nav {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .sps-results-search-container {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .sps-results-search-container .sps-search-input-wrapper,
    #sps-results-search-button {
        width: 100%;
        max-width: none;
    }

    .sps-hot-recommendations .sps-hot-header {
        display: none;
    }

    .sps-hot-toolbar-right {
        width: 100%;
    }

    .sps-hot-tabs-container {
        justify-content: flex-start;
        width: auto;
        flex: 1 1 auto;
    }

    .sps-ranking-rankbar {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .sps-hot-items-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        gap: 12px;
    }

    .sps-hot-item-title {
        margin-top: 6px;
        font-size: 0.9rem;
    }

    .sps-hot-item-score {
        right: 6px;
        bottom: 6px;
        font-size: 12px;
        gap: 2px;
    }

    .sps-hot-item-score-icon {
        width: 14px;
        height: 14px;
    }

    .sps-link-modal-qr-wrap {
        display: none !important;
    }
}