/**
 * 搜索页面样式 - 沉浸式单栏设计
 */

/* ==================== 工具类 ==================== */
.ls-hidden { display: none !important; }

/* ==================== 页面容器 ==================== */
.ls-search-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
}

/* 头部渐变背景 */
.ls-search-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 280px;
    background: linear-gradient(180deg, rgba(26, 115, 232, 0.06) 0%, rgba(26, 115, 232, 0.02) 40%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.ls-search-page > * {
    position: relative;
    z-index: 1;
}

/* ==================== 搜索头部 - 沉浸式大搜索框 ==================== */
.ls-search-hero {
    padding: 32px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 搜索输入框 */
.ls-search-input-box {
    width: 100%;
    max-width: 680px;
    display: flex;
    align-items: center;
    background: var(--ls-card-bg, #fff);
    border-radius: 28px;
    padding: 6px 8px 6px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s, transform 0.2s;
}

.ls-search-input-box:focus-within {
    box-shadow: 0 4px 24px rgba(26, 115, 232, 0.15);
    transform: translateY(-1px);
}

.ls-search-input-box > i {
    font-size: 22px;
    color: var(--ls-text-muted, #909090);
    flex-shrink: 0;
    transition: color 0.2s;
}

.ls-search-input-box:focus-within > i {
    color: var(--ls-primary, #1a73e8);
}

.ls-search-input {
    flex: 1;
    height: 48px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--ls-text, #1f1f1f);
    padding: 0 12px;
    outline: none;
}

.ls-search-input::placeholder {
    color: var(--ls-text-muted, #909090);
}

/* 清除按钮 */
.ls-search-input-clear {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ls-text-muted, #bbb);
    border-radius: 50%;
    flex-shrink: 0;
    transition: color 0.2s;
}

.ls-search-input-clear:hover {
    color: var(--ls-text-secondary, #606060);
}

.ls-search-input-clear i {
    font-size: 18px;
}

/* ==================== 搜索历史 ==================== */
.ls-search-history {
    width: 100%;
    max-width: 680px;
}

.ls-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ls-history-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ls-text-secondary, #606060);
}

.ls-history-clear {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: var(--ls-text-muted, #909090);
    cursor: pointer;
    transition: color 0.2s;
}

.ls-history-clear:hover {
    color: var(--ls-text, #1f1f1f);
}

.ls-history-clear i {
    font-size: 14px;
}

.ls-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ls-history-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--ls-card-bg, #fff);
    border-radius: 16px;
    font-size: 13px;
    color: var(--ls-text-secondary, #606060);
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ls-history-item:hover {
    background: var(--ls-primary-light, #e8f0fe);
    color: var(--ls-primary, #1a73e8);
}

.ls-history-item .ls-history-remove {
    font-size: 14px;
    color: var(--ls-text-muted, #bbb);
    margin-left: 2px;
    border-radius: 50%;
    transition: color 0.2s;
}

.ls-history-item .ls-history-remove:hover {
    color: var(--ls-text, #1f1f1f);
}

/* ==================== 搜索标签栏 ==================== */
.ls-search-tabs {
    display: flex;
    gap: 2px;
    background: var(--ls-card-bg, #fff);
    border-radius: 24px;
    padding: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ls-search-tab {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ls-text-secondary, #606060);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}

.ls-search-tab:hover {
    color: var(--ls-text, #1f1f1f);
    background: var(--ls-bg, #f5f6f7);
}

.ls-search-tab.ls-active {
    background: var(--ls-primary, #1a73e8);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

/* ==================== 筛选条 ==================== */
.ls-search-filter-bar {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 0 0;
}

.ls-search-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ls-filter-sep {
    width: 1px;
    height: 16px;
    background: var(--ls-bg, #e8e8e8);
    margin: 0 6px;
    flex-shrink: 0;
}

.ls-filter-group {
    display: flex;
    gap: 4px;
}

.ls-filter-chip {
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ls-text-muted, #909090);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.ls-filter-chip:hover {
    color: var(--ls-text, #1f1f1f);
    background: var(--ls-bg, #f5f6f7);
}

.ls-filter-chip.ls-active {
    background: var(--ls-primary, #1a73e8);
    color: #fff;
}

/* ==================== 搜索结果区域 ==================== */
.ls-search-body {
    max-width: 680px;
    margin: 24px auto 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 60px;
    min-height: 500px;
}

/* ==================== 快照卡片（全部模式下的用户/论坛/标签） ==================== */
.ls-search-snapshot {
    background: var(--ls-card-bg, #fff);
    border-radius: var(--ls-radius, 12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.ls-snapshot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 6px;
}

.ls-snapshot-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ls-text-secondary, #606060);
}

.ls-snapshot-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ls-primary, #1a73e8);
    background: var(--ls-primary-light, #e8f0fe);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.ls-snapshot-more:hover {
    background: var(--ls-primary, #1a73e8);
    color: #fff;
}

.ls-snapshot-more i {
    font-size: 14px;
}

.ls-snapshot-list {
    display: flex;
    gap: 0;
    padding: 4px 8px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.ls-snapshot-list::-webkit-scrollbar {
    display: none;
}

/* 用户快照卡片 */
.ls-snapshot-user-list .user-list-split {
    flex-shrink: 0;
    width: 200px;
    border: none;
    border-radius: var(--ls-radius, 12px);
    margin: 0 4px;
    transition: background 0.2s;
}

.ls-snapshot-user-list .user-list-split:hover {
    background: var(--ls-bg, #f5f6f7);
}

/* 论坛快照卡片 */
.ls-snapshot-bbs-list .bbs-list-split {
    flex-shrink: 0;
    width: 220px;
    border: none;
    border-radius: var(--ls-radius, 12px);
    margin: 0 4px;
    transition: background 0.2s;
}

.ls-snapshot-bbs-list .bbs-list-split:hover {
    background: var(--ls-bg, #f5f6f7);
}

/* 标签快照 */
.ls-snapshot-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 16px 14px;
}

.ls-snapshot-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--ls-bg, #f5f6f7);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.ls-snapshot-tag:hover {
    background: var(--ls-primary-light, #e8f0fe);
}

.ls-snapshot-tag-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ls-text, #1f1f1f);
}

.ls-snapshot-tag:hover .ls-snapshot-tag-name {
    color: var(--ls-primary, #1a73e8);
}

.ls-snapshot-tag-count {
    font-size: 11px;
    color: var(--ls-text-muted, #909090);
}

/* ==================== 用户/板块列表卡片通用样式 ==================== */
/* user-list-split 通用 */
.ls-search-page .user-list-split {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    border-radius: var(--ls-radius, 12px);
    transition: background 0.2s;
}

.ls-search-page .user-list-split:hover {
    background: var(--ls-bg, #f5f6f7);
}

.ls-search-page .user-list-split .left {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
}

.ls-search-page .user-list-split .left > img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* 用户认证图标 - 头像右下角 */
.ls-search-page .user-list-split .left .ls-avatar-verify {
    position: absolute;
    bottom: -2px;
    right: -2px;
    display: block;
    line-height: 0;
}

.ls-search-page .user-list-split .left .ls-avatar-verify img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--ls-card-bg, #fff);
    background: var(--ls-card-bg, #fff);
}

.ls-search-page .user-list-split .right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ls-search-page .user-list-split .name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ls-text, #1f1f1f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 隐藏等级标识 */
.ls-search-page .user-list-split .name .ls-mark {
    display: none;
}

.ls-search-page .user-list-split .desc {
    font-size: 12px;
    color: var(--ls-text-muted, #909090);
    display: flex;
    gap: 12px;
}

.ls-search-page .user-list-split .desc span {
    white-space: nowrap;
}

/* bbs-list-split 通用 */
.ls-search-page .bbs-list-split {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    border-radius: var(--ls-radius, 12px);
    transition: background 0.2s;
}

.ls-search-page .bbs-list-split:hover {
    background: var(--ls-bg, #f5f6f7);
}

.ls-search-page .bbs-list-split .left {
    flex-shrink: 0;
}

.ls-search-page .bbs-list-split .left img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.ls-search-page .bbs-list-split .right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ls-search-page .bbs-list-split .info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ls-search-page .bbs-list-split .name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ls-text, #1f1f1f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ls-search-page .bbs-list-split .number {
    font-size: 12px;
    color: var(--ls-text-muted, #909090);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
}

.ls-search-page .bbs-list-split .number i {
    font-size: 13px;
}

.ls-search-page .bbs-list-split .desc {
    font-size: 12px;
    color: var(--ls-text-muted, #909090);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== 搜索结果列表 ==================== */
/* 用户列表模式 */
.ls-search-list[data-type="user"] {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ls-search-list[data-type="user"] .user-list-split {
    border-radius: var(--ls-radius, 12px);
    border-color: var(--ls-bg, #f0f0f0);
    background: var(--ls-card-bg, #fff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* 论坛列表模式 */
.ls-search-list[data-type="bbs"] {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ls-search-list[data-type="bbs"] .bbs-list-split {
    border-radius: var(--ls-radius, 12px);
    border-color: var(--ls-bg, #f0f0f0);
    background: var(--ls-card-bg, #fff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* 空状态 */
.ls-search-list .jinsom-empty-page,
.ls-search-list .jinsom-more-loading {
    grid-column: 1 / -1;
}

/* ==================== 加载更多 ==================== */
.ls-search-load-more {
    padding: 20px 0;
    text-align: center;
}

.ls-search-load-more .ls-load-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 32px;
    background: var(--ls-card-bg, #fff);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ls-text-secondary, #606060);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ls-search-load-more .ls-load-btn:hover {
    background: var(--ls-primary-light, #e8f0fe);
    color: var(--ls-primary, #1a73e8);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
}

.ls-search-load-more .ls-load-btn i {
    font-size: 14px;
}
