/* ===== 搜索按钮 ===== */
/* ===== 搜索按钮 ===== */
.search-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px 8px 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    border-bottom: 2px solid transparent;
}

/* 下划线 - 默认透明，悬浮出现 */
.search-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6, #8b5cf6);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateX(-50%);
}

/* 悬浮效果 */
.search-btn:hover {
    color: #3b82f6;
}

.search-btn:hover::after {
    width: 100%;
}

/* 激活状态 */
.search-btn.active {
    color: #3b82f6;
}

.search-btn.active::after {
    width: 100%;
}

/* 图标 */
.search-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.search-btn:hover svg {
    transform: scale(1.05);
}

/* 文字 */
.search-btn .search-btn-text {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: color 0.3s ease;
}

.search-btn:hover .search-btn-text {
    color: #3b82f6;
}

/* ===== 渐变下划线 - 更漂亮 ===== */
.search-btn-gradient::after {
    background: linear-gradient(90deg, #60a5fa, #3b82f6, #8b5cf6, #60a5fa);
    background-size: 300% 100%;
}

.search-btn-gradient:hover::after {
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== 全屏搜索遮罩 - fixed 定位，不占文档流 ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== 搜索容器 ===== */
.search-container {
    width: 100%;
    max-width: 640px;
    padding: 0 24px;
    position: relative;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-overlay.active .search-container {
    transform: translateY(0);
    opacity: 1;
}

/* ===== 关闭按钮 ===== */
.search-close-btn {
    position: absolute;
    top: -60px;
    right: 0;
    padding: 10px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    cursor: pointer;
    border-radius: 50%;
    color: #6b7280;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #3b82f6;
    transform: rotate(90deg);
}

/* ===== 搜索标题 ===== */
.search-title {
    font-size: 28px;
    font-weight: 300;
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: 2px;
}

/* ===== 搜索表单 ===== */
.search-form-center {
    width: 100%;
}

.search-input-wrap-center {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f0f4f9;
    border-radius: 16px;
    padding: 4px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.search-input-wrap-center:focus-within {
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.10);
}

.search-icon-center {
    padding: 0 4px 0 16px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.search-input-wrap-center:focus-within .search-icon-center {
    color: #3b82f6;
}

.search-input-center {
    flex: 1;
    padding: 14px 12px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: #1a1a2e;
    outline: none;
    min-width: 0;
    font-family: inherit;
}

.search-input-center::placeholder {
    color: #b8c8d8;
    font-weight: 300;
}

.search-submit-center {
    flex-shrink: 0;
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    white-space: nowrap;
    font-family: inherit;
}

.search-submit-center:hover {
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35);
    transform: scale(1.02);
}

.search-submit-center:active {
    transform: scale(0.97);
}

/* ===== 热门搜索 ===== */
.search-hot-center {
    margin-top: 32px;
    text-align: center;
}

.search-hot-header-center {
    margin-bottom: 14px;
}

.search-hot-header-center span {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.search-hot-tags-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.search-hot-tags-center a {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    color: #4a7a9a;
    background: rgba(96, 165, 250, 0.06);
    border: 1px solid rgba(96, 165, 250, 0.08);
    text-decoration: none;
    transition: all 0.25s ease;
}

.search-hot-tags-center a:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

/* ===== 快捷键提示 ===== */
.search-shortcut-hint {
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: #b8c8d8;
}

.search-shortcut-hint kbd {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: #f0f2f5;
    border: 1px solid #e8ecf0;
    font-family: inherit;
}

/* ===== 滚动条隐藏 ===== */
.search-overlay::-webkit-scrollbar {
    display: none;
}
.search-overlay {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== 移动端适配 ===== */
@media (max-width: 640px) {
    .search-container {
        padding: 0 20px;
    }
    
    .search-title {
        font-size: 20px;
        margin-bottom: 24px;
    }
    
    .search-input-wrap-center {
        border-radius: 12px;
        padding: 3px;
    }
    
    .search-input-center {
        font-size: 16px;
        padding: 12px 10px;
    }
    
    .search-submit-center {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .search-icon-center {
        padding: 0 4px 0 12px;
    }
    
    .search-icon-center svg {
        width: 18px;
        height: 18px;
    }
    
    .search-hot-tags-center a {
        font-size: 12px;
        padding: 5px 14px;
    }
    
    .search-close-btn {
        top: -50px;
        right: 0;
        padding: 8px;
    }
    
    .search-close-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .search-shortcut-hint {
        font-size: 11px;
        margin-top: 20px;
    }
}