/* 搜索框UI */
.banner-search {
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    padding: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #f1f1f1;
}

@media (max-width: 768px) {
    .search-box {
        padding: 8px;
        border: 1.5px solid transparent;
        border-radius: 5px;
    }
}

.search-box.focused {
    border-color: #1678ff;
    background: #ffffff;
}

.search-box input {
    flex: 1;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #283043;
}

.search-box input::placeholder {
    color: #7d7d7d;
}

.search-icon {
    width: 14px;
    height: 14px;
    color: #7d7d7d;
}

.search-icon:hover {
    color: #1678ff;
}

#searchButton {
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: none;
    color: inherit;
    cursor: pointer;
}

/* 悬浮卡片 */
.search-suggestion {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 2000;
    display: none;
    margin-top: 5px;
    padding: 0;
    overflow-y: auto;
    border: 2px solid #1678ff;
    border-radius: 10px;
    background: #ffffff;
}

@media (max-width: 768px) {
    .search-suggestion {
        border: 1.5px solid #1678ff;
        border-radius: 5px;
    }
}

.search-suggestion.active {
    display: block;
}

/* 悬浮卡片：热门推荐 */
.search-suggestion-title {
    padding: 20px 20px 10px;
    font-size: 16px;
    font-weight: bold;
    color: #283043;
}

@media (max-width: 768px) {
    .search-suggestion-title {
        padding: 15px 15px 5px;
        font-size: 14px;
    }
}

.search-suggestion-game {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .search-suggestion-game {
        padding: 10px 15px;
    }
}

.search-suggestion-game:hover {
    background: rgba(125, 125, 125, 0.2);
}

.search-suggestion-game-icon {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 12.5px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .search-suggestion-game-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
}

.search-suggestion-game-text {
    flex: 1;
}

.search-suggestion-game-title {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: bold;
    color: #283043;
}

.search-suggestion-game-desc {
    font-size: 12px;
    color: #7d7d7d;
}

/* 悬浮卡片：搜索历史 */
.search-history {
    padding: 10px 20px 20px;
}

@media (max-width: 768px) {
    .search-history {
        padding: 5px 15px 15px;
    }
}

.search-history-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 16px;
    color: #283043;
}

@media (max-width: 768px) {
    .search-history-title {
        margin-bottom: 15px;
        font-size: 14px;
    }
}

.search-history-clear {
    font-size: 14px;
    color: #1678ff;
    cursor: pointer;
}

.search-history-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 768px) {
    .search-history-items {
        gap: 15px;
    }
}

.search-history-item {
    padding: 10px 20px;
    border-radius: 30px;
    background: #f1f1f1;
    font-size: 14px;
    color: #1678ff;
    cursor: pointer;
}

@media (max-width: 768px) {
    .search-history-item {
        padding: 5px 10px;
        font-size: 12px;
    }
}

.search-history-item:hover {
    background: rgba(125, 125, 125, 0.2);
}

/* 搜索：关键词高亮 */
.highlight {
    padding: 0 2px;
    border-radius: 2px;
    background: #ffe8e8;
    font-weight: bold;
    color: #E63946;
}

/* 搜索：无结果弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    width: 80%;
    max-width: 300px;
    padding: 14.4px 20px 20px;
    text-align: center;
    border-radius: 10px;
    background-color: #ffffff;
}

.modal-content p {
    margin-bottom: 14.4px;
    font-size: 14px;
    line-height: 1.8;
    color: #283043;
}

#noResultConfirm {
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    background: #1678ff;
    font-size: 14px;
    color: #ffffff;
    cursor: pointer;
}

#noResultConfirm:hover {
    background-color: #0d5bbf;
}