/* 搜索容器样式 */
.search-container {
    position: relative;
    display: inline-block;
    /* margin-left: 20px; */
}

/* 搜索按钮样式 */
.search-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 8px 8px;
    /* 调整padding */
    display: inline-block;
    /* 改为inline-block以与导航项对齐 */
    vertical-align: middle;
    /* 垂直居中对齐 */
    transition: all 0.2s ease;
}

.search-button:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* 搜索图标样式 */
.search-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    vertical-align: middle;
    /* 确保图标在按钮中垂直居中 */
}

/* 搜索表单样式 */
.search-form {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    width: 250px;
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.search-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 搜索表单容器样式 */
.search-form form {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 搜索输入框样式 */
.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 0;
}

.search-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* 搜索提交按钮样式 */
.search-submit {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-submit:hover {
    background-color: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-container {
        margin-left: 10px;
    }

    .search-form {
        width: 200px;
    }
}