/* 搜索框样式 - 精致高级质感 */
.search {
    width: 100%;
    padding: 12px 15px;
    background: #7f1cf1;
    box-sizing: border-box;
}

.search-form {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-form label {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 6px 6px 6px 15px;
    box-sizing: border-box;
    width: 100%;
    box-shadow: 
        0 2px 8px rgba(127, 28, 241, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(127, 28, 241, 0.1);
}

.search-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 60px 12px 40px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    color: #333;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

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

.search-submit {
    background: linear-gradient(135deg, #7f1cf1 0%, #a855f7 100%);
    border: none;
    cursor: pointer;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: absolute;
    right: 6px;
    box-shadow: 0 2px 6px rgba(127, 28, 241, 0.3);
    transition: all 0.3s ease;
}

.search-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(127, 28, 241, 0.4);
}

.search-submit img {
    width: 18px;
    height: 18px;
    display: block;
    filter: brightness(10);
}

/* 移除index.php中旧的搜索样式覆盖 */
.search form {
    width: 100% !important;
    margin: 0 auto !important;
}

.search form label {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    position: relative !important;
    background: #ffffff !important;
    padding: 6px 6px 6px 15px !important;
    box-shadow: 
        0 2px 8px rgba(127, 28, 241, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(127, 28, 241, 0.1) !important;
    border-radius: 50px !important;
}

.search form label .search-field {
    flex: 1 !important;
    margin: 0 !important;
    padding: 12px 60px 12px 40px !important;
    height: auto !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    width: auto !important;
    border: none !important;
    background: transparent !important;
    color: #333 !important;
}

.search form label .search-field::placeholder {
    color: #999 !important;
}

.search form label .search-submit {
    display: flex !important;
    width: auto !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    height: auto !important;
    position: absolute !important;
    right: 6px !important;
    border: 0 !important;
    background: linear-gradient(135deg, #7f1cf1 0%, #a855f7 100%) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 6px rgba(127, 28, 241, 0.3) !important;
    align-items: center !important;
    justify-content: center !important;
}

.search form label .search-submit:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 3px 10px rgba(127, 28, 241, 0.4) !important;
}

.search form label .search-submit img {
    width: 18px !important;
    height: 18px !important;
    filter: brightness(10) !important;
}

/* 手机端搜索框响应式 - 极简紧凑 */
@media (max-width: 480px) {
    .search {
        padding: 6px 8px !important;
        background: linear-gradient(135deg, #7f1cf1 0%, #a855f7 100%) !important;
    }
    .search-form {
        width: 100% !important;
        max-width: none !important;
    }
    .search-form label {
        padding: 0 40px 0 12px !important;
        border-radius: 30px !important;
        height: 38px !important;
        display: flex !important;
        align-items: center !important;
    }
    .search-field {
        padding: 0 !important;
        font-size: 13px !important;
        height: 38px !important;
        line-height: 38px !important;
    }
    .search-submit {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        right: 3px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        position: absolute !important;
    }
    .search-submit img {
        width: 16px !important;
        height: 16px !important;
    }
    /* 覆盖index.php中的旧样式 */
    .search form {
        height: 38px !important;
    }
    .search form label {
        height: 38px !important;
        padding: 0 40px 0 12px !important;
    }
    .search form label .search-field {
        height: 38px !important;
        line-height: 38px !important;
        padding: 0 !important;
    }
    .search form label .search-submit {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
    }
}
