.searchAssist {
    position: relative;
    width: 100%;
    z-index: 160;
}

.searchAssist .search {
    margin-top: 22px;
}

.searchHistoryPanel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 12px);
    z-index: 1200;
    padding: 12px;
    border-radius: 14px;
    text-align: left;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 42px rgba(27, 68, 75, .16);
    border: 1px solid rgba(25, 59, 67, .08);
    backdrop-filter: blur(14px);
}

.searchHistoryPanel::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 34px;
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-left: 1px solid rgba(30, 118, 113, .14);
    border-top: 1px solid rgba(30, 118, 113, .14);
    transform: rotate(45deg);
}

.historyHead,
.hotHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.historyHead .title,
.hotHead .title {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 900;
    color: var(--app-ink, #17242c);
}

.clockIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    color: var(--theme-theme);
    font-size: 18px;
    line-height: 1;
}

.clearBtn,
.deleteBtn,
.hotTag {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.clearBtn {
    color: var(--app-primary, #1e7671);
    font-size: 13px;
    font-weight: 700;
}

.historyList {
    margin-top: 9px;
}

.historyItem {
    height: 42px;
    display: flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 10px;
    color: #5f7078;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

.historyItem:hover {
    color: var(--app-primary, #1e7671);
    background-color: rgba(30, 118, 113, .08);
    box-shadow: none;
    transform: translateX(2px);
}

.historyItem .text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.deleteBtn {
    width: 24px;
    height: 24px;
    line-height: 22px;
    border-radius: 50%;
    opacity: 0;
    color: #999;
    transition: opacity .2s ease, color .2s ease, background-color .2s ease;
}

.historyItem:hover .deleteBtn {
    opacity: 1;
}

.deleteBtn:hover {
    color: #fff;
    background-color: var(--app-primary, #1e7671);
}

.historyEmpty {
    padding: 18px 0 10px;
    text-align: center;
    color: #999;
}

.search-history-fade-enter-active,
.search-history-fade-leave-active {
    transition: opacity .18s ease, transform .18s ease;
}

.search-history-fade-enter-from,
.search-history-fade-leave-to {
    opacity: 0;
    transform: translateY(-6px);
}

.history-row-leave-active {
    position: absolute;
}

.history-row-enter-active,
.history-row-leave-active {
    transition: opacity .18s ease, transform .18s ease;
}

.history-row-enter-from,
.history-row-leave-to {
    opacity: 0;
    transform: translateX(12px);
}

.hotSearch {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(25, 59, 67, .06);
    border-radius: 14px;
    text-align: left;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 10px 24px rgba(27, 68, 75, .08);
}

.pulseDot {
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background-color: var(--app-primary, #1e7671);
    box-shadow: 0 0 0 rgba(0, 0, 0, .12);
    animation: hotPulse 1.6s infinite;
}

.rankText {
    color: var(--app-sub, #667881);
    font-size: 11px;
}

.hotTags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
}

.hotEmpty {
    padding-top: 7px;
    color: #999;
    font-size: 12px;
}

.hotTag {
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    color: #40565b;
    background-color: rgba(239, 245, 244, .96);
    box-shadow: none;
    border: 1px solid rgba(23, 36, 44, .05);
    font-size: 11px;
    line-height: 1.35;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: transform .2s ease, color .2s ease, box-shadow .2s ease;
}

.hotTag:hover {
    color: var(--app-primary, #1e7671);
    background: rgba(30, 118, 113, .11);
    transform: translateY(-1px);
    border-color: rgba(30, 118, 113, .12);
    box-shadow: none;
}

.searchList {
    display: block;
    width: min(720px, calc(100% - 32px));
    margin: 0 auto 22px;
}

.searchList .searchAssist .search {
    margin-top: 14px;
}

.searchDetail .searchHistoryPanel,
.headerBox .searchHistoryPanel {
    display: none;
}

@keyframes hotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, .16);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(0, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

@media screen and (max-width: 768px) {
    .searchAssist .search {
        margin-top: 5vw;
    }

    .searchHistoryPanel {
        top: calc(100% + 2vw);
        padding: 3vw;
        border-radius: 3vw;
    }

    .historyItem {
        height: 9.6vw;
        padding: 0 2vw;
    }

    .deleteBtn {
        opacity: 1;
    }

    .hotSearch {
        margin-top: 1.8vw;
        padding: 2vw 1vw 0;
    }

    .hotHead .title,
    .historyHead .title {
        font-size: 3.8vw;
    }

    .rankText,
    .clearBtn {
        font-size: 3.2vw;
    }

    .hotTags {
        gap: 1.6vw;
        padding-top: 1.8vw;
    }

    .hotTag {
        padding: 1.2vw 2.5vw;
        font-size: 3.2vw;
    }

    .searchList {
        width: 100%;
        margin-bottom: 0;
    }
}

/* 浅蓝白主题下的搜索辅助组件覆盖层：保持原交互，只收敛视觉层级。 */
.searchAssist {
    z-index: 420;
}

.searchAssist .search {
    position: relative;
    z-index: 30;
    overflow: visible;
}

.searchHistoryPanel {
    top: calc(100% + 10px);
    z-index: 3000;
    padding: 12px;
    border: 1px solid rgba(47, 111, 255, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 56px rgba(47, 99, 172, .18);
}

.searchHistoryPanel::before {
    border-left-color: rgba(47, 111, 255, .12);
    border-top-color: rgba(47, 111, 255, .12);
}

.historyHead .title,
.hotHead .title {
    color: var(--app-ink, #10243f);
    font-size: 13px;
    font-weight: 1000;
}

.clockIcon {
    color: var(--app-primary, #2f6fff);
}

.clearBtn {
    color: var(--app-primary, #2f6fff);
}

.historyItem {
    height: 40px;
    color: var(--app-sub, #66758a);
}

.historyItem:hover {
    color: var(--app-primary, #2f6fff);
    background-color: rgba(47, 111, 255, .08);
}

.deleteBtn:hover {
    background-color: var(--app-primary, #2f6fff);
}

.hotSearch {
    margin-top: 10px;
    padding: 10px 12px 11px;
    border: 1px solid rgba(47, 111, 255, .09);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 26px rgba(47, 99, 172, .08);
    backdrop-filter: blur(10px);
}

.pulseDot {
    width: 7px;
    height: 7px;
    background: var(--app-primary, #2f6fff);
}

.rankText {
    color: #7c8da3;
    font-size: 11px;
    font-weight: 800;
}

.hotTags {
    gap: 6px;
    padding-top: 8px;
}

.hotTag {
    padding: 4px 9px;
    color: #52657d;
    border: 1px solid rgba(47, 111, 255, .08);
    background-color: #f4f8ff;
    font-size: 11px;
    font-weight: 850;
}

.hotTag:hover {
    color: var(--app-primary, #2f6fff);
    border-color: rgba(47, 111, 255, .18);
    background: rgba(47, 111, 255, .08);
}

.searchList {
    width: min(var(--app-home-width, 720px), calc(100% - 32px));
}

@media screen and (max-width: 768px) {
    .searchHistoryPanel {
        top: calc(100% + 2vw);
        z-index: 3000;
        padding: 3vw;
        border-radius: 4vw;
    }

    .hotSearch {
        margin-top: 2vw;
        padding: 2.2vw 2.6vw 2.4vw;
        border-radius: 4vw;
    }

    .hotHead .title,
    .historyHead .title {
        font-size: 3.4vw;
    }

    .rankText,
    .clearBtn {
        font-size: 2.9vw;
    }

    .hotTags {
        gap: 1.4vw;
        padding-top: 1.6vw;
    }

    .hotTag {
        padding: 1vw 2.2vw;
        font-size: 2.9vw;
    }
}
