/* 搜索页面样式 */

/* ========================================================================== */
/* 1. 基础工具类 */
/* ========================================================================== */
.p-ellipsis-2 {
    overflow: hidden;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    word-break: break-word;
}

/* ========================================================================== */
/* 2. 搜索框模块 */
/* ========================================================================== */
.search-box-section {
    padding: 0.4rem 0.3rem;
    margin-bottom: 0.15rem;
}

.search-container {
    max-width: 7.5rem;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 0.4rem;
    overflow: hidden;
    height: 0.8rem;
    padding: 0 0.2rem;
    box-shadow: 0 .02rem .1rem rgba(0, 0, 0, .08);
    border: .01rem solid #e8e8e8;
    transition: all .3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 .02rem .12rem rgba(102, 126, 234, .2);
    background-color: #f5f5f5;
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.32rem;
    margin-right: 0.15rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    height: 100%;
    border: none !important;
    outline: none;
    background: transparent;
    font-size: 0.26rem;
    color: #333;
    padding: 0;
    font-family: inherit;
    border-radius: 0;
}

.search-input::placeholder {
    color: #999;
    font-size: 0.26rem;
}

.search-btn {
    width: 1.2rem;
    height: 0.6rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 0.3rem;
    font-size: 0.26rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 .02rem .1rem rgba(102, 126, 234, .4);
    margin-left: 0.15rem;
    flex-shrink: 0;
    font-family: inherit;
}

.search-btn:hover {
    background: linear-gradient(135deg, #4a56c8 0%, #5a36b1 100%);
    transform: translateY(-.01rem);
    box-shadow: 0 .04rem .12rem rgba(102, 126, 234, .4);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 .02rem .06rem rgba(102, 126, 234, .3);
}

/* ========================================================================== */
/* 3. 热搜模块 */
/* ========================================================================== */
.hot-search-section {
    padding: 0.3rem;
    margin-bottom: 0.15rem;
    border-radius: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.section-header h2 {
    font-size: 0.28rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.hot-search-list {
    padding: 0.1rem 0;
}

.hot-search-list ul {
    margin: 0;
    padding: 0;
}

.hot-search-item {
    display: flex;
    align-items: center;
    padding: 0.2rem 0;
    border-bottom: .01rem solid #f5f5f5;
}

.hot-search-item:last-child {
    border-bottom: none;
}

.hot-rank {
    width: 0.4rem;
    height: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #666;
    border-radius: 0.05rem;
    font-size: 0.2rem;
    font-weight: 600;
    margin-right: 0.2rem;
}

.hot-rank-top {
    background-color: #667eea;
    color: white;
}

.hot-key {
    font-size: 0.26rem;
    color: #333;
    flex: 1;
    transition: color .3s ease;
}

.hot-key:hover {
    color: #667eea;
}

/* ========================================================================== */
/* 4. 搜索结果模块 */
/* ========================================================================== */
.search-results-section {
    margin-bottom: 0.15rem;
}

.search-keyword {
    padding: 0.2rem 0.3rem;
    border-bottom: .01rem solid #f0f0f0;
}

.search-keyword p {
    margin: 0;
    font-size: 0.26rem;
    color: #666;
}

#keyword-display {
    color: #667eea;
    font-weight: 500;
    margin-left: 0.1rem;
}

/* 4.1 结果分类标签 */
.result-tabs {
    padding: 0.2rem 0.3rem 0 0.3rem;
    border-bottom: .01rem solid #f0f0f0;
}

.result-tabs ul {
    margin: 0;
    padding: 0;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.result-tabs ul::-webkit-scrollbar {
    display: none;
}

.result-tabs li {
    flex-shrink: 0;
    margin-right: 0.4rem;
    position: relative;
}

.result-tabs li a {
    display: inline-block;
    padding: 0.15rem 0;
    font-size: 0.26rem;
    color: #666;
    position: relative;
    transition: all .3s ease;
    white-space: nowrap;
    outline: none;
}

.result-tabs li a:hover {
    color: #667eea;
}

.result-tabs li.current a {
    color: #667eea;
    font-weight: 600;
}

.result-tabs li.current::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.04rem;
    background-color: #667eea;
    border-radius: 0.02rem;
    box-shadow: 0 .02rem .08rem rgba(102, 126, 234, .3);
}

/* 4.2 搜索结果内容区域 */
.search-results-content {
    padding: 0 0.3rem;
}

/* 4.3 结果分组 */
.result-group {
    margin-bottom: 0.3rem;
    padding-top: 0.2rem;
}

.result-all .result-group ul > li:nth-child(n+4) {
    display: none;
}

.group-header {
    margin-bottom: 0.2rem;
}

.group-header h3 {
    margin: 0;
    font-size: 0.26rem;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-left: 0.15rem;
}

.group-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.06rem;
    height: 0.28rem;
    background-color: #667eea;
    border-radius: 0.03rem;
}

.more-link {
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.more-link span {
    color: #999;
    font-size: 0.2rem;
    margin-left: 0.1rem;
}

/* 4.4 游戏结果样式 */
.game-results-list {
    margin: 0;
    padding: 0;
}

.game-result-item {
    margin-bottom: 0.2rem;
    background-color: #ffffff;
    border-radius: 0.1rem;
    overflow: hidden;
    transition: all .3s ease;
    border: .01rem solid #f0f0f0;
}

.game-result-item:hover {
    transform: translateY(-.02rem);
    box-shadow: 0 .05rem .15rem rgba(0, 0, 0, .1);
}

.game-result-link {
    display: flex;
    align-items: center;
    padding: 0.2rem;
    color: inherit;
    flex: 1;
    text-decoration: none;
}

.game-result-link:hover {
    text-decoration: none;
}

.game-result-img {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 0.08rem;
    margin-right: 0.2rem;
    object-fit: cover;
}

.game-result-info {
    flex: 1;
}

.game-result-title {
    font-size: 0.26rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 0.1rem 0;
}

.game-result-desc {
    font-size: 0.22rem;
    color: #666;
    margin: 0 0 0.1rem 0;
    line-height: 1.5;
}

.game-result-meta {
    display: flex;
    align-items: center;
}

.game-category, .game-size, .game-update {
    font-size: 0.2rem;
    color: #999;
    margin-right: 0.2rem;
}

.game-result-item .flex {
    display: flex;
    align-items: flex-start;
}

.game-result-item .btn-download {
    margin-left: 0.2rem;
    margin-right: 0.2rem;
    flex-shrink: 0;
    align-self: center;
    height: auto;
    min-height: 0.4rem;
}

/* 4.5 资讯和攻略结果样式 */
.news-results-list, .guide-results-list {
    margin: 0;
    padding: 0;
}

.news-result-item, .guide-result-item {
    margin-bottom: 0.2rem;
    background-color: #f9f9f9;
    border-radius: 0.1rem;
    overflow: hidden;
    transition: all .3s ease;
}

.news-result-item:hover, .guide-result-item:hover {
    transform: translateY(-.02rem);
    box-shadow: 0 .05rem .15rem rgba(0, 0, 0, .1);
}

.news-result-item a, .guide-result-item a {
    display: flex;
    align-items: center;
    padding: 0.2rem;
    color: inherit;
}

.news-result-img, .guide-result-img {
    width: 1.2rem;
    height: 0.9rem;
    border-radius: 0.08rem;
    margin-right: 0.2rem;
    object-fit: cover;
}

.news-result-info, .guide-result-info {
    flex: 1;
}

.news-result-title, .guide-result-title {
    font-size: 0.26rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 0.1rem 0;
    line-height: 1.4;
}

.news-result-meta, .guide-result-meta {
    display: flex;
    align-items: center;
}

.news-time, .guide-views, .guide-time {
    font-size: 0.2rem;
    color: #999;
    margin-right: 0.2rem;
}

.news-category, .guide-category {
    padding: .02rem .1rem;
    border-radius: 0.1rem;
    font-size: 0.18rem;
    color: white;
    margin-right: 0.2rem;
}

.news-category {
    background-color: #667eea;
}

.guide-category {
    background-color: #f57c00;
}

/* 4.6 专题和合集结果样式 */
.topic-results-grid, .collection-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.2rem;
    padding: 0.1rem 0;
}

.topic-result-item, .collection-result-item {
    background-color: #f9f9f9;
    border-radius: 0.1rem;
    overflow: hidden;
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
}

.topic-result-item:hover, .collection-result-item:hover {
    transform: translateY(-.03rem);
    box-shadow: 0 .05rem .15rem rgba(0, 0, 0, .1);
}

.topic-img-container, .collection-img-container {
    height: 1.5rem;
    overflow: hidden;
}

.topic-result-img, .collection-result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.topic-result-item:hover .topic-result-img {
    transform: scale(1.05);
}

.collection-result-item:hover .collection-result-img {
    transform: scale(1.05);
}

.topic-result-title, .collection-result-title {
    font-size: 0.26rem;
    font-weight: 500;
    color: #333;
    margin: 0.15rem;
    line-height: 1.4;
}

.topic-result-desc, .collection-result-desc {
    font-size: 0.2rem;
    color: #666;
    margin: 0 0.15rem 0.15rem 0.15rem;
    line-height: 1.4;
}

/* ========================================================================== */
/* 5. 无结果提示 */
/* ========================================================================== */
.no-results-section {
    padding: 1rem 0;
    margin-bottom: 0.15rem;
}

.no-results-content {
    text-align: center;
    padding: 0.5rem;
}

.no-results-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 auto 0.3rem;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-results-icon i {
    font-size: 0.8rem;
    color: #ccc;
}

.no-results-text {
    font-size: 0.26rem;
    color: #666;
    margin: 0 0 0.1rem 0;
}

.no-results-suggestion {
    font-size: 0.26rem;
    color: #999;
    margin: 0 0 0.3rem 0;
}

.clear-search-btn {
    padding: 0.15rem 0.5rem;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 0.3rem;
    font-size: 0.26rem;
    cursor: pointer;
    transition: all .3s ease;
}

.clear-search-btn:hover {
    background-color: #5a67d8;
    transform: translateY(-.01rem);
    box-shadow: 0 .05rem .15rem rgba(102, 126, 234, .3);
}

/* ==========================================================================
/* 6. 分页样式 */
/* ========================================================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.15rem;
    margin-left: -0.15rem;
}

.mt-5 {
    margin-top: 0.3rem;
}

.xrpagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.2rem 0;
    width: 100%;
}

.xrpagination a,
.xrpagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.6rem;
    height: 0.6rem;
    padding: 0 0.15rem;
    margin: 0 0.05rem;
    border-radius: 0.08rem;
    font-size: 0.24rem;
    color: #666;
    background-color: #f5f5f5;
    text-decoration: none;
    transition: all 0.3s ease;
}

.xrpagination a:hover {
    background-color: #667eea;
    color: #fff;
}

.xrpagination .current,
.xrpagination span.current {
    background-color: #667eea;
    color: #fff;
    font-weight: 600;
}

.xrpagination .disabled,
.xrpagination span.disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ==========================================================================
/* 7. 搜索结果区域基础样式 */
/* ========================================================================== */
.search-results-content {
    padding: 0.2rem 0.3rem;
}

/* ==========================================================================
/* 8. 响应式调整 - 已移至main.js动态控制 */
/* ========================================================================== */