




        /* --- 主内容区域布局 (恢复为双栏) --- */
        .main-content-wrapper {
            display: flex;
            gap: 2rem;
            max-width: 1600px;
            margin: 0 auto;
            padding: 2rem;
            flex-grow: 1;
            width: 100%;
        }

        /* 左侧搜索结果区域 */
        .search-results-section {
            flex: 3;
            width: 75%;
        }

        /* 右侧分类侧边栏 (与首页一致) */
        .category-sidebar {
            width: 25%;
            min-width: 280px;
            max-width: 400px;
            background-color: #fff;
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            align-self: flex-start;
            position: sticky;
            top: 100px;
            height: fit-content;
        }

        .category-title {
            font-size: 1.3rem;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #eee;
        }

        .category-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.7rem;
        }

        /* --- 修改: 分类按钮样式为流式排列 --- */
        .category-btn {
            padding: 0.5rem 1rem;
            background-color: #ecf0f1;
            border: none;
            border-radius: 20px;
            color: #7f8c8d;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s ease;
            /* 移除 flex: 1 和 min-width，使其宽度由内容决定 */
            /* flex: 1; */
            /* min-width: calc(50% - 0.35rem); */
            white-space: nowrap; /* 防止文字换行 */
            text-align: center;
        }

        .category-btn:hover,
        .category-btn.active {
            background-color: #3498db;
            color: #fff;
            transform: translateY(-2px);
        }

        /* --- 搜索结果标题 --- */
        .search-results-title {
            font-size: 1.8rem;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 1.5rem;
            border-bottom: 2px solid #3498db;
            padding-bottom: 0.5rem;
            display: inline-block;
        }

        .search-query {
            color: #3498db;
            font-weight: 700;
        }

        /* --- 搜索结果列表样式 --- */
        .search-results-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            width: 100%;
        }

        .result-item {
            display: flex;
            align-items: center; /* 确保在宽屏下垂直居中 */
            background-color: #fff;
            border-radius: 12px;
            padding: 1rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            border: 1px solid #eee;
            cursor: pointer;
        }

        .result-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            border-color: #3498db;
        }

        .result-cover {
            width: 60px;
            height: 90px;
            border-radius: 6px;
            overflow: hidden;
            flex-shrink: 0;
            margin-right: 1.5rem;
            box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        }

        .result-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .result-details {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .result-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 0.3rem;
        }

        .result-author {
            color: #7f8c8d;
            font-size: 0.9rem;
            margin-bottom: 0.5rem;
        }

        .result-meta {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            font-size: 0.85rem;
        }

        .result-rating {
            display: flex;
            align-items: center;
            gap: 0.3rem;
            color: #f1c40f;
        }

        .rating-star {
            font-size: 1rem;
        }

        .result-year {
            color: #7f8c8d;
        }

        .result-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
            margin-top: 0.5rem;
        }

        .result-tag {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 0.2rem 0.6rem;
            border-radius: 12px;
            font-size: 0.75rem;
            color: #fff;
            font-weight: 500;
        }


        .download-btn {
            padding: 0.5rem 1.2rem;
            background-color: #2ecc71;
            color: #fff;
            border: none;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .download-btn:hover {
            background-color: #27ae60;
            transform: translateY(-2px);
        }

        .download-time {
            font-size: 0.8rem;
            color: #7f8c8d;
            text-align: center;
        }

        /* --- 分页控件样式 --- */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
            margin-top: 3rem;
            padding: 1rem;
            flex-wrap: wrap; /* 新增：允许分页按钮在小屏幕上换行 */
        }

        .pagination-btn {
            padding: 0.6rem 1.2rem;
            border: 1px solid #ddd;
            background-color: #fff;
            color: #333;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-weight: 500;
        }

        .pagination-btn:hover:not(:disabled) {
            background-color: #3498db;
            color: #fff;
            border-color: #3498db;
            transform: translateY(-1px);
        }

        .pagination-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .pagination-btn.active {
            background-color: #3498db;
            color: #fff;
            border-color: #3498db;
        }

        /* --- 页脚样式 --- */
        .main-footer {
            text-align: center;
            padding: 2rem;
            background-color: #fff;
            color: #7f8c8d;
            font-size: 0.9rem;
            border-top: 1px solid #eee;
            margin-top: auto;
        }

        .main-footer a {
            color: #3498db;
            text-decoration: none;
            font-weight: 500;
        }

        .main-footer a:hover {
            text-decoration: underline;
        }

        /* --- 响应式设计 --- */
        @media (max-width: 1200px) {
            .main-content-wrapper {
                gap: 1.2rem;
            }
            .category-sidebar {
                min-width: 250px;
            }
        }

        @media (max-width: 992px) {
            .main-content-wrapper {
                flex-direction: column;
            }
            .search-results-section,
            .category-sidebar {
                width: 100%;
                max-width: none;
            }
            .category-sidebar {
                position: static;
                margin-top: 2rem;
            }
            /* --- 修改: 移除响应式中的固定宽度 --- */
            .category-btn {
                /* min-width: calc(33.333% - 0.5rem); */
            }
        }

        @media (max-width: 768px) {
            .main-header {
                padding: 1rem;
            }
            .nav-links {
                display: none;
                flex-direction: column;
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background-color: #fff;
                box-shadow: 0 5px 10px rgba(0,0,0,0.1);
                padding: 1rem;
                gap: 1rem;
                margin-left: 0;
                z-index: 999;
            }
            .nav-links.active {
                display: flex;
            }
            .menu-toggle {
                display: flex;
            }
            .search-container {
                order: 1;
                margin: 0;
                max-width: none;
            }
            .main-content-wrapper {
                padding: 1rem 0.5rem; /* 优化：减小手机端左右内边距 */
            }
            .result-item {
                flex-direction: column;
                text-align: center;
            }
            .result-cover {
                width: 100px;
                height: 150px;
                margin-right: 0;
                margin-bottom: 1rem;
            }
            .result-meta {
                justify-content: center;
            }
            .result-tags {
                justify-content: center;
            }
            /* --- 修改: 移除响应式中的固定宽度 --- */
            .category-btn {
                /* min-width: calc(50% - 0.35rem); */
            }
            .download-actions {
                border-left: none;
                border-top: 1px solid #eee;
                padding-left: 0;
                padding-top: 1rem;
                width: 100%;
            }
        }

        @media (max-width: 480px) {
            .search-results-title {
                font-size: 1.5rem;
            }
            /* --- 修改: 移除响应式中的固定宽度 --- */
            .category-btn {
                /* min-width: 100%; */
            }
        }