/* ===== 搜索结果页样式 ===== */

/* 页面标题 */
.search-results-header {
    text-align: center;
    margin-bottom: 28px;
    padding-top: 24px;
}
.search-results-header h1 {
    font-size: 2.2em;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 1px;
}

.search-detail-header {
    text-align: center;
    margin-bottom: 28px;
    padding-top: 24px;
}
.search-detail-header h1 {
    font-size: 2em;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* 返回链接 */
.back-home {
    text-align: center;
    margin-bottom: 24px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    padding: 8px 18px;
    background-color: rgba(79, 142, 247, 0.06);
    border-radius: 50px;
    transition: var(--transition);
    border: 1.5px solid transparent;
}
.back-link:hover {
    background-color: rgba(79, 142, 247, 0.12);
    color: var(--primary-dark);
    transform: translateY(-1px);
    text-decoration: none;
    border-color: var(--primary);
}

/* 统计信息 */
.stats {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    margin-top: 20px;
    font-size: 1em;
    font-weight: 500;
}

/* ===== 搜索结果页搜索框样式 ===== */
.search-results-header + .search-form {
    max-width: 700px;
    margin: 0 auto 24px auto;
    background-color: var(--bg-card);
    padding: 20px 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}
.search-results-header + .search-form .layui-input {
    height: 44px;
    border-radius: var(--radius-sm);
}
.search-results-header + .search-form .search-submit-btn {
    height: 44px;
}

/* ===== 筛选和排序按钮样式 ===== */
.category-buttons,
.sort-buttons {
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.category-buttons span,
.sort-buttons span {
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 4px;
    font-size: 0.9em;
}
.category-buttons a,
.sort-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.88em;
    font-weight: 500;
    transition: var(--transition);
    border: 1.5px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    user-select: none;
}
.category-buttons a:hover,
.sort-buttons a:hover {
    background-color: rgba(79, 142, 247, 0.06);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(79, 142, 247, 0.15);
}
.category-buttons a.layui-btn-normal,
.sort-buttons a.layui-btn-normal {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(79, 142, 247, 0.3);
}
.category-buttons a.layui-btn-normal:hover,
.sort-buttons a.layui-btn-normal:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(79, 142, 247, 0.4);
}

/* ===== 搜索结果卡片 ===== */
.result-card {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

/* 筛选切换时结果项的淡入动画 */
.result-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px 22px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.25s ease;
}
/* 左侧彩色条 */
.result-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), #8b5cf6);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: var(--transition);
}
.result-item:hover::before {
    opacity: 1;
}
.result-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    background-color: var(--bg-card-hover);
    border-color: var(--primary);
}
.result-item:last-child {
    margin-bottom: 0;
}

.item-left {
    flex-shrink: 0;
}
.item-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.08), rgba(139, 92, 246, 0.08));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: var(--transition);
}
.result-item:hover .item-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.15), rgba(139, 92, 246, 0.15));
}

.item-content {
    flex: 1;
    min-width: 0;
}
.item-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 10px;
    line-height: 1.4;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: var(--transition);
}
.item-title:hover {
    color: var(--primary);
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.meta-tag {
    font-size: 0.82em;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.08), rgba(139, 92, 246, 0.08));
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
}
.meta-info {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.88em;
}
.meta-info i {
    color: var(--primary);
    font-size: 0.9em;
}

.item-time {
    font-size: 0.82em;
    color: var(--text-muted);
}
.item-time .updated-at-spacing {
    margin-left: 14px;
}

.item-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    background-color: rgba(79, 142, 247, 0.06);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.88em;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
    border: 1.5px solid transparent;
}
.action-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 142, 247, 0.35);
}
.action-btn-offline {
    background-color: rgba(52, 152, 219, 0.06);
    color: #3498db;
    border-color: transparent;
}
.action-btn-offline:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    box-shadow: 0 4px 14px rgba(52, 152, 219, 0.35);
}

/* ===== 没有搜索结果样式 ===== */
.no-results-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}
.no-results-content {
    text-align: center;
    color: var(--text-muted);
}
.no-results-content i {
    font-size: 56px;
    display: block;
    margin-bottom: 20px;
    color: var(--text-muted);
    opacity: 0.5;
}
.no-results-content p {
    font-size: 1.2em;
    margin: 0;
    font-weight: 500;
}

/* ===== 骨架屏 Loading 样式 ===== */
.skeleton-container {
    padding: 0;
}
.skeleton-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px 22px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
}
/* shimmer 闪光效果 */
.skeleton-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(79, 142, 247, 0.06) 40%,
        rgba(139, 92, 246, 0.06) 60%,
        transparent 100%
    );
    animation: skeletonShimmer 2.5s ease-in-out infinite;
}
@keyframes skeletonShimmer {
    0%   { transform: translateX(-100%); }
    40%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}
body.dark-mode .skeleton-item::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(79, 142, 247, 0.1) 40%,
        rgba(139, 92, 246, 0.1) 60%,
        transparent 100%
    );
}

.skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(79,142,247,0.1), rgba(139,92,246,0.1));
    flex-shrink: 0;
}
.skeleton-body {
    flex: 1;
    min-width: 0;
}
.skeleton-title {
    height: 18px;
    border-radius: 9px;
    background: rgba(79,142,247,0.1);
    margin-bottom: 12px;
    width: 70%;
}
.skeleton-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}
.skeleton-tag {
    height: 22px;
    width: 56px;
    border-radius: 11px;
    background: rgba(79,142,247,0.1);
}
.skeleton-info {
    height: 16px;
    width: 72px;
    border-radius: 8px;
    background: rgba(79,142,247,0.08);
}
.skeleton-time {
    height: 14px;
    width: 200px;
    border-radius: 7px;
    background: rgba(79,142,247,0.06);
}
.skeleton-action {
    width: 90px;
    height: 36px;
    border-radius: 18px;
    background: rgba(79,142,247,0.08);
    flex-shrink: 0;
}
/* 第二行起逐步缩短，制造参差感 */
.skeleton-item:nth-child(2) .skeleton-title { width: 60%; }
.skeleton-item:nth-child(3) .skeleton-title { width: 80%; }
.skeleton-item:nth-child(4) .skeleton-title { width: 55%; }
.skeleton-item:nth-child(5) .skeleton-title { width: 65%; }
.skeleton-item:nth-child(2) .skeleton-time { width: 180px; }
.skeleton-item:nth-child(3) .skeleton-time { width: 220px; }
.skeleton-item:nth-child(4) .skeleton-time { width: 160px; }
.skeleton-item:nth-child(5) .skeleton-time { width: 190px; }

/* Loading 进度提示 */
.loading-hint {
    text-align: center;
    padding: 16px 0 8px 0;
    color: var(--primary);
    font-size: 0.92em;
    font-weight: 500;
    animation: pulse-text 2s ease-in-out infinite;
}
.loading-hint .loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}
@keyframes pulse-text {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
}

/* 骨架淡入 */
.skeleton-item {
    animation: skeletonIn 0.4s ease backwards;
}
.skeleton-item:nth-child(1) { animation-delay: 0.0s; }
.skeleton-item:nth-child(2) { animation-delay: 0.07s; }
.skeleton-item:nth-child(3) { animation-delay: 0.14s; }
.skeleton-item:nth-child(4) { animation-delay: 0.21s; }
.skeleton-item:nth-child(5) { animation-delay: 0.28s; }
@keyframes skeletonIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== 搜索深度按钮样式 ===== */
.search-depth-buttons .filter-btn {
    transition: var(--transition);
}
.search-depth-buttons .filter-btn.active-depth {
    background: linear-gradient(135deg, var(--primary), #8b5cf6) !important;
    color: white !important;
    border-color: transparent !important;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(79, 142, 247, 0.3);
}

/* ===== 详情页样式 ===== */
.search-detail-header ~ .back-home {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.search-detail-header ~ .back-home .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    padding: 8px 18px;
    background-color: rgba(79, 142, 247, 0.06);
    border-radius: 50px;
    transition: var(--transition);
    border: 1.5px solid transparent;
}
.search-detail-header ~ .back-home .back-link:hover {
    background-color: rgba(79, 142, 247, 0.12);
    color: var(--primary-dark);
    transform: translateY(-1px);
    text-decoration: none;
    border-color: var(--primary);
}

.detail-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 28px;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}
.detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--accent));
}

.detail-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--border-light);
    line-height: 1.5;
}
.detail-info {
    margin-bottom: 25px;
}
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    align-items: center;
}
.info-row:last-child {
    border-bottom: none;
}
.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.92em;
}
.info-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.5;
}
.info-value {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
    text-align: right;
    font-size: 0.95em;
}
.info-hash {
    font-family: "SF Mono", "Fira Code", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
    font-size: 0.82em !important;
    letter-spacing: 0.5px;
}

/* ===== 磁力链接按钮 ===== */
.detail-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px auto 0 auto;
    flex-wrap: wrap;
}
.magnet-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 1em;
    font-weight: 600;
    box-sizing: border-box;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    width: auto;
    min-width: 160px;
    margin: 0;
    position: relative;
    overflow: hidden;
}
.magnet-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: var(--transition);
}
.magnet-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 93, 93, 0.35);
}
.magnet-link:hover::before {
    opacity: 1;
}
.magnet-link:active {
    transform: translateY(0);
}

/* ===== 离线下载按钮 ===== */
.offline-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #3498db, #2471a3);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 1em;
    font-weight: 600;
    box-sizing: border-box;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    width: auto;
    min-width: 160px;
    position: relative;
    overflow: hidden;
}
.offline-download-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: var(--transition);
}
.offline-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.35);
    color: white;
}
.offline-download-btn:hover::before {
    opacity: 1;
}
.offline-download-btn:active {
    transform: translateY(0);
}
body.dark-mode .offline-download-btn {
    background: linear-gradient(135deg, #2471a3, #1a5276);
}
body.dark-mode .offline-download-btn:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* ===== 相关资源 ===== */
.related-section {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 40px;
}
.related-title {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
}
.related-list {
    list-style: none;
}
.related-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 16px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    animation: fadeInUp 0.3s ease;
}
.related-item:last-child {
    margin-bottom: 0;
}
.related-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    background-color: var(--bg-card-hover);
    border-color: var(--primary);
}
.related-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: var(--transition);
}
.related-link:hover {
    color: var(--primary);
}
.related-meta {
    color: var(--text-muted);
    font-size: 0.85em;
    flex-shrink: 0;
}

/* ===== 文件列表 ===== */
.files-section {
    margin-top: 25px;
    padding-top: 22px;
    border-top: 2px solid var(--border-light);
}
.files-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.files-list {
    background-color: rgba(0,0,0,0.02);
    border-radius: var(--radius-md);
    padding: 12px;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
}
.file-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.file-item:hover {
    background-color: rgba(79, 142, 247, 0.04);
}
.file-item:last-child {
    border-bottom: none;
}
.file-emoji {
    font-size: 1.4em;
    margin-right: 12px;
    width: 28px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.file-info {
    flex: 1;
    min-width: 0;
}
.file-name {
    font-size: 0.93em;
    color: var(--text-primary);
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-size {
    font-size: 0.8em;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== 夜间模式 - 搜索页 ===== */
body.dark-mode .stats {
    color: var(--text-muted);
}
body.dark-mode .search-results-header h1,
body.dark-mode .search-detail-header h1 {
    color: var(--text-primary);
}
body.dark-mode .back-link {
    background-color: rgba(79, 142, 247, 0.1);
    color: var(--primary-light);
}
body.dark-mode .back-link:hover {
    background-color: rgba(79, 142, 247, 0.18);
    color: var(--primary-light);
    border-color: var(--primary-dark);
}

/* 夜间模式搜索框 */
body.dark-mode .search-results-header + .search-form {
    background-color: var(--bg-card);
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}
body.dark-mode .search-results-header + .search-form .layui-input {
    background-color: rgba(0,0,0,0.2);
    color: var(--text-primary);
    border-color: var(--border-light);
}
body.dark-mode .search-results-header + .search-form .search-submit-btn {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
body.dark-mode .search-results-header + .search-form .search-submit-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

/* 夜间模式筛选排序按钮 */
body.dark-mode .category-buttons span,
body.dark-mode .sort-buttons span {
    color: var(--text-muted);
}
body.dark-mode .category-buttons a,
body.dark-mode .sort-buttons a {
    background-color: var(--bg-card);
    color: var(--text-muted);
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}
body.dark-mode .category-buttons a:hover,
body.dark-mode .sort-buttons a:hover {
    background-color: rgba(79, 142, 247, 0.1);
    border-color: var(--primary-dark);
    color: var(--primary-light);
    box-shadow: 0 3px 10px rgba(79, 142, 247, 0.2);
}
body.dark-mode .category-buttons a.layui-btn-normal,
body.dark-mode .sort-buttons a.layui-btn-normal {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(79, 142, 247, 0.3);
}
body.dark-mode .category-buttons a.layui-btn-normal:hover,
body.dark-mode .sort-buttons a.layui-btn-normal:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 5px 16px rgba(79, 142, 247, 0.4);
}

/* 夜间模式搜索结果 */
body.dark-mode .result-item {
    background-color: var(--bg-card);
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}
body.dark-mode .result-item:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}
body.dark-mode .result-item::before {
    background: linear-gradient(180deg, var(--primary-dark), #7c3aed);
}
body.dark-mode .item-icon {
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.12), rgba(139, 92, 246, 0.12));
}
body.dark-mode .result-item:hover .item-icon {
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.2), rgba(139, 92, 246, 0.2));
}
body.dark-mode .item-title {
    color: var(--text-primary);
}
body.dark-mode .item-title:hover {
    color: var(--primary-light);
}
/* 搜索关键词高亮样式 */
.item-title mark {
    background: rgba(255, 214, 0, 0.35);
    color: inherit;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 700;
}
body.dark-mode .item-title mark {
    background: rgba(255, 214, 0, 0.25);
    color: inherit;
}
body.dark-mode .meta-tag {
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.12), rgba(139, 92, 246, 0.12));
    color: var(--primary-light);
}
body.dark-mode .meta-info {
    color: var(--text-muted);
}
body.dark-mode .item-time {
    color: var(--text-muted);
}
body.dark-mode .action-btn {
    background-color: rgba(79, 142, 247, 0.1);
    color: var(--primary-light);
    border-color: transparent;
}
body.dark-mode .action-btn:hover {
    background-color: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}
body.dark-mode .action-btn-offline {
    background-color: rgba(52, 152, 219, 0.1);
    color: #5dade2;
}
body.dark-mode .action-btn-offline:hover {
    background-color: #2471a3;
    color: white;
    border-color: #2471a3;
}
body.dark-mode .layui-btn-normal {
    background-color: var(--primary-dark);
    color: white;
}

/* 夜间模式详情页 */
body.dark-mode .detail-card {
    background-color: var(--bg-card);
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}
body.dark-mode .detail-card::before {
    background: linear-gradient(90deg, var(--primary-dark), #7c3aed, var(--accent-dark));
}
body.dark-mode .detail-title {
    color: var(--text-primary);
    border-bottom-color: var(--border-light);
}
body.dark-mode .info-row {
    border-bottom-color: var(--border-light);
}
body.dark-mode .info-label {
    color: var(--text-muted);
}
body.dark-mode .info-label::before {
    background: var(--primary-light);
}
body.dark-mode .info-value {
    color: var(--text-primary);
}
body.dark-mode .magnet-link {
    background: linear-gradient(135deg, var(--accent-dark), #c0392b);
}
body.dark-mode .magnet-link:hover {
    box-shadow: 0 6px 20px rgba(245, 93, 93, 0.4);
}
body.dark-mode .related-title {
    color: var(--text-primary);
    border-left-color: var(--primary-dark);
}
body.dark-mode .related-item {
    background-color: var(--bg-card);
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}
body.dark-mode .related-item:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}
body.dark-mode .related-link {
    color: var(--text-primary);
}
body.dark-mode .related-link:hover {
    color: var(--primary-light);
}
body.dark-mode .related-meta {
    color: var(--text-muted);
}
body.dark-mode .files-section {
    border-top-color: var(--border-light);
}
body.dark-mode .files-title {
    color: var(--text-primary);
}
body.dark-mode .files-list {
    background-color: rgba(0,0,0,0.15);
    border-color: var(--border-light);
}
body.dark-mode .file-item {
    border-bottom-color: var(--border-light);
}
body.dark-mode .file-item:hover {
    background-color: rgba(79, 142, 247, 0.06);
}
body.dark-mode .file-name {
    color: var(--text-primary);
}
body.dark-mode .file-size {
    color: var(--text-muted);
}
body.dark-mode .no-results-content {
    color: var(--text-muted);
}
body.dark-mode .no-results-content i {
    color: var(--text-muted);
    opacity: 0.4;
}

/* ===== 响应式 - 移动端 ===== */
@media (max-width: 768px) {
    .result-item {
        flex-direction: column;
        text-align: center;
        padding: 18px;
        gap: 14px;
    }
    .result-item::before {
        width: 100%;
        height: 4px;
        top: 0;
        bottom: auto;
        left: 0;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }
    .result-item:hover::before {
        opacity: 1;
    }
    .item-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    .item-meta {
        justify-content: center;
        gap: 10px;
    }
    .item-title {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    .action-btn {
        width: 100%;
    }
    .info-row {
        flex-direction: column;
        gap: 4px;
    }
    .info-value {
        text-align: left;
    }
    .detail-card {
        padding: 20px;
    }
    .category-buttons a,
    .sort-buttons a {
        padding: 6px 12px;
        font-size: 0.82em;
    }
}
