/* 搜索表单样式 */
.search-form {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-form-wrapper {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 8px;
    transition: box-shadow 0.3s;
}

.search-form-wrapper:focus-within {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-field {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    outline: none;
}

.search-field::placeholder {
    color: #999;
}

.search-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-type {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-type:hover {
    border-color: #cbd5e1;
}

.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: #3b82f6;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-submit:hover {
    background: #2563eb;
}

.search-icon {
    fill: currentColor;
}

/* 搜索建议样式 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

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

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f8fafc;
}

.suggestion-item .title {
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 4px;
}

.suggestion-item .meta {
    color: #64748b;
    font-size: 12px;
}

/* 搜索历史样式 */
.search-history {
    margin-top: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 16px;
    display: none;
}

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

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

.search-history-header h4 {
    font-size: 14px;
    color: #475569;
    margin: 0;
}

.clear-history {
    background: none;
    border: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.clear-history:hover {
    background: #f1f5f9;
    color: #475569;
}

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

.history-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f8fafc;
    border-radius: 4px;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: #e2e8f0;
}

.history-item .remove {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    transition: all 0.2s;
}

.history-item .remove:hover {
    background: #cbd5e1;
    color: #475569;
}

/* 热门搜索样式 */
.popular-searches {
    margin-top: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 16px;
}

.popular-searches h4 {
    font-size: 14px;
    color: #475569;
    margin: 0 0 12px 0;
}

.popular-searches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-searches a {
    display: inline-block;
    padding: 6px 12px;
    background: #f8fafc;
    border-radius: 4px;
    color: #475569;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.popular-searches a:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-form-wrapper {
        flex-direction: column;
    }
    
    .search-options {
        width: 100%;
    }
    
    .search-type {
        flex: 1;
    }
    
    .search-submit {
        width: 48px;
    }
} 