/* 经典模板：首页 */
.headerBox,
.headerKox {
    display: none !important;
}

/* 首页新样式 - 参考 msmy.cn */

.home-container {
    width: 100%;
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: var(--layout-pad);
}

.home-main {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

/* 左侧搜索区域 */
.search-section {
    flex: 1;
    background: var(--theme-surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--layout-shadow);
    transition: background-color 0.3s ease;
    border: 1px solid var(--theme-border);
}

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

.search-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-title .highlight {
    background: var(--theme-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: 1px;
}

.search-subtitle {
    font-size: 13px;
    color: var(--theme-text-secondary);
    line-height: 1.5;
    max-width: 364px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-box-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.search-input-box {
    display: flex;
    align-items: center;
    background: var(--theme-background);
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.search-input-box:focus-within {
    border-color: var(--theme-primary);
    background: var(--theme-surface);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.search-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-secondary);
    font-size: 18px;
}

.search-input-box input {
    flex: 1;
    height: 44px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--theme-text);
    outline: none;
}

.search-input-box input::placeholder {
    color: var(--theme-text-secondary);
}

.input-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 44px;
    color: var(--theme-text-secondary);
    flex-shrink: 0;
}

.search-btn {
    height: 38px;
    padding: 0 20px;
    margin: 3px;
    background: var(--theme-primary-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.35);
}

/* 热词区域 */
.hot-keywords {
    margin-top: 8px;
    margin-bottom: 2px;
}

.hot-keywords-label {
    font-size: 12px;
    color: var(--theme-text-secondary);
    margin-bottom: 8px;
}

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

.hot-keyword {
    padding: 5px 12px;
    background: var(--theme-background);
    border-radius: 16px;
    font-size: 12px;
    color: var(--theme-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.hot-keyword:hover {
    background: rgba(255, 107, 107, 0.1);
    color: var(--theme-primary);
    border-color: rgba(255, 107, 107, 0.3);
}

/* 提示文字 */
.search-tips {
    margin-top: 0;
    padding-top: 2px;
    font-size: 11px;
    color: var(--theme-text-secondary);
    line-height: 1.5;
}

/* TMDB 影视信息 */
.tmdb-info {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background: var(--theme-background);
    border-radius: 6px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 热搜词 */
.hot-keywords {
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--theme-background);
    border-radius: 6px;
    max-width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.hot-keywords-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hot-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

.hot-keyword-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    font-size: 12px;
    color: var(--theme-text);
    cursor: pointer;
    transition: all 0.2s;
}

.hot-keyword-item:hover {
    background: var(--primary-color, #1E40AF);
    color: #fff;
    border-color: var(--primary-color, #1E40AF);
}

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

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

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

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

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

.hot-keyword-count {
    font-size: 10px;
    color: var(--theme-text-light, #999);
    opacity: 0.8;
}

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

.tmdb-poster {
    flex-shrink: 0;
    width: 60px;
    height: 90px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--theme-border);
}

.tmdb-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tmdb-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.tmdb-title {
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tmdb-title-cn {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-text);
}

.tmdb-title-en {
    font-size: 11px;
    color: var(--theme-text-secondary);
    margin-left: 4px;
}

.tmdb-year {
    font-size: 11px;
    color: var(--theme-primary);
    margin-bottom: 4px;
}

.tmdb-meta {
    font-size: 11px;
    color: var(--theme-text-secondary);
    margin-bottom: 4px;
}

.tmdb-badge {
    display: inline-block;
    font-size: 11px;
    padding: 0 6px;
    margin-right: 6px;
    border-radius: 4px;
    background: rgba(30, 128, 255, 0.12);
    color: var(--theme-primary, #1e80ff);
    vertical-align: middle;
}

.tmdb-overview {
    font-size: 11px;
    color: var(--theme-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 右侧信息卡片 */
.info-section {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-card {
    background: var(--theme-surface);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--theme-border);
    box-shadow: var(--layout-shadow);
    transition: background-color 0.3s ease;
}

.info-card-stats {
    padding: 12px;
}

.stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    background: var(--theme-background);
    border-radius: 8px;
}

.stat-label {
    font-size: 11px;
    color: var(--theme-text-secondary);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--theme-text);
}

/* 资源缺失卡片 */
.info-card-resource {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px;
    background: var(--theme-card-gradient);
}

.resource-missing-icon {
    width: 44px;
    height: 44px;
    margin: 0 0 10px;
    border-radius: 50%;
    background: var(--theme-primary-gradient);
    border: 1px solid var(--theme-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.resource-missing-icon:hover {
    transform: scale(1.05);
    opacity: 0.92;
}

.resource-missing-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.resource-missing-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 4px;
}

.resource-missing-desc {
    font-size: 11px;
    color: var(--theme-text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.resource-missing-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.resource-btn {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: none;
}

.resource-btn-primary {
    background: var(--theme-primary-gradient);
    color: #fff;
}

.resource-btn-primary:hover {
    opacity: 0.92;
}

.resource-btn-secondary {
    background: var(--theme-surface);
    color: var(--theme-text-secondary);
    border: 1px solid var(--theme-border);
}

.resource-btn-secondary:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.resource-missing-tips {
    margin-top: 12px;
    padding-top: 10px;
    width: 100%;
    border-top: 1px solid var(--theme-border);
    font-size: 11px;
    line-height: 1.5;
    color: var(--theme-text-secondary);
}

/* 搜索结果区域 */
.search-result-section {
    margin-top: 16px;
    display: none;
}

.search-result-section.show {
    display: block;
}

.search-result-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    gap: 10px;
}

.search-result-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--theme-surface);
    border-radius: 12px;
    border: 1px solid var(--theme-border);
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-text);
    box-sizing: border-box;
}

.search-result-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.search-result-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--theme-primary);
    flex-shrink: 0;
}

.search-result-title-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.search-result-title-text {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.search-result-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--theme-text-secondary);
    background: var(--theme-background);
    border-radius: 999px;
    padding: 2px 8px;
    line-height: 1.4;
    white-space: nowrap;
}

.search-result-close {
    cursor: pointer;
    color: var(--theme-text-secondary);
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.search-result-close:hover {
    background: var(--theme-background);
    color: var(--theme-text);
}

.search-result-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.pan-type-tabs,
.pan-type-mobile {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--theme-surface);
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--theme-border);
}

.pan-type-mobile {
    display: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pan-type-tab {
    padding: 6px 12px;
    font-size: 12px;
    color: var(--theme-text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.4;
}

.pan-type-tab:hover {
    color: var(--theme-primary);
}

.pan-type-tab.active {
    background: var(--theme-primary);
    color: #fff;
    font-weight: 600;
}

.pan-type-mobile::-webkit-scrollbar {
    display: none;
}

.pan-type-mobile-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
}

.pan-type-mobile-btn {
    padding: 3px 10px;
    font-size: 12px;
    color: var(--theme-text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
    border: none;
    background: transparent;
    flex-shrink: 0;
    white-space: nowrap;
}

.pan-type-mobile-btn:hover {
    color: var(--theme-primary);
}

.pan-type-mobile-btn.active {
    background: var(--theme-primary);
    color: #fff;
    font-weight: 600;
}

/* 移动端网盘类型按钮组 - 默认隐藏 */
.pan-type-select-wrapper {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.pan-type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.pan-type-header .search-result-close {
    display: none;
    font-size: 11px;
    padding: 3px 6px;
}

.pan-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pan-type-btn {
    padding: 3px 10px;
    font-size: 11px;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    background: var(--theme-surface);
    color: var(--theme-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pan-type-btn:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.pan-type-btn.active {
    background: var(--theme-primary-gradient);
    border-color: var(--theme-primary);
    color: #fff;
    font-weight: 500;
}

/* 旧的下拉列表样式 - 保留兼容 */
.pan-type-dropdown {
    display: none;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .pan-type-tabs {
        display: none;
    }

    .pan-type-mobile {
        display: flex;
    }

    .pan-type-select-wrapper {
        display: none !important;
    }

    .pan-type-header .search-result-close {
        display: inline-flex;
    }

    /* 隐藏右侧信息卡片模块 */
    .info-section {
        display: none;
    }
}

.search-result-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--theme-surface);
    border-radius: 12px;
    border: 1px solid var(--theme-border);
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.search-result-cover {
    width: 100px;
    height: 130px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--theme-background);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-secondary);
    font-size: 12px;
}

.search-result-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--theme-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-desc {
    font-size: 13px;
    color: var(--theme-text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.search-result-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: fit-content;
    max-width: 100%;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 3px 9px;
    border-radius: 14px;
    font-size: 11px;
    white-space: nowrap;
}

.search-result-tag.type {
    background: var(--theme-primary);
    color: #fff;
}

.search-result-tag.source {
    background: var(--theme-background);
    color: var(--theme-text-secondary);
    border: 1px solid var(--theme-border);
}

.search-result-tag.link-check-status {
    background: #f5f5f5;
    color: #666;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.search-result-tag.link-check-status .check-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-right: 4px;
    border: 2px solid #999;
    border-top-color: transparent;
    border-radius: 50%;
    animation: linkCheckRotate 1s linear infinite;
    box-sizing: border-box;
}

@keyframes linkCheckRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.search-result-tag.link-check-status.valid {
    background: #f6ffed !important;
    color: #52c41a !important;
    border-color: #b7eb8f;
}

.search-result-tag.link-check-status.invalid {
    background: #fff2f0 !important;
    color: #ff4d4f !important;
    border-color: #ffccc7;
}

.search-result-tag.link-check-status.error {
    background: #fffbe6 !important;
    color: #faad14 !important;
    border-color: #ffe58f;
}

.search-result-tag.link-check-status.valid .check-icon,
.search-result-tag.link-check-status.invalid .check-icon,
.search-result-tag.link-check-status.error .check-icon {
    display: none !important;
}

.search-result-tag.link-check-status.valid .check-text::before { content: '✓ '; }
.search-result-tag.link-check-status.invalid .check-text::before { content: '✗ '; }
.search-result-tag.link-check-status.error .check-text::before { content: '! '; }

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

.search-result-tag.time {
    background: var(--theme-card);
    color: var(--theme-text);
}

.search-result-tag.local {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: #fff;
    font-weight: 500;
}

.search-result-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    justify-content: center;
    align-self: center;
}

.search-result-btn {
    padding: 5px 16px;
    border-radius: 18px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 70px;
}

.search-result-btn.valid {
    background: var(--theme-card);
    color: var(--theme-text);
    border: 1px solid var(--theme-border);
}

.search-result-btn.detail {
    background: var(--theme-background);
    color: var(--theme-text-secondary);
    border: none;
}

.search-result-btn.get {
    background: var(--theme-primary-gradient);
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.search-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 16px 12px 8px;
}

.search-load-more-btn {
    appearance: none;
    border: 1px solid var(--theme-border);
    background: var(--theme-card);
    color: var(--theme-text);
    border-radius: 20px;
    padding: 8px 22px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-load-more-btn:hover:not(:disabled) {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

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

.search-result-loading,
.search-result-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--theme-text-secondary);
    font-size: 14px;
}

.search-result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.search-result-loading i {
    animation: spin 1s linear infinite;
    font-size: 32px;
    color: var(--theme-primary);
}

.search-result-loading .loading-text {
    position: relative;
}

.search-result-loading .loading-text::after {
    content: '';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

@keyframes loadingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

.search-result-loading .loading-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--theme-primary-gradient);
    opacity: 0.3;
    animation: pulse 1.5s ease-in-out infinite;
    position: absolute;
}

.search-result-loading .loading-pulse:nth-child(2) {
    animation-delay: 0.5s;
}

.search-result-loading .loading-pulse:nth-child(3) {
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.search-result-loading .loading-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-loading .loading-wrapper i {
    position: relative;
    z-index: 1;
}

/* 资源弹窗 */
.el-overlay-dialog:has(.resource-dialog) {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.resource-dialog {
    background: var(--theme-surface) !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 24px !important;
    box-sizing: border-box;
    margin: auto !important;
    height: auto !important;
    max-height: 90vh;
    align-self: center !important;
    flex: none !important;
}
.resource-dialog .el-dialog__header {
    padding: 0 0 16px !important;
    margin: 0 0 16px !important;
    border-bottom: 1px dashed var(--theme-border, #e5e7eb);
    background: transparent !important;
}
.resource-dialog .el-dialog__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--theme-text);
    line-height: 1.3;
}
.resource-dialog.resource-dialog--loading .el-dialog__header {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
.resource-dialog .el-dialog__body {
    padding: 0 !important;
    background: transparent !important;
    flex: none !important;
    height: auto !important;
}
.resource-dialog-content {
    padding: 0 !important;
    background: transparent !important;
    height: auto !important;
    min-height: 0;
}
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 28px 8px;
    text-align: center;
}
.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}
.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--theme-primary);
    animation: spin 1.2s linear infinite;
}
.spinner-ring:nth-child(1) {
    width: 100%;
    height: 100%;
    animation-duration: 1.2s;
}
.spinner-ring:nth-child(2) {
    width: 75%;
    height: 75%;
    top: 12.5%;
    left: 12.5%;
    animation-duration: 0.9s;
    animation-direction: reverse;
    border-top-color: var(--theme-primary-light, #7c9aff);
}
.spinner-ring:nth-child(3) {
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    animation-duration: 0.6s;
    border-top-color: var(--theme-primary-dark, #4a6cf7);
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--theme-text);
}
.loading-subtext {
    font-size: 13px;
    color: var(--theme-text-secondary);
}
.expire-tip {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 107, 107, 0.08);
    color: #ff6b6b;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}
.resource-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.meta-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}
.meta-label {
    flex: 0 0 64px;
    color: var(--theme-text-secondary);
}
.meta-value,
.meta-link {
    flex: 1;
    min-width: 0;
    word-break: break-all;
}
.meta-value { color: var(--theme-text); }
.meta-link {
    color: var(--theme-primary, #409eff);
    text-decoration: none;
}
.meta-link:hover { text-decoration: underline; }
.resource-divider {
    margin: 18px 0 16px;
    border: none;
    border-top: 1px dashed var(--theme-border, #e5e7eb);
}
.scan-tip {
    text-align: center;
    font-size: 13px;
    color: var(--theme-text-secondary);
    margin-bottom: 14px;
    line-height: 1.5;
}
.scan-tip .pan-name {
    color: var(--theme-primary);
    font-weight: 500;
}
.qrcode-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.qrcode-wrapper .qrcode {
    width: 180px;
    height: 180px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    box-sizing: border-box;
}
.qrcode-wrapper .qrcode canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.scan-desc-box {
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: var(--theme-background, #f5f7fa);
    color: var(--theme-text-secondary);
    font-size: 12px;
    line-height: 1.55;
}
.scan-desc-box .scan-desc { margin: 0; }
.dialog-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.dialog-actions .btn-primary,
.dialog-actions .btn-secondary {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    white-space: nowrap;
}
.dialog-actions .btn-primary {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    background: var(--theme-primary, #409eff);
    color: #fff;
    border: none;
    font-weight: 500;
    transition: filter 0.2s ease;
}
.dialog-actions .btn-primary:hover { filter: brightness(1.08); }
.dialog-actions .btn-secondary {
    flex: 0 0 auto;
    background: var(--theme-surface);
    color: var(--theme-text);
    border: 1px solid var(--theme-border);
    transition: background 0.2s ease;
}
.dialog-actions .btn-secondary:hover {
    background: var(--theme-background, #f5f7fa);
}
.dialog-actions .btn-secondary.btn-block {
    flex: 1;
}
.error-content {
    text-align: center;
    padding: 8px 0 0;
}
.error-message {
    font-size: 14px;
    color: var(--theme-text-secondary);
    margin-bottom: 20px;
}

/* 最近更新列表区域 */
.latest-section {
    margin-top: 16px;
    background: var(--theme-surface);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

/* 热门搜索区域特殊样式 */
.hot-section {
    background: var(--theme-surface);
}

.hot-icon {
    color: #f59e0b;
    font-size: 18px;
}

.hot-section .latest-item-index {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.hot-section .latest-item-index.top3 {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.latest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.latest-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-text);
}

.latest-title-icon {
    color: var(--theme-primary);
}

.latest-more {
    font-size: 12px;
    color: var(--theme-text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.latest-more:hover {
    color: var(--theme-primary);
}

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

.latest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--theme-background);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 0;
}

.latest-item:hover {
    background: var(--theme-border);
    transform: translateY(-1px);
}

.latest-item-index {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    flex-shrink: 0;
}

.latest-item-index.top3 {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
}

.latest-item-info {
    flex: 1;
    min-width: 0;
}

.latest-item-title {
    font-size: 13px;
    color: var(--theme-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    max-width: 100%;
}

.latest-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--theme-text-secondary);
}

.latest-item-tag {
    padding: 1px 5px;
    background: var(--theme-primary);
    color: #fff;
    border-radius: 3px;
    font-size: 10px;
}

.latest-item-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--theme-text-secondary);
    font-size: 13px;
}

/* 第三方热播榜区域 */
.ranking-section {
    margin-top: 16px;
}

.ranking-header {
    margin-bottom: 12px;
}

.ranking-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--theme-text);
    margin-bottom: 4px;
}

.ranking-title-icon {
    color: var(--theme-primary);
}

.ranking-subtitle {
    font-size: 12px;
    color: var(--theme-text-secondary);
}

/* Tab 切换 */
.tab-list {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--theme-surface);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid var(--theme-border);
    margin-bottom: 8px;
    transition: background-color 0.3s ease;
}

.tab-item {
    padding: 6px 12px;
    font-size: 14px;
    color: var(--theme-text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    line-height: 1.4;
}

.tab-item.active {
    background: var(--theme-primary-gradient);
    color: #fff;
}

.tab-item:hover:not(.active) {
    background: var(--theme-background);
    color: var(--theme-text);
}

.tab-refresh {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #999;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.tab-refresh:hover {
    background: var(--theme-background);
    color: var(--theme-text);
}

/* 三列卡片网格：minmax(0,1fr) 防止长文本撑破列宽 */
.ranking-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ranking-card {
    min-width: 0;
    overflow: hidden;
    background: var(--theme-surface);
    border-radius: 12px;
    padding: 14px;
    transition: background-color 0.3s ease;
}

.ranking-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--theme-border);
}

.ranking-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ranking-card-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.ranking-card-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.ranking-icon-hot,
.ranking-icon-new,
.ranking-icon-good {
    background: var(--theme-background);
    color: var(--theme-primary);
}

.ranking-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-text);
}

.ranking-card-date {
    font-size: 11px;
    color: var(--theme-text-secondary);
    margin-left: 6px;
}

.ranking-card-more {
    font-size: 11px;
    color: var(--theme-text-secondary);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.ranking-card-more:hover {
    color: var(--theme-primary);
}

/* 榜单列表项 */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    width: 100%;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.ranking-item:hover {
    background: var(--theme-background);
}

.ranking-rank {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--theme-text-secondary);
    background: transparent;
    flex-shrink: 0;
    line-height: 1;
}

.ranking-rank.top1,
.ranking-rank.top2,
.ranking-rank.top3 {
    color: #fff;
    font-size: 11px;
}

.ranking-rank.top1 {
    background: var(--theme-primary-gradient);
}

.ranking-rank.top2 {
    background: var(--theme-secondary-gradient);
}

.ranking-rank.top3 {
    background: var(--theme-tertiary-gradient);
}

.ranking-cover {
    width: 36px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--theme-background);
    border: 1px solid var(--theme-border);
    flex-shrink: 0;
}

.ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.ranking-item:hover .ranking-cover img {
    transform: scale(1.06);
}

.ranking-info {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ranking-item-title,
.ranking-meta {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-item-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--theme-text);
}

.ranking-meta {
    font-size: 11px;
    color: var(--theme-text-secondary);
    line-height: 1.3;
}

.ranking-score {
    flex: 0 0 auto;
    max-width: 4.5em;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: var(--theme-primary);
    background: var(--theme-background);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-item:hover .ranking-item-title {
    color: var(--theme-primary);
}

@media (max-width: 1024px) {
    .home-container {
        padding: var(--layout-pad);
    }
    .home-main {
        flex-direction: column;
    }
    .info-section {
        width: 100%;
    }
    .ranking-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .search-section {
        padding: 16px;
    }
    .search-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
    .search-subtitle {
        font-size: 11px;
    }
    .search-input-box input {
        height: 40px;
        font-size: 13px;
    }
    .search-btn {
        height: 34px;
        padding: 0 16px;
        font-size: 12px;
    }
    .input-search-icon {
        height: 40px;
        width: 32px;
    }
    .hot-keyword {
        padding: 4px 10px;
        font-size: 11px;
    }
    .search-tips {
        font-size: 10px;
    }
    .tmdb-title-cn {
        font-size: 12px;
    }
    .tmdb-title-en {
        font-size: 10px;
    }
    .tmdb-year {
        font-size: 10px;
    }
    .tmdb-overview {
        font-size: 10px;
    }
    .stats-grid {
        gap: 10px;
    }
    .stat-value {
        font-size: 16px;
    }
    /* 手机端：榜单卡片堆叠显示，每个卡片内部是网格 */
    .ranking-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .ranking-card {
        padding: 10px;
    }
    .ranking-card-header {
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
    .ranking-card-icon {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
    .ranking-card-icon svg {
        width: 12px;
        height: 12px;
    }
    .ranking-card-name {
        font-size: 13px;
    }
    .ranking-card-date {
        font-size: 10px;
    }
    .ranking-card-more {
        font-size: 10px;
    }
    /* 列表项（桌面窄屏兜底；手机端走网格） */
    .ranking-list {
        gap: 2px;
    }
    .ranking-item {
        padding: 5px 4px;
        gap: 8px;
    }
    .ranking-rank {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    .ranking-cover {
        width: 32px;
        height: 42px;
        border-radius: 4px;
    }
    .ranking-item-title {
        font-size: 12px;
    }
    .ranking-meta {
        font-size: 10px;
    }
    .ranking-score {
        font-size: 10px;
        padding: 2px 5px;
    }
    
    /* 隐藏第三方热播榜标题和副标题 */
    .ranking-section .ranking-title,
    .ranking-section .ranking-subtitle {
        display: none !important;
    }
    
    /* 手机端卡片网格样式 */
    .ranking-grid-mobile {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 4px;
    }
    
    .ranking-card-mobile {
        display: flex;
        flex-direction: column;
        text-decoration: none;
        color: inherit;
    }
    
    .ranking-card-cover {
        position: relative;
        width: 100%;
        aspect-ratio: 3/4;
        border-radius: 6px;
        overflow: hidden;
        background: #f0f0f0;
    }
    
    .ranking-card-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .ranking-card-rank {
        position: absolute;
        top: 4px;
        left: 4px;
        padding: 2px 6px;
        font-size: 10px;
        font-weight: 700;
        color: #fff;
        background: rgba(0,0,0,0.5);
        border-radius: 4px;
        z-index: 1;
    }
    
    .ranking-card-rank.top1 {
        background: var(--theme-primary-gradient);
    }
    
    .ranking-card-rank.top2 {
        background: linear-gradient(135deg, #ff8e53 0%, #ffa940 100%);
    }
    
    .ranking-card-rank.top3 {
        background: linear-gradient(135deg, #ffa940 0%, #ffc53d 100%);
    }
    
    .ranking-card-title {
        margin-top: 6px;
        font-size: 12px;
        font-weight: 500;
        color: #333;
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        text-align: center;
    }
    
    .tab-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 8px;
        gap: 3px;
    }
    
    .tab-item {
        padding: 5px 10px;
        font-size: 13px;
        border-radius: 8px;
        white-space: nowrap;
    }
    
    .tab-refresh {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    /* 搜索结果手机端适配 */
    .search-result-header {
        margin-bottom: 8px;
        gap: 8px;
    }
    .search-result-title {
        font-size: 14px;
        padding: 10px 12px;
        border-radius: 10px;
    }
    .search-result-title-left {
        gap: 6px;
    }
    .search-result-title-icon {
        width: 18px;
        height: 18px;
    }
    .search-result-title-text {
        font-size: 14px;
    }
    .search-result-count {
        font-size: 11px;
        padding: 2px 6px;
    }

    /* 资源弹窗手机端适配 */
    .resource-dialog {
        width: 92vw !important;
        max-width: 400px;
    }
    .meta-label { flex-basis: 56px; font-size: 13px; }
    .meta-value,
    .meta-link { font-size: 13px; }
    .scan-tip { font-size: 12px; }
    .qrcode-wrapper .qrcode {
        width: 160px;
        height: 160px;
    }
    .dialog-actions { gap: 6px; }
    .dialog-actions .btn-primary,
    .dialog-actions .btn-secondary {
        padding: 9px 12px;
        font-size: 13px;
    }

    /* 最近更新列表手机端适配 */
    .latest-section {
        margin-top: 12px;
        padding: 12px;
    }
    .latest-title {
        font-size: 14px;
    }
    .latest-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .latest-item {
        padding: 8px 10px;
    }
    .latest-item-title {
        font-size: 12px;
    }
    .search-result-close {
        font-size: 12px;
    }
    .pan-type-select {
        padding: 4px 20px 4px 10px;
        font-size: 12px;
        min-width: 80px;
    }
    .search-result-item {
        padding: 12px;
        gap: 10px;
    }
    .search-result-cover {
        width: 70px;
        height: 90px;
    }
    .search-result-info {
        gap: 6px;
    }
    .search-result-name {
        font-size: 13px;
        line-height: 1.3;
    }
    .search-result-desc {
        font-size: 11px;
        line-height: 1.4;
    }
    .search-result-tag {
        padding: 2px 6px;
        font-size: 10px;
    }
    .search-result-actions {
        gap: 6px;
    }
    .search-result-btn {
        padding: 4px 10px;
        font-size: 11px;
        min-width: 60px;
        border-radius: 14px;
    }
    .search-result-loading,
    .search-result-empty {
        padding: 30px 16px;
        font-size: 12px;
    }
    .search-result-loading i {
        font-size: 24px;
    }
}
